Skip to content

ublox: add band detection support for additional modems

The u-blox plugin was originally written to support the TOBY-L4 only. This caused issues with mmcli reporting the correct supported and current bands because the logic was based only for the TOBY-L4 and the AT commands used in the implementaion are only supported by a couple of modems.

There is now a hard-coded modem list that contains the supported bands and the supported modes. A hard-coded list was chosen over a logic based list because ublox modems only report the frequency of the bands they support in the current mode they are in. For further justification, the reported frequency could relate to multiple bands that are not all supported by the modem, and not all the supported bands are always caught depending on the mode the modem is in (e.g. 2G, 3G, 4G). The only realiable way to retrieve the correct supported bands is to have the list hard-coded. Based off of the modem, the code chooses whether it is appropriate to issue +UACT or +UBANDSEL to retrieve the current bands list. Additionally, the appropriate AT command of +CFUN=4 or +COPS=2 is chosen to detach from the network when the mmcli --set-current-bands command is issued. The new setup also adds a header file that contains the modem list. This should make adding support for future additional modems easier as long as future modems stick to the same AT command interface that is currently supported by the plugin.

Edited by Aleksander Morgado

Merge request reports