Seeed-Studio / GPRS_SIM900

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

Serial Monitor error when sending long messages #25

Closed AndrRap closed 6 years ago

AndrRap commented 6 years ago

Hello, I have tried the GPRS_SendSMS example and everything is fine when I send short messages. But when the message is longer than 30 chars, the serial monitor shows "Send SMS failed!" even f the SMS is sent and delivered correctly, not trunked.

lanselambor commented 6 years ago

@AndrRap Thank you for pushing this issue, the sendSMS return failure because it wasn't waiting enough time to catch "Ok",.

To fix this issue: In GPRS_Shield_Arduino.cpp, change line 161, increase timeout number, especially chartimeout.

return sim900_wait_for_resp("OK\r\n", CMD, 5, 5000);