Seeed-Studio / GPRS_SIM900

library for GPRS shield with sim900 module.
MIT License
137 stars 96 forks source link

send SMS method return is still false #18

Closed nexus05 closed 6 years ago

nexus05 commented 7 years ago

Hello... In #line39 of SIM900.h I changed DEFAULT_INTERCHAR_TIMEOUT to 5000 or 10000 but it still doesn't work...return is always false, even if SMS is not sent. does anyone knows why?

lanselambor commented 6 years ago

Has fixed this issue, see GPRS_Shield_Arduino.cpp #151.

ortegafernando commented 6 years ago

Sorry @lanselambor but what do you change is very risky, you are waiting 10000 seconds !!!!

ortegafernando commented 6 years ago

I have been using this library for months with no problem. May be, @nexus05 could try your proposas with 10 seconds or 20 seconds, but it is not good for anyone to let it with 10000 seconds.

lanselambor commented 6 years ago

@ortegafernando It's not about the timeout parameter, it's for network that before registration SMS can't be send, so in the initialization part isNetworkRegistered() should be invoked.

ortegafernando commented 6 years ago

@lanselambor Please, rewrite then your proporsal, thanks.

lanselambor commented 6 years ago

@ortegafernando Already there with commit on 21 Nov 2017.

ortegafernando commented 6 years ago

You have write "10000, 5000", so you will wait 10.000 seconds. Is this ok for you ???? Not for me.

lanselambor commented 6 years ago

Thanks to @ortegafernando PR on Dec 28, 2017, correct timeout parameter error. While using SIM900 or SIM800, wait for network registration before operating call, sms.