Changes

Jump to: navigation, search

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

4,641 bytes added, 16:21, 4 July 2022
Created page with "{{InfoBoxTop}} {{AppliesToAXEL ULite AN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table...."
{{InfoBoxTop}}
{{AppliesToAXEL ULite AN}}
{{InfoBoxBottom}}

{{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table.}}

==History==

{| class="wikitable" border="1"
!Version
!Date
!Development Kit version
|-
| 1.0.0
| Jul 2022
|[[DESK-MX6UL-L/General/Release_Notes#DESK-MX6UL-L_1.0.1|DESK-MX6UL-L 1.0.1]]
|-
|}

==Introduction==
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 modem ==
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:

[[File:MiniPCIe-USB-Adapter.png | 500px]]

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 [https://www.telit.com/devices/me910c1-series/ Telit ME910C1-WW 4G modem] LTE UE Cat M1/NB1 has been used.

== Configuration ==
For using the Telit ME910C1-WW 4G modem, the standard [https://en.wikipedia.org/wiki/Qualcomm_MSM_Interface Qualcomm MSM Interface], aka QMI, software interface has be installed in the root file system.

<pre>
dnf install libqmi
</pre>

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

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:
<pre class="board-terminal">
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:~#
</pre>

== QMI commands testing ==
* model
<pre class="board-terminal">
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:~
</pre>
* WAN interface
<pre class="board-terminal">
root@desk-mx6ul-lynx:~# qmicli --device=/dev/cdc-wdm0 --device-open-proxy --get-wwan-iface
wwan0
root@desk-mx6ul-lynx:~
</pre>
* get the siognal strenght
<pre class="board-terminal">
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:~
</pre>
* get the siognal strenght
<pre class="board-terminal">
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:~
</pre>

== WWAN connection ==
The Kernel driver interface has to be configured for using the <code>RAW IP</code> data format, so the following commands have to be issued:
<pre>
ip link set dev wwan0 down
echo Y > /sys/class/net/wwan0/qmi/raw_ip
ip link set dev wwan0 up
</pre>

The 4G network operator is identified by the following format:
<pre class="board-terminal">
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:~#
</pre>

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

<pre class="board-terminal">
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
...
...
</pre>
8,286
edits

Navigation menu