I have a problem with AT command for sending SMS - AT+CMGS
. After sending AT+CMGS=<length of PDU datagram><CR>
I wait for response of modem. After reading <CR><LF>><Space>
I send <PDU datagram><CTRL-Z>
but I don't get any answer from modem. If I send any command after that the response to that command is +CMGS=<reference number>
which is exactly the response which I expected later.
But if I wait for about 100ms after reading <CR><LF>><Space>
and than send PDU datagram than everything works well and I receive expected answer from modem.
It is really necessary to wait after receiving response from modem? I thought that I can send response immediately after reading <CR><LF>><Space>
. Can someone help me to understand where could be a problem?
Thanks a lot