Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Code Block
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.

Code Block
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

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

If not, this should bring you back online:

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

Step 4: Shutting down the interface

Code Block
sudo ip link ifconfigset wwan0 down

Step

...

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

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

Step

...

6: Restart the interface

Code Block
sudo ip link ifconfigset wwan0 up

...

Step 7: You can confirm the data format with

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

You will get something similar to that:

Code Block
[/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.

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

...

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

Step

...

9:

...

Configure the IP address

...

and default route using udhcpc

Code Block
sudo udhcpc -q -f -i wwan0

You will get something similar to that:

Code Block
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 10100.16567.xx114.xx164
udhcpc: lease of 10100.16567.xx114.xx164 obtained, lease time 7200
Too few arguments.
Too few arguments.

Step

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

Step 1: …

...

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

Code Block
ifconfig wwan0

You will get something similar to that:

Code Block
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

Code Block
ping -I wwan0 -c 5 exelonix.com

You will get something similar to that:

Code Block
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