USSD response to network | Thales IoT Developer Community
June 20, 2019 - 8:39pm, 3483 views
Hello,
How do we respond back to mobile network with their given request options during USSD using Java? I looked at current threads and they weren't helpful.
Thanks,
Jason
Hello Jason,
could you please provide response to ATI1 command to check what module and FW you are using?
For handling USSD there is a command AT+CUSD. You can send it from Java using ATCommand Class.
Response from network comes as URC, so it should be possible to catch and parse it using ATCommandListener.
Below you can find AT command log how it looks like:
at+cusd=1,"USSD_code"
OK
+CUSD: 1,"response",0
Please let me know if you have more questions.
Best regards,
Adam
Hi,
Thanks for the reply. What I mean is when the operator request you for a response during USSD Status 1. This is met with the "> " , where you enter the response in the form of a number and thereafter, you receive another response based on your input and so on.
Thanks,
Jason
Hi Jason,
looks like you are using an older Cinterion device which uses the (non TS 27.007-compliant) AT+CMGS response format for USSD menus:
The following works for me on a TC63i:
at+cscs="GSM"
OK
at+cusd=1,"*100#",15
OK
+CUSD: 1,"Hauptmen~:
1 Guthabenkonto
2 Guthaben Verf~gbarkeit
3 Gutschein einl|sen
4 Pack Manager
7 Tarifinfo
8 Hilfe",15
> 1^Z
OK
+CUSD: 2,"Ihr Guthaben betr{gt: 42,00. Jetzt auch Ihr Guthaben aufladen: einfach *103*Aufladenummer# und die H|rertaste eingeben.",15
Regards,
Reinhard
Hello,
Please try to do this with AT commands by hand first and then try Java implementation.
Have you tried to implement what Adam had advised? Were you able to catch the ">" sign in Java?
Regards,
Bartłomiej