RNDIS Dial-Up

From Waveshare Wiki
Jump to: navigation, search

Hardware Connection

Please connect SIM7600 and Raspberry Pi's USB interface through a USB cable, through UART connection can also be dial-up Internet access such as PPP, UART speed is slower, if you want to realize 4G fast Internet access, NDIS, and RNDIS are required to connect the USB, that is, it is a USB network card, as shown in the figure:
Raspberry Pi RNDIS Dial-up01.png

Configure RNDIS Mode

  • SIM7600 module is connected to the Raspberry Pi or Jetson Nano through the USB port, and then execute the command to see if the ttyUSB2 can be recognized normally. If possible, open the port through minicom:
ls /dev/ttyUSB*
sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2
  • Send the following command through minicom, then wait for the module to restart
AT+CUSBPIDSWITCH=9011,1,1

SIM7600X-RNDIS-1.png

  • ifconfig to see if a usb0 network card is recognized
ifconfig

SIM7600X-RNDIS-2.jpg

  • Get the IP address (if there is no USB0 network card, it is also obtained through this command):
sudo dhclient -v usb0

SIM7600X-RNDIS-3.jpg

  • Test whether ping Baidu through usb0 wireless network card can connect to the Internet normally:
ping -I usb0 www.baidu.com

Note: If you need to switch to the Windows system, or restore the default settings of the module, you can send the following command through the serial port to restore:

AT+CUSBPIDSWITCH=9001,1,1

If you are using a Jetson Nano, it may be a usb1 wireless network card, and the usb0 of the corresponding command above is changed to usb1:

Set to Enable Automatic IP Acquisition (Optional)

Some Linux systems may need to enter the command to get IP after reboot, if every time you boot up, it will be more troublesome to get IP manually, you can follow the steps below to set the boot up to get IP automatically.
  • Set the boot-up and open the Raspberry Pi boot configuration script:
sudo nano /etc/rc.local
  • Add the startup command to the penultimate line, noting that it is the absolute path to your runtime internet file, which is the line above exit 0.
sudo dhclient -v usb0
  • Verify that the boot script is in effect.
sudo /etc/rc.local

Load USB Device Descriptors

After SIM7600X changed to 9011 mode, some Linux systems cannot recognize ttyUSB*, you can load the USB device descriptor with the following command.
  • Ubuntu system:
sudo su
sudo echo 1e0e 9011 > /sys/bus/usb-serial/drivers/generic/new_id
  • Raspian and Centos system
sudo modprobe option
sudo sh -c 'echo "1e0e 9011" > /sys/bus/usb-serial/drivers/option1/new_id'

More Dail-up Methods