Get USSD in terminal
Added by penpencool almost 10 years ago
Hello, I want get ussd command on aircard I try usd sendussd method but it not responding
I try use in terminal form, it work but not responding , I look on logfile it have ussd data responding. How can I do.
this example
at+cusd=1,"*545#",15
OK
but on logfile it have data respont
2553.04.06-04.38.58:Verbose: Sending: at+cusd=1,"*545#",15
2553.04.06-04.38.58:Verbose: Data from queue:
2553.04.06-04.38.58:Verbose: Received:
OK
2553.04.06-04.38.58:Verbose: Data from queue:
2553.04.06-04.38.58:Verbose: Data from queue:
OK
2553.04.06-04.39.01:Verbose: Received:
+CUSD: 0,"0E040E380E130E400E1B0E470E190E250E390E010E040E490E32002000220E400E2D0E440E2D0E400E2D0E2A00200E270E310E19002D0E170E39002D0E040E2D0E250021002200200E2B0E210E320E220E400E250E0200200030003800380035003300310031003400380031",72
2553.04.06-04.39.17:Verbose: Sending watch dog message
2553.04.06-04.39.17:Verbose: Sending: AT
2553.04.06-04.39.17:Verbose: Data from queue:
2553.04.06-04.39.17:Verbose: Data from queue:
2553.04.06-04.39.17:Verbose: Data from queue:
+CUSD: 0,"0E040E380E130E400E1B0E470E190E250E390E010E040E490E32002000220E400E2D0E440E2D0E400E2D0E2A00200E270E310E19002D0E170E39002D0E040E2D0E250021002200200E2B0E210E320E220E400E250E0200200030003800380035003300310031003400380031",72
2553.04.06-04.39.17:Verbose: Received:
OK
2553.04.06-04.39.17:Verbose: Data from queue:
+CUSD: 0,"0E040E380E130E400E1B0E470E190E250E390E010E040E490E32002000220E400E2D0E440E2D0E400E2D0E2A00200E270E310E19002D0E170E39002D0E040E2D0E250021002200200E2B0E210E320E220E400E250E0200200030003800380035003300310031003400380031",72
2553.04.06-04.39.17:Verbose: Data from queue:
+CUSD: 0,"0E040E380E130E400E1B0E470E190E250E390E010E040E490E32002000220E400E2D0E440E2D0E400E2D0E2A00200E270E310E19002D0E170E39002D0E040E2D0E250021002200200E2B0E210E320E220E400E250E0200200030003800380035003300310031003400380031",72
2553.04.06-04.39.17:Verbose: Data from queue:
+CUSD: 0,"0E040E380E130E400E1B0E470E190E250E390E010E040E490E32002000220E400E2D0E440E2D0E400E2D0E2A00200E270E310E19002D0E170E39002D0E040E2D0E250021002200200E2B0E210E320E220E400E250E0200200030003800380035003300310031003400380031",72
OK
Replies (6)
RE: Get USSD in terminal - Added by penpencool almost 10 years ago
Hi, I think ussd data respond it in serialport but it don't readed because
I try send at+cusd=1,"*545#",15 two time, when two it has respond .Can you help me please
RE: Get USSD in terminal - Added by admin almost 10 years ago
Hi,
The response looks like is asynchronous (it appears after the OK).
We are currently working on it to add support for asynchronous USSD response. Will release a fix soon.
RE: Get USSD in terminal - Added by penpencool almost 10 years ago
Hello , thank for reply .
I like Messagingtookit if USSD it work I will buy this sure. : )
RE: Get USSD in terminal - Added by penpencool almost 10 years ago
Hi , I have finish this proplem
This is my code
string ReadResponseUSSD(SerialPort port, int timeout) {
string buffer = string.Empty;
do {
if (receiveNow.WaitOne(timeout, false)) {
string t = port.ReadExisting();
buffer += t;
}
else {
if (buffer.Length > 0)
throw new ApplicationException("Response received is incomplete.");
else
throw new ApplicationException("No data received from phone.");
}
}
while (buffer.IndexOf("+CUSD:") == -1);
return buffer;
}
RE: Get USSD in terminal - Added by admin almost 10 years ago
Hi,
Here is a patch version for better USSD handling
RE: Get USSD in terminal - Added by penpencool almost 10 years ago
Thank you, fast develop I will wait demo for new version.
: )