Skip to content

Commit d34a439

Browse files
authored
Merge pull request #1 from QuecPython/main
merge test
2 parents eac9325 + c82d22d commit d34a439

File tree

2 files changed

+216
-53
lines changed

2 files changed

+216
-53
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 107 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,16 +2135,25 @@ Function: Provides APIs to query/set network related performance.
21352135

21362136
##### Set APN
21372137

2138-
> **net.setApn(apn, simid)**
2138+
> **net.setApn(\*args)**
21392139

21402140
This function sets APN. After setting, you need to restart or switch to mode 0 and then mode 1 through the `net.setmodemFun (mode)` interface for the setting to take effect.
21412141

21422142
* Parameter
21432143

2144-
| Parameter | Type | Description |
2145-
| --------- | ------ | ------------------------------------------- |
2146-
| apn | string | apn name |
2147-
| simid | int | simid<br>0 : SIM card 1<br/>1 : SIM card 2 |
2144+
This API is a variable parameter function in Qualcomm/ASR_1803s/Unisoc(excluding EG915) platform, and the number of parameters is 2 or 7. The number of parameters in other platforms is fixed at 2
2145+
The number of parameters is 2:net.setApn(apn, simid)
2146+
The number of parameters is 7:net.setApn(pid, iptype, apn, usrname, password, authtype, simid)
2147+
2148+
| Parameter | Type | Description |
2149+
| ----- | -------- | -------------------------------------------- |
2150+
| pid | int | PDP context index. |
2151+
| iptype | int | IP type. 0-IPV4, 1-IPV6, 2-IPV4 and IPV6. |
2152+
| apn | string | apn name, The maximum length is 63 bytes. |
2153+
| usrname | string | user name, The maximum length is 63 bytes. |
2154+
| password | string | password, The maximum length is 63 bytes. |
2155+
| authtype | int | Authentication type,0-No authentication, 1-PAP, 2-CHAP, 3-PAP AND CHAP(just for CATM Platform)|
2156+
| simid | int | simid<br>0 : SIM card 1<br/>1 : SIM card 2 |
21482157

21492158
* Return Value
21502159

@@ -2155,29 +2164,56 @@ This function sets APN. After setting, you need to restart or switch to mode 0 a
21552164

21562165
The BC25PA platform does not support this module function.
21572166

2167+
* Example
2168+
2169+
```python
2170+
>>> net.setApn('3gnet',0)
2171+
0
2172+
>>> net.setApn(1,1,'3gnet','mia','123',2,0)
2173+
0
2174+
```
21582175

21592176

2177+
21602178
##### Obtain the Current APN
21612179

2162-
> **net.getApn(simid)**
2180+
> **net.getApn(\*args)**
21632181

21642182
This function obtains the current APN.
21652183

21662184
* Parameter
21672185

2168-
| Parameter | Type | Description |
2169-
| --------- | ---- | -------------------------------------------- |
2170-
| simid | int | simid<br/>0 : SIM card 1<br/>1 : SIM card 2 |
2186+
This API is a variable parameter function in Qualcomm/ASR_1803s/Unisoc(excluding EG915) platform, and the number of parameters is 1 or 2. The number of parameters in other platforms is fixed at 1
2187+
The number of parameters is 2:net.setApn(pid, simid)
2188+
The number of parameters is 1:net.setApn(simid)
2189+
2190+
| Parameter | Type | Description |
2191+
| ----- | -------- | -------------------------------------------- |
2192+
| pid | int | PDP context index. |
2193+
| simid | int | simid<br>0 : SIM card 1<br/>1 : SIM card 2 |
21712194

21722195
* Return Value
21732196

2174-
* 0 Successful execution
2175-
* -1 Failed execution
2197+
The number of parameters is 2:
2198+
* pdp context: Successful execution
2199+
* -1 Failed execution
2200+
The number of parameters is 1:
2201+
* apn info: Successful execution
2202+
* -1 Failed execution
21762203

21772204
* Note
21782205

21792206
* The BC25PA platform does not support this module function.
21802207

2208+
* Example
2209+
2210+
```python
2211+
>>> net.getApn(0)
2212+
'3gnet'
2213+
>>> net.getApn(1,0)
2214+
(1, '3gnet', 'mia', '123', 2)
2215+
```
2216+
21812217

21822218

21832219
##### Obtain CSQ
@@ -2208,7 +2244,7 @@ This function obtains CSQ.
22082244

22092245
##### Obtain Neighbor Cell Information
22102246

2211-
> **net.getCellInfo()**
2247+
> **net.getCellInfo(\*args)**
22122248

22132249
This function obtains the information of Cell information.
22142250

@@ -2222,13 +2258,19 @@ case with one Parameter:
22222258

22232259
* Parameter
22242260

2225-
* None
2261+
This API is a variable parameter function in BC25 platform, and the number of parameters is 0 or 1. The number of parameters in other platforms is fixed at 0
2262+
The number of parameters is 0:net.getCellInfo()
2263+
The number of parameters is 1:net.getCellInfo(sinr_enable)
2264+
2265+
| Parameter | Type | Description |
2266+
| ----- | -------- | -------------------------------------------- |
2267+
| enable | int | range:0/1, 0:disable to get sinr 1:enable to get sinr|
22262268

22272269
* Return Value
22282270

22292271
* If the execution is failed, -1 is returned. If the execution is successful, the list of neighbor cell information including RATs GSM/UMTS/LTE are returned in the following format. And when the neighbor cell information for one RAT is null, the corresponding list returned is null.
22302272

2231-
* `([(flag, cid, mcc, mnc, lac, arfcn, bsic, rssi)], [(flag, cid, licd, mcc, mnc, lac, arfcn, bsic, rssi)], [(flag, cid, mcc, mnc, pci, tac, earfcn, rssi),...])`
2273+
* `([(flag, cid, mcc, mnc, lac, arfcn, bsic, rssi)], [(flag, cid, licd, mcc, mnc, lac, arfcn, bsic, rssi)], [(flag, cid, mcc, mnc, pci, tac, earfcn, rssi, sinr),...])`
22322274

22332275
* The description of the return value for GSM:
22342276

@@ -2329,6 +2371,12 @@ The function obtains the current RAT and the roaming configuration.
23292371
| 16 | GSM_LTE, dual link |
23302372
| 17 | UMTS_LTE, dual link. Not supported in EC100Y and EC200S |
23312373
| 18 | GSM_UMTS_LTE, dual link. Not supported in EC100Y and EC200S |
2374+
| 19 | CATM, BG95 supported |
2375+
| 20 | GSM_CATM, BG95 supported |
2376+
| 21 | CATNB, BG95 supported |
2377+
| 22 | GSM_CATNB, BG95 supported |
2378+
| 23 | CATM_CATNB, BG95 supported |
2379+
| 24 | GSM_CATM_CATNB, BG95 supported |
23322380

23332381
* Example
23342382

@@ -2397,6 +2445,24 @@ This function obtains the network mode.
23972445
| 9 | E TRAN A |
23982446
| 10 | NONE |
23992447

2448+
* Note:For CATM platforms, see the following table
2449+
2450+
| Value| ACT Mode |
2451+
| ---- | ------------------ |
2452+
| 0 | GSM |
2453+
| 1 | GSM COMPACT |
2454+
| 2 | UTRAN |
2455+
| 3 | GSM wEGPRS |
2456+
| 4 | UTRAN wHSDPA |
2457+
| 5 | UTRAN wHSUPA |
2458+
| 6 | UTRAN wHSDPA HSUPA |
2459+
| 7 | E_UTRAN |
2460+
| 8 | UTRAN HSPAP |
2461+
| 9 | E_UTRAN_CA |
2462+
| 10 | E_UTRAN_NBIOT |
2463+
| 11 | E_UTRAN_EMTC |
2464+
| 12 | NONE |
2465+
24002466
* Example
24012467

24022468
```python
@@ -2408,7 +2474,7 @@ This function obtains the network mode.
24082474

24092475
##### Obtain the Signal Strength
24102476

2411-
> **net.getSignal()**
2477+
> **net.getSignal(\*args)**
24122478

24132479
This function obtains the signal strength.
24142480

@@ -2422,13 +2488,19 @@ case with one Parameter:
24222488

24232489
* Parameter
24242490

2425-
* None
2491+
This API is a variable parameter function in BC25 platform, and the number of parameters is 0 or 1. The number of parameters in other platforms is fixed at 0
2492+
The number of parameters is 0:net.getCellInfo()
2493+
The number of parameters is 1:net.getCellInfo(sinr_enable)
2494+
2495+
| Parameter | Type | Description |
2496+
| ----- | -------- | -------------------------------------------- |
2497+
| enable | int | range:0/1, 0:disable to get sinr 1:enable to get sinr|
24262498

24272499
* Return Value
24282500

24292501
* If the execution is failed, -1 is returned. If the execution is successful, a tuple including 2 list (GW/LTE) is returned in the following format:
24302502

2431-
`([rssi, bitErrorRate, rscp, ecno], [rssi, rsrp, rsrq, cqi])`
2503+
`([rssi, bitErrorRate, rscp, ecno], [rssi, rsrp, rsrq, cqi, sinr])`
24322504

24332505
* The description of the return value:
24342506

@@ -2535,7 +2607,7 @@ This function obtains the registration state.
25352607

25362608
* If the execution is failed, -1 is returned. If the execution is successful, a tuple is returned in the following format. The tuple contains voice and network registration information. The tuple starting with 'voice\_' indicates voice registration information, and the tuple starting with 'data\_' indicates network registration information:
25372609

2538-
`([voice_state, voice_lac, voice_cid, voice_rat, voice_reject_cause, voice_psc], [data_state, data _lac, data _cid, data _rat, data _reject_cause, data _psc])`
2610+
`([voice_state, voice_lac, voice_cid, voice_rat, voice_reject_cause, voice_psc], [data_state, data_lac, data_cid, data_rat, data_reject_cause, data_psc])`
25392611

25402612
The description of the return value:
25412613

@@ -2581,7 +2653,23 @@ This function obtains the registration state.
25812653
| 9 | E_UTRAN_CA |
25822654
| 10 | NONE |
25832655

2584-
2656+
* Note:For CATM platforms, see the following table
2657+
2658+
| Value| ACT Mode |
2659+
| ---- | ------------------ |
2660+
| 0 | GSM |
2661+
| 1 | GSM COMPACT |
2662+
| 2 | UTRAN |
2663+
| 3 | GSM wEGPRS |
2664+
| 4 | UTRAN wHSDPA |
2665+
| 5 | UTRAN wHSUPA |
2666+
| 6 | UTRAN wHSDPA HSUPA |
2667+
| 7 | E_UTRAN |
2668+
| 8 | UTRAN HSPAP |
2669+
| 9 | E_UTRAN_CA |
2670+
| 10 | E_UTRAN_NBIOT |
2671+
| 11 | E_UTRAN_EMTC |
2672+
| 12 | NONE |
25852673

25862674
* Example
25872675

0 commit comments

Comments
 (0)