Closed zella closed 7 years ago
Default timeout is 5 seconds, please, check it again.
@ortegafernando Hi, I remember, that the problem was with DEFAULT_INTERCHAR_TIMEOUT 1500. I manually change it to bigger value and it becomes worked.
Hi....
I found DEFAULT_INTERCHAR_TIMEOUT in these 2 lines in GPRS_Shield_Arduino.cpp
Line 757:
if(!sim900_wait_for_resp("SEND OK\r\n", DATA, DEFAULT_TIMEOUT 10, DEFAULT_INTERCHAR_TIMEOUT 10)) {
Line 843: sim900_read_buffer(gprsBuffer,sizeof(gprsBuffer),2DEFAULT_TIMEOUT,6DEFAULT_INTERCHAR_TIMEOUT);
I cant find 1500 anywhere....could you please be more specific
Thanx...
@ortegafernando It's about https://github.com/Seeed-Studio/GPRS_SIM900/blob/master/GPRS_Shield_Arduino.cpp#L126. It has 1500 default value without params. Sorry, I forgot more details, but remeber, that i debug sim900_wait_for_resp
and it randomly fails on chartimeout check. On next 1-2 week, i starts new project and can provide more details.
Function return wrong value. Because sms sending can take long time. And default timeouts too small for this check https://github.com/Seeed-Studio/GPRS_SIM900/blob/master/GPRS_Shield_Arduino.cpp#L126 . In my expirience it can take 5, 10 etc sec.