+ 1
how to use the AT command in c# ?
AT command in c#
4 Respuestas
+ 2
Looks like there's a working code sample here,
https://www.codeproject.com/Questions/645547/How-to-retrieve-response-result-in-sending-USSD-co
Response handling appears to start with the line...
void port_DataReceived(object sender, SerialDataReceivedEventArgs e) ...
The poster asks why it just responded "OK", which implies the code works (modems respond that way and then expect you to keep querying them according to whatever command set they're using).
I won't be much help for the AT commands for your modem (you have to find that by experimenting, visiting the chip/component manufacturer or search) but the code may help you at least with the basic conversation.
One hint that probably still works: ATZ (and possibly similar) resets most modems to initial settings, if the modem gets confused.
+ 2
Do you mean the Hayes "attention modem" sequences, like ATDT, ATH, ATZ, etc?
Is this related to SMS, UART/serial ports, or (can you clarify)?
Just in case, have you see these areas of StackOverflow?
https://stackoverflow.com/questions/tagged/uart
https://stackoverflow.com/questions/tagged/at-command
You could add c# to those searches, but if you clarify here someone may be able to use those references to help answer.
+ 1
I wanna know how to read the respond after sending ussd request ,this is what I wrote for the ussd:
port.WriteLine ("AT+CUSD=1,\"*123#\",15");
I wanna know how do display the respond
0
You need to add a data received handler to the port