View Single Post
Marshall Banana's Avatar
Posts: 94 | Thanked: 209 times | Joined on Oct 2009 @ Germany
#101
Hi,

i installed the ussd-pad and the ussd-widget from the garage site:
pexpect_2.3.0-1_all.deb
ussd-common_0.0.0-3_all.deb
ussd-pad_2010.01.07_armel.deb
ussd-widget_0.0.3-0_all.deb

Out of the box, they did not work for me as my provider (medion mobile) answers to requests with a cp850 encoded message but with decoding scheme unspecified.

Example:
Code:
at
OK
at+cusd=1,"*100#",15
+CUSD: 0,"Ihr Guthaben f\x81r die Nr.491234567890 betr\x84gt 13.53 Euro",15
As the answer contains non-ascii characters gsmdecode.py crashes when called by ussdquery.py. I modified ussdquery.py so that it converts the answer to utf8 and directly outputs to stdout. I had to open stdout as "wb" to output unicode because otherwise python tries to encode the string to ascii.
Attached Files
File Type: txt ussdquery.py.txt (1.2 KB, 415 views)
 

The Following 4 Users Say Thank You to Marshall Banana For This Useful Post: