Open main menu

DAVE Developer's Wiki β

DESK-MX6UL-L-TN-0001: Using a 4G IoT modem

Revision as of 16:21, 4 July 2022 by U0007 (talk | contribs) (Created page with "{{InfoBoxTop}} {{AppliesToAXEL ULite AN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table....")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Info Box


200px-Emblem-important.svg.png

This application note has been validated using the kit version in the History table.

Contents

HistoryEdit

Version Date Development Kit version
1.0.0 Jul 2022 DESK-MX6UL-L 1.0.1

IntroductionEdit

Nowadays IoT services are based on the native connectivity peripherals available on the Edge equipment. Sometimes, a 4G modem (if not already integrated in the main board) ahs to added for increase the connectivity capabilities of the Edge itself.

Connecting the IoT modemEdit

Many 4G modems are available in the popular miniPCIe format. Unfortunately, the miniPCIe connector is not an easy connector expansion available in an embedded Edge platform. The most used USB bus, instead, is almost always present and can be easily used for expanding the capabilities of the Edge.

For this purposes, here below an adapter board can be used for getting a miniPCIe modem connectable to a standard USB Type-A port:

 

With this adapter any mniPCIe modem (with USB interface) can be easily connected to the SBC Lynx DAVE Embedded System's IoT Edge platform.

In the following example, the Telit ME910C1-WW 4G modem LTE UE Cat M1/NB1 has been used.

ConfigurationEdit

For using the Telit ME910C1-WW 4G modem, the standard Qualcomm MSM Interface, aka QMI, software interface has be installed in the root file system.

dnf install libqmi

then the qmi commands are present in the rfs: root@desk-mx6ul-lynx:~# qmi qmi-firmware-update qmi-network qmicli root@desk-mx6ul-lynx:~#

Obviously, the Linux kernel has to be configured adding the proper driver for the QMI WWAN interface.

If the modem is connected at the boot, the kernel lists the USB peripherals connected and installs the proper drivers; this can be seen via the command:

root@desk-mx6ul-lynx:~# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ci_hdrc/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 480M
    |__ Port 1: Dev 2, If 1, Class=Vendor Specific Class, Driver=, 480M
    |__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=, 480M
    |__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
root@desk-mx6ul-lynx:~#

QMI commands testingEdit

  • model
root@desk-mx6ul-lynx:~# qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-model
[/dev/cdc-wdm0] Device model retrieved:
        Model: 'ME910C1-WW'
root@desk-mx6ul-lynx:~
  • WAN interface
root@desk-mx6ul-lynx:~# qmicli --device=/dev/cdc-wdm0 --device-open-proxy --get-wwan-iface
wwan0
root@desk-mx6ul-lynx:~
  • get the siognal strenght
root@desk-mx6ul-lynx:~# qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
[/dev/cdc-wdm0] Successfully got signal strength
Current:
        Network 'gsm': '-95 dBm'
RSSI:
        Network 'gsm': '-95 dBm'
ECIO:
        Network 'gsm': '-31.5 dBm'
IO: '-106 dBm'
SINR (8): '9.0 dB'
root@desk-mx6ul-lynx:~
  • get the siognal strenght
root@desk-mx6ul-lynx:~# qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
[/dev/cdc-wdm0] Successfully got signal strength
Current:
        Network 'gsm': '-95 dBm'
RSSI:
        Network 'gsm': '-95 dBm'
ECIO:
        Network 'gsm': '-31.5 dBm'
IO: '-106 dBm'
SINR (8): '9.0 dB'
root@desk-mx6ul-lynx:~

WWAN connectionEdit

The Kernel driver interface has to be configured for using the RAW IP data format, so the following commands have to be issued:

ip link set dev wwan0 down
echo Y > /sys/class/net/wwan0/qmi/raw_ip
ip link set dev wwan0 up

The 4G network operator is identified by the following format:

root@desk-mx6ul-lynx:~# qmicli -d /dev/cdc-wdm0 --nas-get-home-network
[/dev/cdc-wdm0] Successfully got home network:
        Home network:
                MCC: '222'
                MNC: '10'
                Description: 'voda IT'
root@desk-mx6ul-lynx:~#

A connection to the ISP can be made using, again, the qmcli application:

root@desk-mx6ul-lynx:~# qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn=internet.ho-mobile.it,ip-type=4" --client-no-release-cid
...
...