<tdclass="cellrowborder"valign="top"width="50%"headers="mcps1.2.3.1.2 "><pid="p239mcpsimp"><aname="p239mcpsimp"></a><aname="p239mcpsimp"></a>Function: Provides an entry for running a modem vendor library.</p>
<pid="p240mcpsimp"><aname="p240mcpsimp"></a><aname="p240mcpsimp"></a><strongid="b164737479278"><aname="b164737479278"></a><aname="b164737479278"></a>reportOps</strong>: Specifies the pointer to the event callback function, which is passed by RIL Adapter.</p>
<pid="p241mcpsimp"><aname="p241mcpsimp"></a><aname="p241mcpsimp"></a>Return result: function pointer of the service request API.</p>
</td>
</tr>
</tbody>
</table>
| API | Description |
| -------- | -------- |
| const HRilOps \*RilInitOps(const struct HRilReport \* reportOps) | Provides an entry for running a modem vendor library.<br>Input parameter:<br>**reportOps**: Specifies the pointer to the event callback function, which is passed by RIL Adapter.<br/>Return result: function pointer of the service request API. |
### How to Develop<a name="section51031144122"></a>
...
...
@@ -155,35 +141,10 @@ The following table describes the APIs for responding to modem service requests,
**Table 2** APIs for responding to modem service requests
<aname="ul1676502416411"></a><aname="ul1676502416411"></a><ulid="ul1676502416411"><li><strongid="b1576510240416"><aname="b1576510240416"></a><aname="b1576510240416"></a>data</strong>: called number</li></ul>
<aname="ul842034134114"></a><aname="ul842034134114"></a><ulid="ul842034134114"><li><strongid="b1542193411415"><aname="b1542193411415"></a><aname="b1542193411415"></a>dataLen</strong>: data length</li></ul>
<tdclass="cellrowborder"valign="top"width="50.160000000000004%"headers="mcps1.2.3.1.2 "><pid="p328mcpsimp"><aname="p328mcpsimp"></a><aname="p328mcpsimp"></a>Function: Reports the execution result of a service request to RIL Adapter.</p>
<aname="ul18380115494513"></a><aname="ul18380115494513"></a><ulid="ul18380115494513"><li><strongid="b83808549457"><aname="b83808549457"></a><aname="b83808549457"></a>data</strong>: called number</li></ul>
<aname="ul118421156184517"></a><aname="ul118421156184517"></a><ulid="ul118421156184517"><li><strongid="b48421056144519"><aname="b48421056144519"></a><aname="b48421056144519"></a>dataLen</strong>: data length</li></ul>
| void ReqDial(ReqDataInfo \*requestInfo, const void \*data, size_t dataLen); | Processes number dial requests.<br>Input parameters:<br>**requestInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
| void (\*OnCallReport)(struct ReportInfo reportInfo, const void \*data, size_t dataLen); | Reports the execution result of a service request to RIL Adapter.<br>Input parameters:<br>**reportInfo**: request type<br/>**data**: called number<br/>**dataLen**: data length<br/>Return value: none |
### How to Develop<a name="section17190412101414"></a>
...
...
@@ -301,24 +262,9 @@ The following table describes the API for reporting modem events.
<tdclass="cellrowborder"valign="top"width="48%"headers="mcps1.2.3.1.2 "><pid="p423mcpsimp"><aname="p423mcpsimp"></a><aname="p423mcpsimp"></a>Function: Distributes the events reported by the modem.</p>
<aname="ul678053915191"></a><aname="ul678053915191"></a><ulid="ul678053915191"><li><strongid="b14780173912196"><aname="b14780173912196"></a><aname="b14780173912196"></a>s</strong>: AT command prefix</li></ul>
<aname="ul206343434192"></a><aname="ul206343434192"></a><ulid="ul206343434192"><li><strongid="b65891958173518"><aname="b65891958173518"></a><aname="b65891958173518"></a>smsPdu</strong>: PDU of the SMS message</li></ul>
| void OnNotifyOps(const char \*s, const char \*smsPdu) | Distributes the events reported by the modem.<br>Input parameters:<br/>**s**: AT command prefix<br/>**smsPdu**: PDU of the SMS message<br/>Return value: none |
### How to Develop<a name="section16394112401512"></a>
|Version|Ubuntu 18.04 or later|libreadline-dev|3.7.5 or later|- pySerial 3.3 or later<br>- Paramiko 2.7.1 or later<br>- Setuptools 40.8.0 or later<br>- rsa4.0 or later|haneWIN NFS Server 1.2.50 or later, or NFS v4 or later| 1.1.0 or later|
|Description|Provides code build environment.|Plug-in used to read commands.|Language used by the test framework.|- pySerial: supports Python serial port communication. <br>- Paramiko: allows Python to use SSH. <br>- Setuptools: allows Python packages to be created and distributed easily. <br>- rsa: implements RSA encryption in Python.|Enables devices to be connected through the serial port.| A tool that enables devices to be connected through the HarmonyOS Device Connector (HDC).|
| Environment | Operating System | Linux Extended Component | Python | Python Plug-ins | NFS Server | HDC |
| Version | Ubuntu 18.04 or later | libreadline-dev | 3.7.5 or later | - pySerial 3.3 or later<br>- Paramiko 2.7.1 or later<br>- Setuptools 40.8.0 or later<br>- rsa4.0 or later | haneWIN NFS Server 1.2.50 or later, or NFS v4 or later | 1.1.0 or later |
| Description | Provides code build environment. | Plug-in used to read commands. | Language used by the test framework. | - pySerial: supports Python serial port communication. <br>- Paramiko: allows Python to use SSH. <br>- Setuptools: allows Python packages to be created and distributed easily. <br>- rsa: implements RSA encryption in Python. | Enables devices to be connected through the serial port. | A tool that enables devices to be connected through the HarmonyOS Device Connector (HDC). |
## Installation Process
1. Run the following command to install the Linux extended component libreadline:
...
...
@@ -68,15 +68,14 @@
nfs-kernel-server is already the newest version (1:1.3.4-2.1ubuntu5.3).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
```
7. Install the HDC tool if the device supports HDC connections. For details about the installation process, see:
7. Install the HDC tool if the device supports HDC connections. For details about the installation process, see[Readme](https://gitee.com/openharmony/developtools_hdc_standard/blob/master/README.md).
| Check whether Python is installed successfully.|Run the **python --version** command.|The Python version is 3.7.5 or later.|
| Check whether Python plug-ins are successfully installed.|Go to the **test/developertest** directory and run **start.bat** or **start.sh**.| The **>>>** prompt is displayed.|
|Check the NFS server status (for the devices that support only serial port output).|Log in to the development board through the serial port and run the **mount** command to mount the NFS.|The file directory can be mounted.|
|Check whether the HDC tool is successfully installed.|Run the **hdc_std -v** command.|The HDC version is 1.1.0 or later.|
| Check Item | Operation | Expected Result |
| --- | --- | --- |
| Whether Python is successfully installed | Run the **python --version** command. | The Python version is 3.7.5 or later. |
| Whether Python plug-ins are successfully installed | Go to the **test/developertest** directory and run **start.bat** or **start.sh**. | The **>>>** prompt is displayed. |
| NFS server status (for the devices that support only serial port output) | Log in to the development board through the serial port and run the **mount** command to mount the NFS. | The file directory can be mounted. |
| Whether HDC tool is successfully installed | Run the **hdc_std -v** command. | The HDC version is 1.1.0 or later. |