DFRobot / DFRobot_SIM808

SIM808
MIT License
69 stars 56 forks source link

GPS and SMS not working simultaneously #2

Closed vigneshnin closed 7 years ago

vigneshnin commented 7 years ago

I wanted to take gps data and send it as sms using the attached program but i am unable to do so because the sim808.getGPS function doesn't seem to be working correcty... the example program runs perfectly but it doesn't work when i import it to my program https://github.com/vigneshgr8/ATLED/blob/master/ATLED.ino

hoerup commented 7 years ago

@vigneshgr8 your ATLED.ino code is not available any more. Please provide a new link/more info - or close this issue.

vigneshnin commented 7 years ago

https://github.com/vigneshgr8/ATLED

vigneshnin commented 7 years ago

I think it is an issue because of low RAM. This project and my friend's project used this system. In his project, a call had to be made to send audio and an SMS had to be sent with the GPS details. When the Arduino board was running either the call or the SMS would work when the GPS part worked... When the GPS part was commented, both the call and SMS worked... My ATLED code also has a part where I sent preset GPS coordinate in the SMS because the GPS didn't work.

hoerup commented 7 years ago

the problem is that the continous data flow of GPS position updates interferes with the AT command+response data flow. I have just made a few additions in a fork https://github.com/hoerup/DFRobot_SIM808/ so i can stop uart dataflow, read data from sms and re-activate it when done:

sim808.stopGpsDataflow(); sim808_flush_serial();

int messageIndex = sim808.isSMSunread(); // handle SMS etc...

sim808.startGpsDataflow();

vigneshnin commented 7 years ago

Thank you!!!