.. _wwan: WWAN ==== Overview -------- Supported modems and firmware (Caution: older versions may not work stable or miss features!) - u-blox TOBY-L210, firmware 17.00,A01.03 - u-blox LARA-L6, firmware 04.22,A00.01 Preparation ----------- 1. Insert SIM Card in sim slot Usage ----- All the configuration can be done by NetworkManager but sometimes it can be useful to check lower level configurations with ModemManager. Firmware update ~~~~~~~~~~~~~~~ .. warning:: Downgrading a WWAN modem will likely lead to a broken modem On some devices, the modem is delivered with an old firmware, reported by `list-devices` as "obsolete" or "deprecated". It is highly recommended to upgrade it. How to check firmare version and upgrade is explain at :ref:`fw-update`. Initial configuration ~~~~~~~~~~~~~~~~~~~~~ The WWAN modem is configured at each boot by a script named wwan-config. This script is using the configuration file `/etc/wwan/wwan0.conf` to setup the modem before letting ModemManager handle it. This configuration file is divided in three sections: * apn: must configured to use a private APN * sim: is used to choose between the different sim cards available on the device * ublox: low level configurations for ublox modem. This should normaly not be modified APN configuration ################# .. note:: This section only applies on a device with a u-blox TOBY-L2 modem. for other modems, it will be ignored. When using a private APN, this section has to be configured with the following fields: :: [apn] apn= user= password= When the default APN provided by the network when using LTE must be used, make sure that this fields are not set. After any change to this file, the system has to rebooted or the following command to be run: .. code-block:: console $ systemctl restart wwan-config@wwan0 SIM card configuration ###################### This section is used to choose which SIM card to use with the modem. There are four SIM cards slot that can be used by the modem. .. code-block:: none [sim] SIM= Where can be : * auto: The script will detect if a physical SIM card is present and switch to m2m SIM card (soldered to the board) if it is not the case * sim1: Use the physical SIM card on the main board * m2m: Use the m2m SIM card soldered on the main board * ui-top: Use the SIM card that is on top of the User Interface * ui-btm: Use the SIM card that is on the bottom of the User Interface After any change to this file, the system has to be rebooted or the following command to be run: .. code-block:: console $ systemctl restart wwan-config@wwan0 NetworkManager commands ~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console $ # Create connection $ nmcli c add type gsm con-name wwan ifname "" ipv6.method ignore gsm.apn $ # Create connection with APN authentication $ nmcli c add type gsm con-name wwan ifname "" ipv6.method ignore \ gsm.apn gsm.username gsm.password $ # Set PIN number $ nmcli c modify wwan gsm.pin $ # Start the connection $ nmcli c up wwan ModemManager configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console $ mmcli -L # list modems and get modem id $ mmcli -M # list modems in a loop, useful when waiting after a reset $ mmcli -m 0 # See state of the modem 0 $ mmcli -i 0 --pin= # Entering pin on modem 0 $ mmcli -m 0 -r # Reset the modem Low level configuration / modem debugging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It can sometimes be useful to send directly some commands to the modem. The preferred way to do this is to ask wwan-config to stop all modem operations and then use a tool like minicom to communicate directly with the modem as in the following commands: .. note:: ModemManager is monitored by wwan-config so it cannot be stopped without wwan-config restarting it. Stopping wwan-config on the other hand will also power off the modem. .. code-block:: console # USR1 asks wwan-config to stop modem operations kill -s USR1 $(