NOTE: This repository is no longer being maintained. Please check most recently updated forks for your issue.
This guide is heavily adapted from the guide published on the waveshare site, available here.
Notes: There seem to be numerous errors and omissions in the instructions as provided by Waveshare. This guide documents my process so that others may avoid many wasted hours of effort. It turns out that you don't need udhcpc
if you already have dhclient
installed. You also don't need minicom
or screen
. There is a way to send and view serial using two terminal windows and built in commands cat
and echo
.
RXD
and TXD
dip switch to set them both to ON
PWR
indicator should come on.NET
light should start blinking. ssh
and complete the rest of the steps.$ sudo apt-get update
$ sudo apt-get install p7zip python3-serial minicom Jetson.GPIO -y
$ wget https://www.waveshare.com/w/upload/9/9b/SIM7600X_4G_for_JETSON_NANO.7z
$ p7zip --uncompress SIM7600X_4G_for_JETSON_NANO.7z
$ echo 200 > /sys/class/gpio/export
$ echo out > /sys/class/gpio/gpio200/direction
$ echo 1 > /sys/class/gpio/gpio200/value
$ echo 0 > /sys/class/gpio/gpio200/value
minicom
NOTE: It's also possible (and possibly easier) to use screen
. If you don't have time to deal with this, skip to the "Pure bash shell" instructions at the end of this section.
At this point, the instructions provided by Waveshare call for using minicom
, but don't provide any hint that it needs to be setup. Instructions for setup can be found here and are summarized below.
$ sudo minicom -s
will greet you with a configuration
menu +-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
Modem and Dialing
and press enter
+--------------------[Modem and dialing parameter setup]---------------------+
| |
| A - Init string ......... |
| B - Reset string ........ |
| C - Dialing prefix #1.... |
| D - Dialing suffix #1.... |
| E - Dialing prefix #2.... |
| F - Dialing suffix #2.... |
| G - Dialing prefix #3.... |
| H - Dialing suffix #3.... |
| I - Connect string ...... CONNECT |
| J - No connect strings .. NO CARRIER BUSY |
| NO DIALTONE VOICE |
| K - Hang-up string ...... |
| L - Dial cancel string .. ^M |
| |
| M - Dial time ........... 45 Q - Auto bps detect ..... No |
| N - Delay before redial . 2 R - Modem has DCD line .. Yes |
| O - Number of tries ..... 10 S - Status line shows ... DTE speed |
| P - DTR drop time (0=no). 1 T - Multi-line untag .... No |
| |
| Change which setting? Return or Esc to exit. Edit A+B to get defaults. |
+----------------------------------------------------------------------------+
configuration
menuScreen and keyboard
and press enter
.q
to toggle Local echo
to Yes
configuration
menuSave setup as dfl
and press enter
Exit from Minicom
and press enter
For a full list of commands, see the AT Command Manual.
minicom
$ sudo minicom -D /dev/ttyUSB2
ATI
ctrl+a
then z
to bring up the options menu.e
to enable echoesc
to return to the console ATI
Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM7600G-H
Revision: SIM7600M22_V2.0
IMEI: 868822040061788
+GCAP: +CGSM
OK
$ cd SIM7600X_4G_for_JETSON_NANO/AT
$ sudo python3 AT.py
If you wait long enough, you'll get the following output:
SIM7600X is ready
Please input the AT command:
ATI
to get product identification info:Please input the AT command:ATI
Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM7600G-H
Revision: SIM7600M22_V2.0
IMEI: 868822040061788
+GCAP: +CGSM
OK
ssh
into your Jetson Nano.$ cat < /dev/ttyUSB2
ssh
into your Jetson Nano and complete the following steps.$ sudo su
# echo -e 'ATI\r' > /dev/ttyUSB2
$ cd
$ mkdir Simcom_wwan
$ cd Simcom_wwan
$ wget https://www.waveshare.com/w/upload/4/46/Simcom_wwan.zip
$ unzip Simcom_wwan.zip
Got help figuring this one out from here.
$ nano Makefile
obj-m:=simcom_wwan.o
simcom_wwanmodule-objs:=module
MAKE:=make
PWD=$(shell pwd)
VER=$(shell uname -r)
KERNEL_BUILD=/lib/modules/$(VER)/build
INSTALL_ROOT=/
default:
$(MAKE) -C $(KERNEL_BUILD) M=$(PWD) modules
clean:
$(MAKE) -C $(KERNEL_BUILD) M=$(PWD) clean
install:
$(MAKE) -C $(KERNEL_BUILD) M=$(PWD) INSTALL_MOD_PATH=$(INSTALL_ROOT) modules_install
ctrl+x
then y
then enter
to save and exit.$ sudo make clean
$ sudo make
$ sudo make install
sudo make install ./simcom*.* /lib/modules/4.9.140-tegra
on the latest image release if the above fails.$ sudo depmod
$ sudo modprobe -v simcom_wwan
simcom_wwan
to confirm successful installation: $ sudo lsmod
$ sudo dmesg | grep simcom
[ 1689.111826] simcom_wwan: loading out-of-tree module taints kernel.
[ 1689.122659] simcom usbnet bind here
[ 1689.125414] simcom_wwan 1-2.3:1.5 wwan0: register 'simcom_wwan' at usb-70090000.xusb-2.3, SIMCOM wwan/QMI device, f6:2d:53:fe:c8:5c
[ 1689.125486] usbcore: registered new interface driver simcom_wwan
wwan0
wwan0
interface is present: $ ifconfig wwan0
wwan0
interface: $ sudo ifconfig wwan0 up
$ sudo su
# echo -e 'AT+CNMP=2\r' > /dev/ttyUSB2
# echo -e 'AT$QCRMCALL=1,1\r' > /dev/ttyUSB2
$ sudo dhclient -1 -v wwan0
Now you can use 4G network!
systemd
serviceThere are scripts included in this repo that allow you to install 4G connectivity at boot using systemd
service files, a preup script and a poststop script to automate the steps in the "Setup Network Interface wwan0
" section above.
It's recommended that you clone the repo locally on the Jetson Nano.
$ git clone https://github.com/phillipdavidstearns/simcom_wwan-setup.git
$ cd simcom_wwan-setup
$ chmod +x install.sh uninstall.sh update.sh
$ sudo ./install.sh
$ sudo ./uninstall.sh
$ git pull; sudo ./update.sh
$ sudo systemctl enable simcom_wwan@wwan0.service
$ sudo systemctl disable simcom_wwan@wwan0.service
$ sudo systemctl start simcom_wwan@wwan0.service
$ sudo systemctl stop simcom_wwan@wwan0.service
$ sudo systemctl status simcom_wwan@wwan0.service
simcom_wwan
kernel module driver:$ sudo nano /etc/modules-load.d/modules.conf
simcom_wwan
to this file if it's not already there.sim_comwwan@wwan0
service wait for the USB device:$ sudo nano /etc/udev/rules.d/99-usb-4g.rules
SUBSYSTEM=="tty", KERNEL=="ttyUSB2", TAG+="systemd", ENV{SYSTEMD_WANTS}+="simcom_wwan@wwan0.service"
$ sudo reboot