I am trying to execute USSD command using GSM modem.
AT+CUSD=1,"*200#",15
and the result I get is not readable
"+CUSD: 0,"Æ·ÜNÓu9XŽt�¤å1:,?—u0Œt�ši7è,Óëizy®ƒ5ÓnÔL»Ai7½,w‡éé·;Ì.ÏAòòœvÓËs�ÖL»",15"
when I try the same ussd code on the mobile phone using the same sim I get a correct result which is
"Forfait: 909DA. Recharchege:0.0DA Min gratuites: 0Min. Min internationales restantes :0Min"
changing the character set AT+CSCS from GSM to IRA or PCCP, PCDN, 8859-1 doesnt change the response it is the same response exactly
and changing AT+CSCS to hex gives me an error :
AT+CSCS="HEX"
AT+CUSD=1,"*200#",15
OK
+CUSD: 2,"Unexpected Data Value",15
+CUSD: 2,"Unexpected Data Value",15
ERROR
and changing it to UCS2 and calling the USSD make my modem reboot
AT+CSCS="UCS2"
AT+CUSD=1,"*200#",15
*
and#
characters because they are not hexadecimal characters. When changing character encoding with AT+CSCS it applies to all strings following as I mentioned in my answer. See this answer for an example setting UTF-8 with UCS2 encoding active. The same error applies in the second case with UCS2, although the behaviour of rebooting is not as nice as printing a helpful "Unexpected Data Value" error message. – hlovdal