Skip to content

Commit efaa518

Browse files
committed
1、sinr 2、datacall apn/password/username len 2、atcmd
1 parent d7bacaa commit efaa518

File tree

4 files changed

+357
-24
lines changed

4 files changed

+357
-24
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 90 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Call this API to activating the PDP Context.
6666
| ---------- | ------ | ------------------------------------------------------------ |
6767
| profileIdx | int | PDP context index. Range: 1 - 8 [volte version with the largest default PID is used to register IMS, please do not repeat the operation]. It is generally set to 1, if set as 2 - 8, the private APN and password may be required. |
6868
| ipType | int | IP type. 0-IPV4, 1-IPV6, 2-IPV4 and IPV6. |
69-
| apn | string | Optional. APN name. The maximum length is 63 bytes. |
70-
| username | string | Optional. APN user name. The maximum length is 15 bytes. |
71-
| password | string | Optional. APN password. The maximum length is 15 bytes. |
69+
| apn | string | Optional. APN name. The maximum length is 63 bytes. (The maximum length is 64 bytes in EC200U/EC200A) |
70+
| username | string | Optional. APN user name. The maximum length is 15 bytes.(The maximum length is 64 bytes in EC200U/EC200A) |
71+
| password | string | Optional. APN password. The maximum length is 15 bytes.(The maximum length is 64 bytes in EC200U/EC200A) |
7272
| authType | int | Authentication type. 0-No authentication, 1-PAP, 2-CHAP. |
7373

7474
* Return Value
@@ -344,9 +344,9 @@ After calling this interface, the user_apn.json will be created in the user part
344344
| ---------- | ------ | ------------------------------------------------------------ |
345345
| profileIdx | int | PDP context index. Range: 1-8. It is generally set to 1, if set as 2-8, the private APN and password may be required. |
346346
| ipType | int | IP type. 0-IPV4, 1-IPV6, 2-IPV4 and IPV6. |
347-
| apn | string | Optional. APN name. The maximum length is 63 bytes. |
348-
| username | string | Optional. APN user name. The maximum length is 15 bytes. |
349-
| password | string | Optional. APN password. The maximum length is 15 bytes. |
347+
| apn | string | Optional. APN name. The maximum length is 63 bytes.(The maximum length is 64 bytes in EC200U/EC200A) |
348+
| username | string | Optional. APN user name. The maximum length is 15 bytes.(The maximum length is 64 bytes in EC200U/EC200A) |
349+
| password | string | Optional. APN password. The maximum length is 15 bytes.(The maximum length is 64 bytes in EC200U/EC200A) |
350350
| authType | int | Authentication type. 0-No authentication, 1-PAP, 2-CHAP. |
351351
| flag | int | This parameter is optional. The default value is 0, indicating that only a user_apn.json file is created to save user APN information. If the value is 1, the user_apn.json file is created to save user APN information, and the APN information is used for PDP context activation immediately. |
352352

@@ -701,6 +701,59 @@ Obtain Coordinate Information.
701701

702702

703703

704+
#### atcmd - AT
705+
706+
Function:send AT cmd.
707+
708+
Note:This module only supports 1803S/EC200U/CATM platform.
709+
710+
#### send AT cmd
711+
712+
> **atcmd.sendSync(atcmd,resp,include_str,timeout)
713+
714+
* Parameter
715+
716+
| Parameter | Type | Description |
717+
| ---- | -------- | --------------------------------------------- |
718+
| atcmd | string | AT cmd,must contain‘\r\n’ |
719+
| resp | string | output param |
720+
| include_str | string | include str |
721+
| timeout | int | Timeout period, senconds |
722+
723+
* Return value
724+
725+
Return 0, or return [errorlist] if failed:
726+
727+
typedef enum HELIOS_AT_RESP_STATUS_ENUM{
728+
HELIOS_AT_RESP_OK = 0,
729+
HELIOS_AT_RESP_ERROR,
730+
HELIOS_AT_RESP_CME_ERROR,
731+
HELIOS_AT_RESP_CMS_ERROR,
732+
HELIOS_AT_RESP_INVALID_PARAM,
733+
HELIOS_AT_RESP_TIME_OUT,
734+
HELIOS_AT_RESP_SYS_ERROR,
735+
}HELIOS_AT_RESP_STATUS_E;
736+
737+
* Example
738+
739+
```python
740+
>>> import atcmd
741+
>>> resp=bytearray(50)
742+
>>> atcmd.sendSync('at+cpin?\r\n',resp,'',20)
743+
0
744+
>>> print(resp)
745+
bytearray(b'\r\n+CPIN: READY\r\n\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
746+
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
747+
748+
atcmd.sendSync('at+cpin\r\n',resp,'',20)
749+
1
750+
>>> print(resp)
751+
bytearray(b'\r\nERROR\r\n\n
752+
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
753+
```
754+
755+
756+
704757
#### sim - SIM Card
705758

706759
Function: Provides SIM operations related APIs, such as querying SIM card status, ICCID, IMSI.
@@ -2159,6 +2212,14 @@ This function obtains CSQ.
21592212

21602213
This function obtains the information of Cell information.
21612214

2215+
Note:This interface is a variable parameter function in BC25 platform, the number of parameters:[0/1]
2216+
case with one Parameter:
2217+
parameter:sinr_enable,
2218+
type:int
2219+
range:0/1
2220+
0,disable to get sinr
2221+
1,enable to get sinr
2222+
21622223
* Parameter
21632224

21642225
* None
@@ -2208,12 +2269,21 @@ This function obtains the information of Cell information.
22082269
| tac | Tracing area code, range : 0 ~ 65535 |
22092270
| earfcn | Extended Absolute Radio Frequency Channel Number, range : 0-65535. |
22102271
| rssi | Received Signal Strength Indication. In LTE network, denotes RSRP quality (negative value), which is converted according to RSRP measurement report value, and the conversion relationship is as follows<br>RSRP quality = RSRP measurement report value - 140, unit : dBm, range : -140 ~ -44 dBm |
2272+
| sinr | Signal to Noise Ratio(supported in BC25range : -30 ~ 30) |
22112273

22122274
* Example
22132275

22142276
```python
22152277
>>> net.getCellInfo()
22162278
([], [], [(0, 14071232, 1120, 0, 123, 21771, 1300, -69), (3, 0, 0, 0, 65535, 0, 40936, -140), (3, 0, 0, 0, 65535, 0, 3590, -140), (3, 0, 0, 0, 63, 0, 40936, -112)])
2279+
2280+
//bc25
2281+
>>> net.getCellInfo(1)
2282+
([], [], [(0, 17104243, 460, 4, 169, 19472, 3688, -56, -108, -3)])
2283+
>>> net.getCellInfo(0)
2284+
([], [], [(0, 17104243, 460, 4, 169, 19472, 3688, -75, -102)])
2285+
>>> net.getCellInfo()
2286+
([], [], [(0, 17104243, 460, 4, 121, 19472, 3688, -76, -105)])
22172287
```
22182288

22192289

@@ -2342,6 +2412,14 @@ This function obtains the network mode.
23422412

23432413
This function obtains the signal strength.
23442414

2415+
Note:This interface is a variable parameter function in 1803s/qualcomm/unisoc platform, the number of parameters:[0/1]
2416+
case with one Parameter:
2417+
parameter:sinr_enable,
2418+
type:int
2419+
range:0/1
2420+
0,disable to get sinr
2421+
1,enable to get sinr
2422+
23452423
* Parameter
23462424

23472425
* None
@@ -2369,12 +2447,17 @@ This function obtains the signal strength.
23692447
`rsrp` : Reference Signal Receiving Power, range : -141 ~ -44 dBm, 99 indicates unknown or undetected signal <br/>
23702448
`rsrq` : Reference Signal Receiving Quality, range : -20 ~ -3 dBm, A larger value indicates better signal reception quality <br/>
23712449
`cqi` : Channel Quality
2372-
2450+
`sinr`: Signal to Noise Ratio(supported in 1803s/qualcomm/unisoc,range : -30 ~ 30)
23732451
* Example
23742452

23752453
```python
23762454
>>>net.getSignal()
23772455
([99, 99, 255, 255], [-51, -76, -5, 255])
2456+
2457+
>>>net.getSignal(0)
2458+
([99, 99, 255, 255], [-51, -76, -5, 255])
2459+
>>>net.getSignal(1)
2460+
([99, 99, 255, 255], [-51, -76, -5, 255, 18])
23782461
```
23792462

23802463

en-us/api/QuecPythonThirdlib.md

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,29 @@ Set interactive protect. After setting to enable interactive protect, all extern
16461646
| Parameter | Type | Description |
16471647
| --------- | ---- | --------------------------------- |
16481648
| flag | int | 0 : Disable(default);1 :Enable |
1649+
| kw_args | str | password,it can be NULL |
1650+
1651+
* Return Value
1652+
1653+
* Return 0 if the execution is successful.
1654+
* if the parameter of flag is 2, return values means current repl states:
1655+
-1:failed
1656+
1:repl enable
1657+
2:repl enable but The password has already been set
1658+
3:repl refuse
1659+
4:repl-protection by password
1660+
1661+
1662+
1663+
> **system.replChangPswd(old_password,new_password)**
1664+
1665+
change repl-protetion password
1666+
1667+
* 参数
1668+
1669+
| Parameter | Type | Description |
1670+
| old_password | str | old password len:6-12byte |
1671+
| new_password | str | new password len:6-12byte |
16491672

16501673
* Return Value
16511674

@@ -1654,9 +1677,64 @@ Set interactive protect. After setting to enable interactive protect, all extern
16541677
**Example**
16551678

16561679
```python
1657-
import system
1658-
1659-
system.replSetEnable(1) # Enable interactive protection.
1680+
>>>import system
1681+
1682+
>>> system.replSetEnable(1,password='miamia123')
1683+
0
1684+
>>>
1685+
Please enter password:
1686+
>>> ******
1687+
Incorrect password, please try again:
1688+
>>> ********
1689+
Incorrect password, please try again:
1690+
>>> *********
1691+
REPL enable
1692+
>>> system.replSetEnable(2)
1693+
2
1694+
>>>
1695+
1696+
1697+
>>> system.replSetEnable(1,password='miamia')
1698+
Incorrect password!
1699+
-1
1700+
>>> system.replSetEnable(1,password='miamia123')
1701+
0
1702+
>>>
1703+
Please enter password:
1704+
>>> miamia123
1705+
*********
1706+
REPL enable
1707+
>>> system.replSetEnable(2)
1708+
2
1709+
1710+
1711+
1712+
>>> system.replChangPswd(old_password='miamia123',new_password='123456') //change password
1713+
0
1714+
>>> system.replSetEnable(1,password='miamia123')
1715+
Incorrect password!
1716+
-1
1717+
>>> system.replSetEnable(1,password='123456')
1718+
0
1719+
>>>
1720+
Please enter password:
1721+
>>> ******
1722+
REPL enable
1723+
1724+
1725+
1726+
>>> system.replSetEnable(0,password='123456')
1727+
1728+
0
1729+
>>>
1730+
>>> system.replSetEnable(2)
1731+
1
1732+
>>> system.replSetEnable(0)
1733+
0
1734+
>>>system.replSetEnable(1)
1735+
>>>
1736+
REPL refuse
1737+
>>>
16601738
```
16611739

16621740

0 commit comments

Comments
 (0)