Search code examples
c#comserial-portmodem

AT&F command , c# modem and phone line


i have pretty hard task, i need to call to device in the field and take out some data from it in c#. What i did so far i installed some com sniffer and recored some communication. I am showing here first part where com port is established and application is calling, my question is how can i send it in c# to recive what i saw in sniffer.

Request: 2/02/2012 17:19:22.05464 (+0.6390 seconds)


 41 54 44 54 30 31 34 35 31 38 30 36 33 0D         ATDT014518063.  


Answer: 2/02/2012 17:19:54.24264 (+31.3708 seconds)


 0D 0A 43 4F 4E 4E 45 43 54 20 39 36 30 30 2F 41   ..CONNECT 9600/A
 52 51 2F 56 33 32 2F 4C 41 50 4D 2F 56 34 32 42   RQ/V32/LAPM/V42B
 49 53 0D 0A                                       IS..  

Solution

  • One way to get started is to open up a SerialPort and send the above data. When the data comes back, parse it.

    EDIT: The listen to the DataReceived event.