AT commands from a PC Application


Hi All :slight_smile:
So i develop application that send At commands to modem with Visual basic in serial port with MS Comm Component.

Then the problem is that when i send to at commands one fter other like
Ex of Code :
//First Command
MSComm1.Output = “AT+CSQ” & Chr$(13)
//Second Command
MSComm1.Output = “AT+CPIN?” & Chr$(13)

In this case for exemple the modem sometimes return error sometimes return the reposne of the second and error for the first. So i’ve not understand the problem if i must after sending the first, wait the reponse of the first before sending the second or there is other solution.



Hi, first, i think you have to send both CR(13) and LF(10) characters. Each of this responses sends “OK” anfter a response, you should consider waiting for “OK” before sending another commmand.

best regards, Sérgio



No, its enough to send the (0x13) character after a command line. This is the terminating character specified by the S3 register (even though its not possible to change it…). However, the response from a command (if in ATV1 mode) is ended with both and .

Another solution if you want to send multiple commands is to send them all in one command line, just separate them with the ‘;’ character.


But if you want to send multiple commands that you want to take care of each result code on its own, then you really need to wait before you send the second command.