-
• #2
Will try to work with it, thanks!
Did you come across a serial command to power the GSM on and off, for a sim800?
-
• #3
As far as I know the SIM800/900 family can only be powered on and off with the PWRKEY pin.
-
• #4
As far as I can tell there isn't a way - there's some kind of 'sleep mode', but that may not be enough.
It's easy enough to wire that pin up to Espruino - and then I think you use
digitalPulse(pwr_pin, 1, 2000)
- the pin actually needs a pulse on it for ~2 seconds to wake/sleep the SIM800. -
• #5
But shouldn't it be able to simply connect and disconnect the whole module like you would normally. And then turn it on when you need it? Would it always need a physical press of a button to get going? Must be some kind of hack to achieve that...
-
• #6
I'm not sure I understand?
The modules usually have a
PWR
pin - and Espruino/Puck.js can just pulse that withdigitalPulse
to turn the SIM800 on or off. -
• #7
that is what i was thinking, then it uses zero. And for sending an sms, just turn it on first :)
Thanks again
-
• #8
maybe an AT command for turning on/off the cellular radio would have the same effect as far as power consumption is concerned, do you know if such an AT command exists?
Mind you my thinking isn't hindered by practical experience... AT commands maybe deal with just the network, not the inner workings of the module itself
-
• #9
-
-
• #10
I don't think there will be an AT command (except for sleep modes). It's serial, so you need a computer on the other end to listen for the serial data - hence the modem is never going to be able to shut down fully if you intend to wake it up with an AT command.
The PWR pin is just one extra wire though - bringing the total to 5. It's not that bad!
-
• #11
still waiting for my sim800L, just not seeing a power on the board, not all models seem to have that.
-
• #12
Do you have a link to the board that you ordered?
-
• #14
would be happy to get another one if needed though.. if you know a more suitable one
-
• #15
Ok, it looks from https://buyhere22.com/components/sim800-gsm-3.pdf like you can do:
sms.at.write("AT+POWD=1\r\n");
which will power down the SIM800 - then presumably you can pulse the Reset wire (which is on that breakout board) to reset it and start it back up again.
It's a bit more of a faff though.
-
• #16
ok, will take some time to try this.
What a brilliant thing it is, best toy ever :)
-
• #17
Is there a way to get the response back in the console when i send an AT command?
second,
The AT+POWD=1 command is problematic, it turns the phone off, but after ten seconds it automatically restarts.
Is there an easy way to 'physically' take the 5v off off the SIM800 controlled by the Puck? The Sim800 needs 5v with up to 2 amps so can't get power from the Puck itself right.
-
• #18
Is there an easy way to 'physically' take the 5v off off the SIM800 controlled by the Puck? The Sim800 needs 5v with up to 2 amps so can't get power from the Puck itself right.
you can use a mosfet to switch the Sim800 on and off, check this link:
-
• #19
perfect, going to try that.
Thanks!
-
• #20
To get a response back, take a look at what I do in the module itself: https://github.com/espruino/EspruinoDocs/blob/master/modules/ATSMS.js#L111
You can use
at.cmd
- which sends a command and returns the response (orundefined
if there was no response after a timeout) -
• #21
when you use a mosfet to swith the gsm module on and off, and you use a serial connection to control the gsm with Rx,Tx, V and GND, would it be possible to use the V and GND from the serial connection to also turn the gsm on?
Since they are on and off at the same time.. That would save you connections to the board
-
• #22
I just realized that the serial connection doesn't need the 3V. It is just ground, Tx and Rx right?
-
• #23
Yes, that's right - just the 3 wires. I'd still recommend using the AT POWD command to shut it off and then just use the RST wire to start it up - no mosfet required.
-
• #24
sorry, how can i send any AT command?
-
• #25
I mentioned a few posts ago: http://forum.espruino.com/conversations/308106/#13762713
Hi!
Just an update to say that I've added a new module for SMS text messaging, to be found here: http://www.espruino.com/ATSMS
This works on most Espruino devices, and should work on most different types of GSM modem - but let me know if not!
For instance for Puck.js, I used D1 and D2:
Note that using the serial port on Puck.js causes it to keep the oscillator on so it can receive serial data. This uses a bunch of power, so it'd be worth trying to power your Puck.js from the 3.3v regulator on your GSM module (which they usually have).