Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
{{InfoBoxTop}}
{{AppliesToAXEL ULite ANAppliesTo SBC Lynx TN}}{{AppliesTo RIALTO SBC TN}}
{{InfoBoxBottom}}
==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 into the main board) ahs has to be added for increase increasing the connectivity capabilities of the Edge itself.
== Connecting the IoT modem ==
== 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 to be installed in the root file system. USB-connected LTE modems present newer interfaces like QMI and MBIM. QMI is a Qualcomm proprietary protocol, while MBIM protocol specification is the result of multi-vendor standardization efforts. They present the modem as a real network interface (typically <code>wwan0</code> or similar) and an additional device (e.g. <code>/dev/cdc-wdm0</code>) for command access.  The [https://github.com/freedesktop/libqmi libqmi] (glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol) is then installed in the root file system using the DFN <code>dnf</code> package manager (see [[DESK-MX6-AN-0003:_Package_Management_with_Yocto_and_DNF | this Application Note]] for more information)
<pre>
root@desk-mx6ul-lynx:~# qmi
qmi-firmware-update qmi-network qmicli
root@desk-mx6ul-lynx:~#
</pre>
|__ 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:~# ls -la /dev/cdc-wdm0
crw------- 1 root root 180, 176 Jul 5 15:54 /dev/cdc-wdm0
root@desk-mx6ul-lynx:~#
</pre>
 
and the related <code>wwan0</code> network interface is created:
<pre class="board-terminal">
root@desk-mx6ul-lynx:~# ifconfig wwan0
wwan0 Link encap:Ethernet HWaddr 9a:a3:50:59:88:51
inet6 addr: fe80::98a3:50ff:fe59:8851/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:9038 (8.8 KiB)
 
root@desk-mx6ul-lynx:~#
</pre>
== QMI commands testing ==
* get model
<pre class="board-terminal">
root@desk-mx6ul-lynx:~# qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-model
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 strengthCurrent: 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
<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--device-open-proxy
...
...
{{WorkInProgress}}
 
Once the connection has been established, the IP address can be assigned using the <code>dhcp</code> client, for example:
 
<pre>
udhcpc -q -f -i wwan0
</pre>
== Useful list of ''qmi'' commands ==
* Get modem model: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --dms-get-model</code>* Get modem Manufacturer: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --dms-get-manufacturer</code>* Get firmware version: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --dms-get-revision</code>* Get modemd IMEI: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --dms-get-ids</code>* Get SIM card status: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --uim-get-card-status</code>* Get wwan kernel interface: <code>qmicli --device=d /dev/cdc-wdm0 --device-open-proxy --get-wwan-iface</code>* Get IP mode data format (expected): <code>qmicli --device=d /dev/cdc-wdm0 --get-expected-data-format</code>
* Get the operator network name: <code>qmicli -d /dev/cdc-wdm0 --nas-get-home-network</code>
* Scan the available network operators: <code>qmicli -d /dev/cdc-wdm0 --nas-network-scan</code>
* Get the signal strenght: <code>qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength</code>
8,226
edits