Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Telit Cinterion IoT Developer Community

Make the ELS81-E/US MBIM Function Works with Ubuntu Linux 18.04

Tutorial, February 14, 2019 - 10:51am, 13160 views

Because Microsoft drawed up the Mobile Broadband Interface Model (MBIM) specification and pushed it as an open standard, MBIM interface works well with Windows 8, 8.1 and 10. The built-in Windows connection manager also relys on MBIM interface to control of the cellular modules. 

ELS81 and some of newer Cinterion 4G/LTE cellular modules implements the USB MBIM interface. 

Although MBIM is mostly a specification for Microsoft Windows, newer version of Linux distribution can support it. Any distribution contains Linux kernel v3.8 or newer version and libmbim userspace library/utility can support cellular MBIM devices.

In this article, we'll demostrate how to make the ELS81-E/US MBIM function works with Ubuntu Linux 18.04. There are Preparations and Configurations tasks to be done on ELS81 and Ubuntu Linux. Here we assume you all knows how to input AT command to a cellular module/modem, how to input command or apply change to a Linux system. 

Preparation:

1. For ELS81, one has to enable MBIM function on via this AT command:

AT^SSRVSET="actSrvSet",4

2. After applying it please remember to reboot/reset the ELS81 to allow the setting to take effect.

3. To verify if ELS81 has booted-up with MBIM function enabled, you can attached ELS81 via USB with a Linux PC and run:

$ dmesg

If the output looks like this and including cdc_mbim, then ELS81 is good to go:

[  125.072051] usb 2-1.2.4: new high-speed USB device number 14 using xhci_hcd
[  125.176781] usb 2-1.2.4: New USB device found, idVendor=1e2d, idProduct=005d, bcdDevice=17.29
[  125.176783] usb 2-1.2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  125.176785] usb 2-1.2.4: Product: ELSx
[  125.176786] usb 2-1.2.4: Manufacturer: Cinterion Wireless Modules
[  125.882279] cdc_acm 2-1.2.4:1.0: ttyACM0: USB ACM device
[  125.883586] cdc_acm 2-1.2.4:1.2: ttyACM1: USB ACM device
[  125.884274] cdc_acm 2-1.2.4:1.4: ttyACM2: USB ACM device
[  125.884734] cdc_acm 2-1.2.4:1.6: ttyACM3: USB ACM device
[  125.885280] cdc_acm 2-1.2.4:1.8: ttyACM4: USB ACM device
[  125.886183] usbcore: registered new interface driver cdc_acm
[  125.886184] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  125.915537] usbcore: registered new interface driver cdc_ncm
[  125.924838] usbcore: registered new interface driver cdc_wdm
[  125.969215] cdc_mbim 2-1.2.4:1.10: setting rx_*** = 16384
[  125.969703] cdc_mbim 2-1.2.4:1.10: cdc-wdm1: USB WDM device
[  125.970365] cdc_mbim 2-1.2.4:1.10 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-1.2.4, CDC MBIM, fe:00:09:90:0e:42
[  125.970558] usbcore: registered new interface driver cdc_mbim 

4. On the PC to be used, install Ubuntu 18.04 or newer version.

5. Please disable Modem Manager before starting any following steps:

$ sudo systemctl stop ModemManager.service

6. Then please install the libmbim-utils package; this package provides the mbimcli and mbim-network utility

$ sudo apt-get install -y libmbim-utils

For curious people you can find more details about libmbim here: https://www.freedesktop.org/wiki/Software/libmbim/

After the package installed, the preparation has done. What to do next is Configuration.

Configuration:

1. The aforementioned dmesg output cdc_mbim 2-1.2.4:1.10: cdc-wdm1: USB WDM device shows a device node named as cdc-wdm1 was created during the initialization process. This device will be used everywhere for mbimcli via the parameter --device=/dev/cdc-wdm1 . The proxy function to enable parallel commands to module should also be used in most of cases. This is can be done by including --device-open-proxy or -p in every mbimcli requst to the cellular module.

Ex: Use mbimcli to query device capabilities and information (firmware & IMEI code etc.):

$ sudo mbimcli --device=/dev/cdc-wdm1 --device-open-proxy --query-device-caps

[/dev/cdc-wdm1] Device capabilities retrieved:
	      Device type: 'embedded'
	   Cellular class: 'gsm'
	      Voice class: 'no-voice'
	        SIM class: 'removable'
	       Data class: 'gprs, edge, umts, hsdpa, hsupa, lte'
	         SMS caps: 'pdu-receive, pdu-send'
	        Ctrl caps: 'reg-manual'
	     *** sessions: '8'
	Custom data class: 'unknown'
	        Device ID: '004401082447729'
	    Firmware info: 'M2M_7160_ATT_ELS61_V1.1_MBIM_N'
	    Hardware info: 'XMM7160_V1.1_MBIM_NAND_ADAPT_R'

Ex: Enter SIM PIN if required, assuming the PIN code is "1234":

$ sudo mbimcli -d /dev/cdc-wdm1 -p --enter-pin=1234 

2. mbim-network is a tool to simplify data connection setup process. To use it, one has to create a config file containing operator's APN details, the default path of the configuration file is: /etc/mbim-network.conf .

Assuming the APN to be used is "INTERNET", write below content to the configuration file /etc/mbim-network.conf:

APN=INTERNET
APN_USER=
APN_PASS=
APN_AUTH=
PROXY=yes 

If the APN requires a username and password then it is also required to fill in the APN_AUTH protocol type with either PAP, CHAP or MSCHAPV2.

3. If the SIM PIN was not set or already entered via proper command, starting the mbim data connection with the command shown bellow, if successful it will print Network started successfully

$ sudo mbim-network /dev/cdc-wdm1 start

4. After the network started, one can query current IP configuration like this:

$ sudo mbimcli --device=/dev/cdc-wdm0 --device-open-proxy  --query-ip-configuration

[/dev/cdc-wdm0] IPv4 configuration available: 'address, gateway, dns'
     IP [0]: '10.191.22.129/24'
    Gateway: '10.191.22.1'
    DNS [0]: '61.31.233.1'
    DNS [1]: '8.8.8.8'


[/dev/cdc-wdm0] IPv6 configuration available: 'none' 

The data will be used to configure the wwan0 NIC as shown in the aforementioned dmesg output:

[  125.970365] cdc_mbim 2-1.2.4:1.10 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-1.2.4, CDC MBIM, fe:00:09:90:0e:42

5. Apply below command to setup the wwan0 network I/F

$ sudo ip addr add 10.191.22.129/24 dev wwan0 

$ sudo ip link set wwan0 up

$ sudo ip rout add default dev wwan0

6. On Ubuntu 18.04 the DNS setting may have to update via edit /etc/systemd/resolved.conf like below:

$ sudo vi /etc/systemd/resolved.conf

[Resolve]
#DNS=
FallbackDNS=8.8.8.8
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes 

After changing FallbackDNS to have a value 8.8.8.8, remember to restart systemd-resolved service:

$ sudo systemctl restart systemd-resolved.service

Now the MBIM network should be up and running, you can use a browser or some network utility to check and using the cellular Internet!

$ mtr 8.8.8.8

$ mtr www.google.com

I tried command "AT^SSRVSET="actSrvSet",4" on my ELS81 module.

But dmesg does not show new log like : New USB device found, idVendor=1e2d, idProduct=005d

On the Kit, PWR and ASC0 dip switch setting to USB.

I can find ttyUSB0 appear on Ubuntu.

And, some info bellow, what's wrong?

>ati

Cinterion

ELS81-E

REVISION 04.000

>AT^SCFG?

^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","gpio"
^SCFG: "Gpio/mode/DCD0","gpio"
^SCFG: "Gpio/mode/DSR0","gpio"
^SCFG: "Gpio/mode/DTR0","gpio"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","gpio"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","ELS81-E"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/CregRoam","0"
^SCFG: "MEopMode/ExpectDTR","current"
^SCFG: "MEopMode/ExpectDTR","powerup"
^SCFG: "MEopMode/RingOnData","off"
^SCFG: "MEopMode/SoR","off"
^SCFG: "MeOpMode/SRPOM","0"
^SCFG: "Radio/Band/2G","0x00000014"
^SCFG: "Radio/Band/3G","0x00000081"
^SCFG: "Radio/Band/4G","0x08080085"
^SCFG: "Radio/Mtpl/2G","0"
^SCFG: "Radio/Mtpl/3G","0"
^SCFG: "Radio/Mtpl/4G","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","0","0"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","005D","Cinterion Wireless
Modules","ELSx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "Urc/Ringline","local"
^SCFG: "Urc/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","off"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","0"

Hello,

have you rebooted the module after changing actSrvSet parameter?

Best regards,
Adam

I got it works by these steps.

(I work on DevKit)

First, connect to ACS0 USB port and sent actSrvSet",4.
Then, reboot and connect to NATIVE USB port.

After that, ttyACM[0-4] created.
Following the guide, modem works. 

Author

antonyshen's picture
antonyshen