2

I have a SIM7600 4G hat from Waveshare and a Raspberry Pi 4. Based on Waveshare documentation (https://www.waveshare.com/wiki/Raspberry_Pi_networked_via_RNDIS), I connected the hat and configured it for RNDIS communication as followed:

  1. Check that the device is recognized:
    pi@pi1:~ $ lsusb 
    Bus 001 Device 004: ID 1e0e:9011 Qualcomm / Option 
    
  2. I configured the hat mode with the correct PID value:
    AT+CUSBPIDSWITCH=9011,1,1
    
  3. I now have a new usb0 interface with an IP address (after using dhclient -v usb0). However, reaching Internet over this interface does not work:
    pi@pi1:~ $ ping -I usb0 google.com
    PING  (172.217.168.78) from 192.168.225.44 usb0: 56(84) bytes of data.
    c^C
    ---  ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 88ms
    
    

The driver rndis_host seems to be loaded correctly:

pi@pi1:~ $ lsmod | grep rndis
rndis_wlan             40960  0
rndis_host             16384  1 rndis_wlan
cdc_ether              16384  1 rndis_host
cfg80211              675840  2 rndis_wlan,brcmfmac
pi@pi1:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=Communications, Driver=rndis_host, 480M
        |__ Port 1: Dev 5, If 1, Class=CDC Data, Driver=rndis_host, 480M
        |__ Port 1: Dev 5, If 2, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 5, If 3, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 5, If 4, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 5, If 5, Class=Vendor Specific Class, Driver=option, 480M
        |__ Port 1: Dev 5, If 6, Class=Vendor Specific Class, Driver=option, 480M

What am I doing wrong? Note that the hat can successfully send SMS, do calls and reach Internet with AT commands.

1
  • Do you have a gateway? Check route on the PI and see if you have a default entry pointing to your router. You may need to talk to your sim provider for details.
    – user130616
    Mar 3, 2021 at 16:20

1 Answer 1

3

A couple of things:

First, verify with lsusb -t that the Linux in-kernel driver rndis_host driver is loaded correctly. You should get something like this:

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
|__ Port 4: Dev 6, If 3, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 6, If 1, Class=CDC Data, Driver=rndis_host, 480M
|__ Port 4: Dev 6, If 6, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 6, If 4, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 6, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 6, If 0, Class=Communications, Driver=rndis_host, 480M
|__ Port 4: Dev 6, If 5, Class=Vendor Specific Class, Driver=option, 480M

Second, in order to use SIM7600 in RNDIS mode, you have to configure the APN twice in slot 1 and 6:

AT+CGDCONT=1,"IPV4V6","<your_apn>"
AT+CGDCONT=6,"IPV4V6","<your_apn>"

Obs: If your APN needs aditional info (user,password, etc) check AT+CGAUTH in SIM7600 AT manual.

After you configure your APN, you have to reboot the SIM7600 or disconnect/connect to network with:

AT+CFUN=0
AT+CFUN=1 

Then try again with:

dhclient -v usb0
ping -I usb0 8.8.8.8

If you got internet connection, remember to set priority of that interface in /etc/dhcpcd.conf or maybe your wifi or ethernet connection will continue to be the default gateway (check with route)

Good luck!

1
  • This worked! Thank you very much. The APN configuration was missing.
    – Nakrule
    Mar 8, 2021 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.