- API Reference
- Box API
- Modems
Lock a Huawei Hilink modem to some bands or a network mode
Use this to force a modem onto a band or 4G only. Works only for HW-Hilink modems. Values are hexadecimal masks as returned by GET /band_list; a missing field resets to all (NetworkMode 00 auto, NetworkBand 3FFFFFFF, LTEBand 7FFFFFFFFFFFFFFF). The modem re-registers on the network.
/set_bandRequest body application/json · required
Network mode code, for example 00 auto, 03 4G only, 02 3G only.
2G/3G band mask (hex).
LTE band mask (hex).
Authentication
Needs dashboard Basic credentials when dashboard authentication is enabled; trusted callers (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) pass without them.
Responses
Modem answer or a refusal.
False when the body was missing, the slot is empty, or the modem call raised an error.
Modem answer.
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
Dongle do not support! | (in data) The modem is not a Huawei Hilink. | Use the panel tools of that modem type. |
| (data empty, status false) No JSON body, empty slot, or the modem did not answer. | Send position in a JSON body and check the modem is online. |