cvh17
Posts: 4
Joined: Mon Jul 10, 2017 10:07 pm

Power on a modem at boot

Thu Nov 23, 2017 8:31 pm

I have two modem HATs.
Unit A is one of these: https://www.itead.cc/wireless/gsm-gprs- ... -v2-0.html.
Unit B is one of these: https://www.waveshare.com/product/modul ... ss-hat.htm

Using both a Pi model B+ and a Pi Zero, I can successfully turn on Unit A at boot by the addition of these commands to /etc/rc.local:

Code: Select all

echo 17 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio17/direction
echo 1 > /sys/class/gpio/gpio17/value
Unit B does not turn on automatically with these commands. Can anyone suggest a way of getting Unit B to turn on automatically, please?

sora03
Posts: 118
Joined: Mon Dec 29, 2014 4:11 pm

Re: Power on a modem at boot

Fri Nov 24, 2017 10:09 am

have you tried using a python code. use the gpiozero they have lot of examples
https://gpiozero.readthedocs.io/

cvh17
Posts: 4
Joined: Mon Jul 10, 2017 10:07 pm

Re: Power on a modem at boot

Fri Nov 24, 2017 2:42 pm

Thank you, I haven't heard of GPIO Zero, and will give that a try. I'll report back on success or otherwise.

cvh17
Posts: 4
Joined: Mon Jul 10, 2017 10:07 pm

Re: Power on a modem at boot

Fri Nov 24, 2017 3:12 pm

I've found the schematic for Unit B here: https://www.waveshare.com/w/upload/2/20 ... matic_.pdf. Looking at the section in the middle at the bottom (titled 'RPI GPIO'), it would appear that the power gpio is number 17, and so the code I have in /etc/rc.local should work (but doesn't) -- have I misunderstood the schematic? I've not dealt with gpio in the past.

sora03
Posts: 118
Joined: Mon Dec 29, 2014 4:11 pm

Re: Power on a modem at boot

Sat Nov 25, 2017 7:04 am

cvh17 wrote:
Fri Nov 24, 2017 3:12 pm
I've found the schematic for Unit B here: https://www.waveshare.com/w/upload/2/20 ... matic_.pdf. Looking at the section in the middle at the bottom (titled 'RPI GPIO'), it would appear that the power gpio is number 17, and so the code I have in /etc/rc.local should work (but doesn't) -- have I misunderstood the schematic? I've not dealt with gpio in the past.
GPIO 17 on the schematics is the physical PIN number the command that you used in the first post refers to the Broadcom pin numbering (BCM17)
I did not know the power pin based on the schematics. a pin reference can be found at: pinout.xyz
Is there any documentation besides the schematics on your hardware board?

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 39 guests