You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| net_rat |int| Specify which net mode band is to be set<br>0-GSM<br>1-LTE<br>2-CATM<br>3-NB<br>note:The CATM platform does not support LTE<br/>The EG912NENAA platform just support GSMandLTE|
3213
+
| gsm_band |int| gsm band value<br/>0x01-GSM_EGSM900<br/>0x02-GSM_DCS1800<br>0x04-GSM_GSM850<br/>0x08-GSM_PCS1900|
3214
+
| band_tuple |tuple| band value of other network modes,Is a tuple of four elements, each of which cannot exceed 4bytes. The formatisas follows:<br>(band_hh, band_hl, band_lh, band_ll)|
3215
+
3216
+
* Return Value
3217
+
3218
+
*0 Successful execution.
3219
+
*-1 Failed execution.
3220
+
3221
+
* Example
3222
+
3223
+
```python
3224
+
import net
3225
+
import utime
3226
+
3227
+
'''
3228
+
You can use the following two interfaces to set and obtain bands
| net_rat |int| Specify which net mode band is to be get<br>0-GSM<br>1-LTE<br>2-CATM<br>3-NB<br>note:The CATM platform does not support LTE<br/>The EG912NENAA platform just support GSMandLTE|
3348
+
3349
+
* Return Value
3350
+
3351
+
Return the band value as a hexadecimal string.
3352
+
3353
+
* example
3354
+
3355
+
```python
3356
+
net.getBand(2)
3357
+
'0x10000200000000090e189f'
3358
+
```
3359
+
3360
+
3361
+
3362
+
##### band Restores the initial value
3363
+
3364
+
>**net.bandRst()**
3365
+
3366
+
band Restores the initial value。(Platforms are currently supported:EG912NENAA)
3367
+
3368
+
* Parameter
3369
+
3370
+
*NA
3371
+
3372
+
* Return Value
3373
+
3374
+
*0 Successful execution.
3375
+
*-1 Failed execution.
3376
+
3377
+
* Example
3378
+
3379
+
```python
3380
+
#Set it to another band and call the interface to check whether the interface is successfully restored to the initial value
Function: The checkNet module is mainly used for the script programs [auto-startup], and provides APIs to wait for the network to be ready. If it times out or exits abnormally, the program returns an error code. Therefore, if there are network-related operations in the your program, the method in the checkNet module should be called at the beginning of the user program to wait for the network to be ready. Of course, you can also implement the functions of this module by yourselves.
0 commit comments