Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

USB Connect LPWA based on Qualcomm Chipsatz supporting QMI interface. QMI is Qualcomm's proprietary protocol for using Virtual Ethernet on the USB-Connect LPWA to establish IP connectivity with the mobile operator. It can replace the AT commands or be used together with the serial port. Software libqmi can be used to install the QMI interface for modules. This is a brief tutorial to establish the connection.

Step 1: Install the required packages

sudo apt-get update
sudo apt-get install libqmi-utils udhcpc
sudo reboot

Step 2: Stop and disable the following common packages the next time you boot to ensure proper modem operation and to avoid interference.

sudo systemctl stop ModemManager.service
sudo systemctl disable ModemManager.service
sudo reboot

Step 3: Now make sure that the module is ready for use, this can be done by using the following command

sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode

If not, this should bring you back online:

sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'

Step 4: Shutting down the interface

sudo ip link set wwan0 down

Step 5: The next step is to configure the network interface for the raw-ip protocol.

echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip

Step 6: Restart the interface

sudo ip link set wwan0 up

Step 7: You can confirm the data format with

sudo qmicli -d /dev/cdc-wdm0 --wda-get-data-format

You will get something similar to that:

[/dev/cdc-wdm0] Successfully got data format
                   QoS flow header: no
               Link layer protocol: 'raw-ip'
  Uplink data aggregation protocol: 'disabled'
Downlink data aggregation protocol: 'disabled'
                     NDP signature: '0'
Downlink data aggregation max datagrams: '0'
Downlink data aggregation max size: '0'

Step 8: Connect to the mobile network by changing the part of the 'YOUR_APN', 'YOUR_USERNAME', 'YOUR_PASSWORD' lines according to your SIM card details. Remove these options if a user name and password are not required.

sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='YOUR_APN',username='YOUR_USERNAME',password='YOUR_PASSWORD',ip-type=4" --client-no-release-cid

You will get something similar to that:

[/dev/cdc-wdm0] Network started
	Packet data handle: '2198768960'
[/dev/cdc-wdm0] Client ID not released:
	Service: 'wds'
	    CID: '2'

Step 9: Configure the IP address and default route using udhcpc

sudo udhcpc -q -f -i wwan0

You will get something similar to that:

sudo udhcpc -q -f -i wwan0
udhcpc: started, v1.30.1
No resolv.conf for interface wwan0.udhcpc
udhcpc: sending discover
udhcpc: sending select for 100.67.114.164
udhcpc: lease of 100.67.114.164 obtained, lease time 7200
Too few arguments.
Too few arguments.

Step 10: Check the assigned IP address and test the connection.

ifconfig wwan0

You will get something similar to that:

wwan0: flags=4305  mtu 1500
        inet 100.67.114.164  netmask 255.255.255.248  destination 100.67.114.164
        inet6 fe80::abc4:a1b5:5e84:92f2  prefixlen 64  scopeid 0x20
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 3  bytes 640 (640.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 2694 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Step 11: To test the connection

ping -I wwan0 -c 5 exelonix.com

You will get something similar to that:

PING exelonix.com (5.189.154.234) from 10.254.46.34 wwan0: 56(84) bytes of data.
64 bytes from mail.exelonix.com (5.189.154.234): icmp_seq=1 ttl=50 time=113 ms
64 bytes from mail.exelonix.com (5.189.154.234): icmp_seq=2 ttl=50 time=72.4 ms
64 bytes from mail.exelonix.com (5.189.154.234): icmp_seq=3 ttl=50 time=1426 ms
64 bytes from mail.exelonix.com (5.189.154.234): icmp_seq=4 ttl=51 time=1568 ms
64 bytes from mail.exelonix.com (5.189.154.234): icmp_seq=5 ttl=50 time=1444 ms

--- exelonix.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 5173ms
rtt min/avg/max/mdev = 72.382/924.626/1567.907/681.326 ms, pipe 2
  • No labels