avr - Siemens MC35 + ATcommand -
i 2 things.
- recognize when calling - in terminal appear ring , answer have send command ata. how can recognize when doing else. should use new thread , read port until send ring? there beter solution?
what symbol of end of response? i'm reading char using for(), not know number of signs. example below doesn't work properly
while(readcharuart()!=10) {}; while(readcharuart()!=13) { getchar() = .. }
you on right track.
for ring
yes, correct way have 1 thread read modem responses until unsolicited result code ring
. if time time want run @ commands (say ata), should let thread well, e.g. have 1 thread takes care of both issuing @ commands , monitor ur codes.
regarding formatting of responses modem, described in chapter 5.7.1 responses in itu v.250 standard. short summary (reading spec highly recommended!):
<header>ring<trailer>
where header , trailer both "\r\n"
(unless modem configured strangely).
Comments
Post a Comment