LTE wireless on SIM7600G-H 4G HAT (B) for Raspberry Pi

After coming across the recent and well written article Using 4G LTE wireless modems on a Raspberry Pi, I decided to give it a try myself. I looked at his parts list, and then ended up going in a different direction by buying an all-in-one unit designed explicitly for the Raspberry Pi Zero.

What’s on the Board
  1. SIM7600G-H
  2. FE1.1S USB HUB chip
  3. NAU8810 audio decoder
  4. RT9193-33 voltage translator
  5. USB HUB input D+/D- pogo pin: for Raspberry Pi Zero/Zero W MicroUSB connector: for other Raspberry Pi boards or PC
  6. Pogo pin power supply 5V: connects to 5V pin of Zero/Zero W, up to 2A current GND: connects to GND pin of Zero/Zero W
  1. USB extended ports USB1~USB2: USB-A connectors USB3: solder pad
  2. SIM card slot supports 1.8V/3V SIM card
  3. 3.5mm earphone/mic jack
  4. MAIN antenna connector
  5. AUX auxiliary antenna connector
  6. GNSS antenna connector
  7. Power indicator
  8. Network status indicator

I’m using Google Fi Unlimited Plus as my network on my phone right now, and one of its features is the ability to have multiple data only devices using part of your data allocation. That makes experimentation with a device like this fairly easy as I was able to order a data sim from Google and put it in the device and it just worked.

I’d never heard of pogo pins before. These are spring loaded contacts that line up with pads on the Raspberry Pi Zero to make electrical contact. They worked the first time I screwed everything together, but when I took it apart and put it back together a second time the board wasn’t recognized. I removed power, pushed down the pins with some tweezers, restored power, and the board was recognized again.

wim@WimPiZeroWCamera:~ $ lsusb
Bus 001 Device 003: ID 1e0e:9001 Qualcomm / Option
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
wim@WimPiZeroWCamera:~ $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 3, If 1, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 3, If 2, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 3, If 3, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 3, If 4, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 3, If 5, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
wim@WimPiZeroWCamera:~ $ sudo apt install libqmi-utils udhcpc ifmetric

I went through the test commands from Jeff Geerling’s post related to QMI Mode setup, then created a config file for my wwan0 interface:

auto wwan0
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 sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='h2g2',ip-type=4" --client-no-release-cid
     pre-up udhcpc -i wwan0
     pre-up /usr/sbin/ifmetric wwan0 400
     post-down /usr/bin/qmi-network /dev/cdc-wdm0 stop
You can see where I added the ifmetric command as the last pre-up line
Route and Ping from interfaces.

You can see in the image above that my Wi-Fi network is running IPv6 and the default ping uses that interface, while specifying the wwan0 interface causes the traffic to travel a different path.

ifconfig details.
wim@WimPiZeroWCamera:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:7c:6a:80 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.53/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0
       valid_lft 10482sec preferred_lft 9132sec
    inet6 2604:4080:1304:8010:8a38:1e12:3b21:5443/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 24sec preferred_lft 14sec
    inet6 fe80::ea0d:3fe8:b6c4:da64/64 scope link
       valid_lft forever preferred_lft forever
3: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/none
    inet 100.198.30.32/26 scope global wwan0
       valid_lft forever preferred_lft forever
wim@WimPiZeroWCamera:~ $ sudo qmicli -d /dev/cdc-wdm0 --nas-get-signal-info
-get-serving-system
sudo qmi-network /dev/cdc-wdm0 status
sudo qmicli -d /dev/cdc-wdm0  --wds-get-packet-service-status[/dev/cdc-wdm0] Successfully got signal info
LTE:
        RSSI: '-74 dBm'
        RSRQ: '-12 dB'
        RSRP: '-102 dBm'
        SNR: '4.4 dB'
wim@WimPiZeroWCamera:~ $ sudo qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
[/dev/cdc-wdm0] Successfully got signal strength
Current:
        Network 'lte': '-74 dBm'
RSSI:
        Network 'lte': '-74 dBm'
ECIO:
        Network 'lte': '-2.5 dBm'
IO: '-106 dBm'
SINR (8): '9.0 dB'
RSRQ:
        Network 'lte': '-12 dB'
SNR:
        Network 'lte': '4.4 dB'
RSRP:
        Network 'lte': '-102 dBm'
wim@WimPiZeroWCamera:~ $ sudo qmicli -d /dev/cdc-wdm0 --nas-get-home-network
[/dev/cdc-wdm0] Successfully got home network:
        Home network:
                MCC: '310'
                MNC: '260'
                Description: 'T-Mobile'
wim@WimPiZeroWCamera:~ $ sudo qmicli -d /dev/cdc-wdm0 --nas-get-serving-system
[/dev/cdc-wdm0] Successfully got serving system:
        Registration state: 'registered'
        CS: 'attached'
        PS: 'attached'
        Selected network: '3gpp'
        Radio interfaces: '1'
                [0]: 'lte'
        Roaming status: 'off'
        Data service capabilities: '1'
                [0]: 'lte'
        Current PLMN:
                MCC: '310'
                MNC: '260'
                Description: '����.��i'
        Roaming indicators: '1'
                [0]: 'off' (lte)
        3GPP time zone offset: '-420' minutes
        3GPP daylight saving time adjustment: '1' hours
        3GPP location area code: '65534'
        3GPP cell ID: '45023373'
        Detailed status:
                Status: 'available'
                Capability: 'cs-ps'
                HDR Status: 'none'
                HDR Hybrid: 'no'
                Forbidden: 'no'
        LTE tracking area code: '11316'
        Full operator code info:
                MCC: '310'
                MNC: '260'
                MNC with PCS digit: 'yes'
wim@WimPiZeroWCamera:~ $ sudo qmi-network /dev/cdc-wdm0 status
Profile at '/etc/qmi-network.conf' not found...
Getting status with 'qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status  '...
Status: connected
wim@WimPiZeroWCamera:~ $ sudo qmicli -d /dev/cdc-wdm0  --wds-get-packet-service-status
[/dev/cdc-wdm0] Connection status: 'connected'
extra information

One thought on “LTE wireless on SIM7600G-H 4G HAT (B) for Raspberry Pi

  1. Pingback: More Networking with SIM7600G-H 4G HAT (B) for Raspberry Pi | WimsWorld

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s