How to be sure what is end of an AT command send to GSM module?
I need some character or string that represent end of AT command for every case due to finding when whole response is received.
I guess it have something with "\r\n" sequence but, this sequence could be at the beginning of AT command response?
Like you suppose it's \r\n.
This defines the end of a line.
And it makes only sense to process complete lines.
Some commands respond only with OK\r\n, others with some data.
So you should first build a parser that can recognize complete lines, so that they can be
processed by a function that can handle the responses.
Sometimes you can get even responses you don't request, like change events net login or the sim status #QSS: 2\r\n.
So you need to know what answer you expect and wait until you get this
Depending on mode and command I.e.
<CR> or <CR><LF>
http://www.3gpp.org/ftp/Specs/html-info/27007.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With