Configure cellular network settings
NetworkManager manages the cellular devices in Digi Embedded Yocto. By default, Digi Embedded Yocto includes a cellular configuration placeholder under /etc/NetworkManager/system-connections/nm.cellular. With this configuration file, NetworkManager will try to bring up any previously detected cellular device. NetworkManager uses ModemManager support to access each identified modem.
Configure Digi XBee Cellular
To configure the Digi XBee Cellular to work as a modem, follow these steps:
- Insert an unlocked SIM card into the XBee Cellular Modem.
- Plug the XBee Cellular into the XBIB-U-DEV board.
- Plug the power supply to the power jack on the XBIB-U-DEV board.
- Use XCTU to configure the following parameters:
- Baud Rate (BD) to 57600. This is the default baud rate that ModemManager expects on every TTY it opens.
- API Enable (AP) to Bypass Mode.
Note See Add radio modules to XCTU to learn how to add your XBee Cellular to XCTU.
See Configure your modules for more information on how to set your XBee Cellular parameters.
- Configure the PDP context 3 of the modem. To do so:
- Open the Serial Console of XCTU (Tools > Serial Console).
- Click Open.
- Configure the serial connection:
- Select the port where your XBee Cellular is connected.
- And its baud rate (57600).
- Type the following AT command in the Console log box:
AT+CGDCONT=3,"IP","<APN>"
where <APN> is the desired APN.
For help determining which APN you are using, see the Digi XBee Cellular Embedded Modem User Guide.
To verify that the change has been applied, issue the following AT command:
AT+CGDCONT?
See Serial console tool for more information.
- The XBee Cellular is configured. Connect it to your ConnectCore:
- Unplug the XBIB-U-DEV board power supply.
- Remove the XBee from the XBIB-U-DEV board.
- Unplug the ConnectCore platform power supply.
- Connect the XBee into its socket.
- Plug power supply to the power barrel connector of the ConnectCore board.
Higher baud rates may also be used (up to 921600 bps). For example, if you want to configure the baud rate to 115200, use XCTU to configure the XBee Cellular to use that baud rate and then edit the XBee Cellular udev rules file to configure ModemManager to use that baud rate when opening the port. To do so, use the ID_MM_TTY_BAUDRATE udev tag:
/lib/udev/rules.d/78-mm-digi-xbee-cellular.rules
DEVPATH=="<platform dependent modem path>", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1", ENV{ID_MM_TTY_BAUDRATE}="115200"
See the XBee Cellular and XCTU documentation for more information.
Set up network configuration on a running system
You can also change the configuration on the target using the nmcli tool.
For example to configure the APN value of the cellular interface:
# nmcli con edit cellular ===| nmcli interactive connection editor |=== Editing existing 'gsm' connection: 'cellular' Type 'help' or '?' for available commands. Type 'describe [<setting>.<prop>]' for detailed property description. You may edit the following settings: connection, gsm, serial, ppp, ipv4, ipv6 nmcli> set gsm.apn <apn_name> nmcli> save nmcli> quit
NetworkManager then uses the information in that file to establish a cellular connection when bringing up the network interface.
You may need to bring the interface up again to use the new configuration:
# nmcli con up cellular
Set network configuration from Digi Embedded Yocto
You can use the following variables in your Digi Embedded Yocto project's conf/local.conf to configure your cellular interface and network provider:
- CELLULAR_APN: Access Point Name (APN) as defined by your cellular provider.
- CELLULAR_USER: Username for authentication.
- CELLULAR_PASSWORD: Password for authentication.
- CELLULAR_PIN: SIM card pin number. Do not define if the SIM card is not locked.
These authentication settings are optional depending on the cellular network and SIM used. See the Mobile Broadband Information web page.
local.conf
CELLULAR_APN = "vzwinternet"
When building images, Yocto will add those fields to the NetworkManager configuration file (/etc/NetworkManager/system-connections/nm.cellular file), within the generated image. For the example above, the following file will be generated:
nm.cellular
[connection] id=cellular type=gsm [gsm] apn=vzwinternet number=*99# [ppp] lcp-echo-failure=3 lcp-echo-interval=5 [ipv4] method=auto [ipv6] method=auto
See Set NetworkManager configuration for information on how to configure the behavior of NetworkManager.
Protocols
The following table shows the default protocol and other protocols supported by these modems.
Modem |
Default protocol |
Other supported protocols |
---|---|---|
Digi XBee Cellular |
Serial |
- |
Telit LE910 |
QMI |
USB serial |
Telit HE910 |
USB serial |
- |
Huawei ME909u |
USB NET |
Serial, MBIM |
UBlox Toby L-200/L-210 |
Serial |
- |
Quectel EC21/EC25 |
QMI |
USB serial |
Instructions for unsupported modems
If Digi Embedded Yocto does not support your modem, Digi can provide a Cellular Integration Guide to help you integrate a modem into your Digi Embedded Yocto system. Contact your local Digi representative or Digi Technical Support to obtain the guide.