A video tutorial on the setup and usage of the 4G modem is available here: x1_4g_


For a text-based explanation see below!

For a high bandwidth modem like the SIM7600 LTE Modem a connection via USB with the QMI Interface (Qualcomm MSM Interface) is recommended. QMI is supported by the latest version of the Raspberry Pi OS (Debian Stretch Kernel >= 4.14.98 )

  1. Install SIM and remove PIN
  2. Set the QMI kernel driver to work in raw-ip mode
  3. Enable the network interface
  4. Connect to the cellular network
  5. Run a raw-ip supporting DHCP client to configure the network interface and routing/DNS

Before inserting the SIM card, remove the PIN from it! e.g. by using your phone :)

Firstly, open the Housing and insert the Micro SIM as explained in this video:

The modem looks very similar when installed in an Andino X1:

Andino Lora - Insert SIM Card

Afterwards, connect the modem to the Raspberry Pi using a Micro USB B cable.

Most commands in this tutorial need to be run as root. Therefore, run

sudo -i

to keep root permissions. Afterwards, update your Pi:

apt-get update
apt-get upgrade

and reboot after the updates are done:

reboot now

Install QMI Tools

apt-get install libqmi-utils udhcpc

This installs two main utilities (qmi-cli tool and qmi-network helper script) these are used for interaction with the modem (see man qmi-cli for more details). Reboot once more:

reboot

For a bugfix in qmi-network and RAW-IP support, edit the qmi-network file:

sudo nano /usr/bin/qmi-network

Jump to line 337. You should now be inside the start_network () block. Here, change the section

    setup_data_format

    if [ -n "$APN" ]; then
        START_NETWORK_ARGS="apn='$APN'"
        if [ -n "$APN_USER" ]; then
            START_NETWORK_ARGS="${START_NETWORK_ARGS},username='$APN_USER'"
            if [ -n "$APN_PASS" ]; then
                START_NETWORK_ARGS="${START_NETWORK_ARGS},password='$APN_PASS'"
            fi
        fi
    fi

to

    echo Y > /sys/class/net/wwan0/qmi/raw_ip
    setup_data_format

    if [ -n "$APN" ]; then
        START_NETWORK_ARGS="apn='$APN',ip-type=4"
        if [ -n "$APN_USER" ]; then
            START_NETWORK_ARGS="${START_NETWORK_ARGS},username='$APN_USER'"
            if [ -n "$APN_PASS" ]; then
                START_NETWORK_ARGS="${START_NETWORK_ARGS},password='$APN_PASS'"
            fi
        fi
    fi

Configuring the APN of your service provider is usually necessary to access the internet. First, create a new file:

nano /etc/qmi-network.conf

Add your APN (refer to Google to find the login data of your service provider)

APN=internet.telekom
APN_USER=eplus
APN_PASS=eplus

Save the file, the quit.

Set the interface to down before making changes:

ifconfig wwan0 down

Now, run

echo Y > /sys/class/net/wwan0/qmi/raw_ip

...and start the interface again:

ifconfig wwan0 up

Finally, start qmi-network for the device

qmi-network /dev/cdc-wdm0 start

and run:

udhcpc -i wwan0

Before following this, reboot your Pi:

sudo reboot now

To start the interface automatically, edit the following file:

sudo nano  /etc/network/interfaces.d/wwan0 

Add this:

iface wwan0 inet manual
     pre-up ifconfig wwan0 down
     pre-up echo Y > /sys/class/net/wwan0/qmi/raw_ip
     pre-up for _ in $(seq 1 10); do /usr/bin/test -c /dev/cdc-wdm0 && break; /bin/sleep 1; done
     pre-up for _ in $(seq 1 10); do /usr/bin/qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength && break; /bin/sleep 1; done
     pre-up /usr/bin/qmi-network /dev/cdc-wdm0 start
     pre-up udhcpc -i wwan0
     post-down /usr/bin/qmi-network /dev/cdc-wdm0 stop

Reboot once again:

sudo reboot now

Now you can start the Network by using this command:

sudo ifup wwan0

stop with

sudo ifdown wwan0

Check with

    route -n        
    ping -I wwan0 8.8.8.8 

The following commands can be used for debugging purposes:

qmicli -d /dev/cdc-wdm0 --nas-get-signal-info
qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
qmicli -d /dev/cdc-wdm0 --nas-get-home-network

qmicli -d /dev/cdc-wdm0 --nas-get-serving-system

qmi-network /dev/cdc-wdm0 status
qmicli -d /dev/cdc-wdm0  --wds-get-packet-service-status

Many thanks to EmbeddedPi and Techship for providing the amazing documentation and setup instructions that this tutorial is based on: