MarcoMartines / GSM-GPRS-GPS-Shield

GSM/GPRS & GPS Shield Library for modules using SIM900/SIM908
GNU General Public License v2.0
208 stars 152 forks source link

Library with Nano and sim900 breakout (not shield) #46

Open quique123 opened 7 years ago

quique123 commented 7 years ago

I have a sim900 module (http://www.sainsmart.com/sim900-gprs-gsm-board-quad-band-module-kit-for-arduino-high-quality-new.html), not shield.

I have an issue where the library works with the Mega using the sendsms() method. I can see all the debug commands which work and the sms is received. I call this the Mega/Library sketch.

Ive tried to use the nano with the library and directly with AT commands, this is what Ive found:

Library With the nano, I cant upload the sketch with references to Serial1 in HWSerial, so I changed them all to Serial instead. I can see the debug logs and I noticed that CPMS returns error whenever it doesnt work on the nano. When it works in the Mega, CPMS returns OK in the logs.

AT Commands I tried sending the sms with CMGS but the sms is never received. I started looking at the library and noticed that Im not using the pulse method, forceON(). I googled it and found this thread and others where its mentioned that pulsing is required. The problem is I dont have the shield, I have a SIM900 breakout and thus cant really access the powerkey pin.

So the Mega/Library works everytime. I've tried the Nano/Modified library and the nano/at commands.

I have made it work with the nano/mod library and with the nano/at commands. I dont know how, but I think switching to the mega/library sketch must have done something and i managed to receive a couple of sms from the nano/at sketch. That only worked for that session and when I tried to repeat it it stopped working.

Ive' posted about the issue here:http://forum.arduino.cc/index.php?topic=428200.msg2952179#msg2952179

I'm either missing something that the original library does that makes cpms return OK instead of Error, which I think might be the pulse, but that would only be true of the nano/at commands and not of the nano/Library.

Please help.