module.visible_networks
The module.visible_networks command is used to acquire and return a list of networks visible to the module. The module can be identified by thingKey, ESN, ICCID, IMEI, IMSI, MEID, or MSISDN. Only one of these identifying fields is required.
TR50 Request
{
"cmd": {
"command": "module.visible_networks",
"params": {
"thingKey": "mything",
"mode": "tr50"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
Thing Identifier Parameters | Yes | Identifies the thing to which the module call is to be directed. See Thing Identifier Parameters table below for supported parameters. | |
mode | String | The mode to send the command ('tr50' or 'sms'). |
Thing Identifier Parameters
Name | Type | Description |
---|---|---|
thingKey | String | Key of the thing |
thingId | String | Id of the thing |
esn | String | Esn of the thing |
iccid | String | Iccid of the thing |
imei | String | Imei of the thing |
imsi | String | Imsi of the thing |
meid | String | Meid of the thing |
msisdn | String | Msisdn of the thing |
TR50 Response
If the command is sent successfully a success message is returned and an array containing the visible networks. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"networks": [
"status": 1,
"statusStr": "status string",
"networkName": "network name",
"mnc": 1,
"mcc": 1,
"ran": 0,
"ranStr": "2G"
],
...
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
status | Integer | The network's status code. |
statusStr | String | The textual description of the network's status. |
networkName | String | The name of the network. |
mnc | Integer | Mobile network code. |
mcc | Integer | Mobile country code. |
ran | Integer | The RAN code. |
ranStr | String | The textual description of the RAN code. |