-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SIM868] library doesn't receive "1, CLOSED" message from modem #62
Comments
Hi @vshymanskyy I think I found the cause of the problem. Sometimes the modem receives data on a socket just after the microcontroller has sent data in modemSend(), then the microcontroller waits for "DATA ACCEPTED" but before that a "+CIPRXGET" string was received so the Having non blocking streamSkipUntil() and stream.readStringUntil() would have prevented the connection timeout but it would have not solved the real issue. |
Please reopen if this still happens on master branch. Thank you! |
I'm testing this library and the mqtt example using a SIM868 module. It works for some time and then it stop working. I have logged the messages between the microcontroller and the modem and when the problem starts when the modem sends a "1, CLOSED" string, I added some messages to the library to see what happens and this message was not being processed by the waitResponse function.
Because the connection was closed by the server (or the modem) there is ping timeout and the library tries to close the connection but this generate an error in the modem because the connection was already closed and the library is unable to recover from this state.
I have tested this with an arduino due and with an stm32f103, so I don't think this is a serial driver issue.
The text was updated successfully, but these errors were encountered: