Skip to main content

Commands -- Cellular & Carrier

POST /api/cmd.billing.newCycle

Start a new billing cycle by Connection ID and SIM ID.

Available in 8.1.0 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN Connection ID to renew billing cycle
simIdnumberoptional1 for SIM A, 2 for SIM B. Always send 1 for single SIM models. Ignored if WAN does not support cellular.

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":4,"simId":1}' \
http://192.168.1.1/api/cmd.billing.newCycle
{
"stat": "ok"
}

GET /api/cmd.carrier.scan

Obtain the result of discovered cellular network.

Returns fail when the WAN connection does not support carrier scan.

Available in 8.0.1 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN connection ID to scan
referencestringyes or no -- include current configuration reference

Response

FieldTypeDescription
scanStatusstringscanning or done
timestampintegerTimestamp of the carrier list
listarrayList of Scan_Carrier objects
referenceobjectCurrent configuration (Reference object)

Scan_Carrier Object:

FieldTypeDescription
namestringName of the carrier
mobileTypestring2G, 3G, or LTE
mccstringMobile Country Code (3 digits)
mncstringMobile Network Code (2--3 digits)
pcsnumber0 or 1

Reference Object:

FieldTypeDescription
activeSimobject or nullActive SIM info (In_Use_SIM object), or null if no active SIM

In_Use_SIM Object:

FieldTypeDescription
simIdnumber1 or 2
selectedCarrierobject or nullSelected carrier (Carrier object), or null if auto

Carrier Object:

FieldTypeDescription
namestringName of the carrier
mccstringMobile Country Code (3 digits)
mncstringMobile Network Code (2--3 digits)
pcsnumber0 or 1

cURL Example

curl -b cookies.txt \
"http://192.168.1.1/api/cmd.carrier.scan?connId=4&reference=yes"
{
"stat": "ok",
"response": {
"scanStatus": "scanning",
"list": [
{
"name": ".csl",
"mobileType": "LTE",
"mcc": "454",
"mnc": "0",
"pcs": 0
},
{
"name": "SMT HK",
"mobileType": "LTE",
"mcc": "454",
"mnc": "6",
"pcs": 0
}
],
"reference": {
"activeSim": {
"simId": 1,
"cellularNetwork": null
}
}
}
}

POST /api/cmd.carrier.scan

Trigger and obtain the result of discovered cellular network.

Returns fail when the WAN connection does not support carrier scan.

Available in 8.1.0 or later

Input Parameters

FieldTypeRequiredDescription
actionstringoptionalstart to trigger scan
connIdnumberWAN connection ID to scan
referencestringoptionalyes or no

Response

Same as GET /api/cmd.carrier.scan.

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"action":"start","connId":"4","reference":"yes"}' \
http://192.168.1.1/api/cmd.carrier.scan

POST /api/cmd.carrier.select

Update the cellular network selection.

Available in 8.0.1 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN connection ID
simIdnumberoptional1 or 2 -- SIM to change carrier selection
selectedCarrierobjectCarrier to select

Carrier Object:

FieldTypeRequiredDescription
mccstringMobile Country Code (3 digits)
mncstringMobile Network Code (2--3 digits)
pcsnumber0 or 1
namestringoptionalCarrier name

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":4,"selectedCarrier":{"mcc":"345","mnc":"23","pcs":0}}' \
http://192.168.1.1/api/cmd.carrier.select
{
"stat": "ok"
}

POST /api/cmd.channelPci.lock

Lock the connected LTE network on a specific channel number and Physical Layer Cell Identity (PCI).

Returns fail when the WAN connection does not support channel PCI lock.

Available in 8.1.1 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN connection ID to lock
simarrayList of SIM objects specifying channel and PCI

SIM Object:

FieldTypeRequiredDescription
idnumberSIM ID: 1 for SIM A, 2 for SIM B
valueobject or nullCH_PCI object, or null to clear the lock

CH_PCI Object:

FieldTypeRequiredDescription
channelnumberChannel to lock (0--65535)
pcinumberPCI to lock (0--503)

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":4,"sim":[{"id":1,"value":{"channel":1350,"pci":77}}]}' \
http://192.168.1.1/api/cmd.channelPci.lock
{
"stat": "ok"
}

POST /api/cmd.channelPci.scan

Scan for LTE cellular networks and obtain channel/PCI results.

Provide action=start to rescan. Returns fail when the WAN connection does not support channel PCI scan.

Available in 8.1.1 or later

Input Parameters

FieldTypeRequiredDescription
actionstringoptionalstart to trigger rescan
connIdnumberWAN connection ID to scan

Response

FieldTypeDescription
scanStatusstringscanning or done
timestampintegerTimestamp of the result
listarrayList of CH_PCI objects

CH_PCI Object:

FieldTypeDescription
pciintegerPhysical-layer Cell Identity
earfcnintegerE-UTRA Absolute radio-frequency channel number
cellUtranIdintegerCell UTRAN ID
plmnarrayList of PLMN objects

PLMN Object:

FieldTypeDescription
mccstringMobile Country Code (3 digits)
mncstringMobile Network Code (2--3 digits)

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"action":"start","connId":4}' \
http://192.168.1.1/api/cmd.channelPci.scan
{
"stat": "ok",
"response": {
"scanStatus": "scanning",
"timestamp": 1577836800,
"list": [
{
"pci": 371,
"earfcn": 3000,
"cellUtranId": 23574039,
"plmn": [
{
"mcc": "454",
"mnc": "00"
}
]
}
]
}
}

POST /api/cmd.cellularModule.rescanNetwork

Rescan the network of the corresponding WAN connection.

Available in 8.0.0 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN connection ID of the cellular module to rescan

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":"4"}' \
http://192.168.1.1/api/cmd.cellularModule.rescanNetwork
{
"stat": "ok"
}

POST /api/cmd.cellularModule.reset

Reset the cellular module of the corresponding WAN connection.

Available in 8.0.0 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN connection ID of the cellular module to reset

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":"4"}' \
http://192.168.1.1/api/cmd.cellularModule.reset
{
"stat": "ok"
}

POST /api/cmd.wan.cellular

Change the SIM priority. The items in simPriority will be enabled and ordered as specified. The cellular scheme type will change to custom automatically.

Available in 8.3.0 or later

Input Parameters

FieldTypeRequiredDescription
connIdnumberWAN Connection of the cellular module
simPriorityarrayPriority list. Values: 1, 2, remoteSim, speedfusionConnect5gLte

cURL Example

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"connId":4,"simPriority":["1","remoteSim"]}' \
http://192.168.1.1/api/cmd.wan.cellular
{
"stat": "ok"
}