dk1301
Posts: 1
Joined: Mon Sep 23, 2019 2:03 pm

Waveshare SIM7600E-H is not initiated after reboot when connected to Raspberry Pi 4 model B

Wed Oct 16, 2019 8:23 am

I have connected the new Raspberry Pi 4 model b with the waveshare SIM7600E-H 4G HAT. The os is Raspbian Buster Lite. The configuration I use is the following:
  • 1) The jumpers are placed in the middle position.
    2) The shield connected onto the RPi gpio.
    3) There is also a connection between the pi and the waveshare "USB" port (not "USB to UART")
    4) raspi-config > Interfacing Options > Serial = Login shell over serial = NO Serial port hardware enabled = YES
    5) /boot/config.txt has enable_uart=1
According to the wavesahre manual in order to initialize this 4g hat one should give the following command:

Code: Select all

./sim7600_4G_hat_init 
which consists of the follwoing commands :

Code: Select all

echo "4" > /sys/class/gpio/export
sleep 0.1
echo "out" > /sys/class/gpio/gpio4/direction
echo "0" > /sys/class/gpio/gpio4/value
echo "6" > /sys/class/gpio/export
sleep 0.1
echo "out" > /sys/class/gpio/gpio6/direction
echo "0" > /sys/class/gpio/gpio6/value
It's also recommended to put the following command at /etc/rc.local file

Code: Select all

sh /home/pi/SIM7600X/sim7600_4G_hat_init
However after giving sudo reboot the 4g hat is not initiated but one should push the power button.
After power off and on the pi the initiation is always successful.
Is there a software way to achieve the hat initiation after every reboot of the pi?

venusaran91
Posts: 1
Joined: Fri Dec 20, 2019 3:54 am

Re: Waveshare SIM7600E-H is not initiated after reboot when connected to Raspberry Pi 4 model B

Fri Dec 20, 2019 4:03 am

Are you using the same GPIO pins for any other purposes(for any inputs / outputs)? If yes, please make sure not to use the pins 4 and 6(as stated in the startup script) simultaneously during the process. I mean if a program using the same pin and during it's execution if it set the GPIO value as LOW for the specific pin, then the power of LTE HAT will be turned off.

djzuluroot
Posts: 6
Joined: Tue Apr 21, 2020 12:36 am

Re: Waveshare SIM7600E-H is not initiated after reboot when connected to Raspberry Pi 4 model B

Tue Apr 21, 2020 3:15 am

I am having the same issue.

When I add:

This one is important - when you reboot the pi, the SIM7600 module's cellular radio is OFF and needs to be turned ON before you can see the mobile network. One way is to use a script which pulls the GPIO pin 4 LOW for a second or two (as per this post: https://lb.raspberrypi.org/forums/viewt ... 1#p1368015), but a more elegant way I think is to use the newly installed qmi utils:
Code: Select all

Code: Select all

pi:~$ sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'
After reboot, the network is Offline.

Code: Select all

sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
[/dev/cdc-wdm0] Operating mode retrieved:
        Mode: 'low-power'
        Reason: 'unknown'
        HW restricted: 'no'

Code: Select all

pi@pi:~ $ sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
[/dev/cdc-wdm0] Operating mode retrieved:
        Mode: 'low-power'
        Reason: 'unknown'
        HW restricted: 'no'
pi@pi:~ $
pi@pi:~ $ sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'
[/dev/cdc-wdm0] Operating mode set successfully
pi@pi:~ $ sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
[/dev/cdc-wdm0] Operating mode retrieved:
        Mode: 'online'
        HW restricted: 'no'

User avatar
Rbert
Posts: 43
Joined: Mon May 01, 2017 8:57 pm
Location: Amsterdam

Re: Waveshare SIM7600E-H is not initiated after reboot when connected to Raspberry Pi 4 model B

Thu Apr 23, 2020 9:52 pm

Not sure if it helps, but I had the same with SIM7070E on a development board connected to my RPi3B.
After a reboot I did not see a USB device after entering "lsusb"
I resolved this by toggeling the MODEM_ON pin which I connected with my development board to a GPIO.
This basically implies a short pull-down to 0.
After the MODEM_ON toggle "lsbusb" shows the USB device.
In the startup script I simply toggle the GPIO, wait a few seconds and start loading the drivers.

A final remark on the development board which might not be related to your situation.
Due to the fact that the SIM7070E operates at different voltage level, I continuesly set the GPIO as a input which results in a floating "high".
When I want to create a MODEM_ON I change it into an output with logical 0.
After that I change it back to an input, which is floating and implies a "high"

Hope it might help you.

Return to “Networking and servers”