![]() |
Re: Howto install ussd-pad and ussd-widget
Quote:
ARE THESE LETTERS BIG ENOUGH TO BE SEEN? |
Re: Howto install ussd-pad and ussd-widget
Quote:
so cut some slack to newbies. |
Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
Quote:
|
Re: Howto install ussd-pad and ussd-widget
Quote:
So I know, that running widget from command line would give needed information with quite high level of possibility and making manual queries would probably give nothing. And I know, that I've written dozen of times, what to do, if widget shows "Error". And the last thing: it is 1:35 here and I'm not in a good mood. |
Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
Quote:
|
Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
1 Attachment(s)
Quote:
Quote:
Attachment 6902 The missing character between "Remise" and "jour" is the "à" that causes the error. |
Re: Howto install ussd-pad and ussd-widget
Quote:
Quote:
|
Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
Quote:
at+cmgf=1 at+cscs="IRA" at+cusd=1,"*100#",15 gives the same output like: at at+cusd=1,"*100#",15 +CUSD: 0,"Ihr Guthaben f\x81r die Nr.491234567890 betr\x84gt 13.53 Euro",15 Btw. i don't know if it is really cp850 encoded, that was just my guess. Possible solution for the problem: Before using gsmdecode on the reply remove all non-ascii characters from the reply: Code:
strip_unicode = re.compile("([^-_a-zA-Z0-9!@#%&=,/'\";:~`\$\^\*\(\)\+\[\]\.\{\}\|\?\<\>\\]+|[^\s]+)")Ihr Guthaben fr die Nr.491234567890 betrgt 13.53 Euro Second problem with ussdquery.py: If the decoding of gsmdecode.py produces non ascii characters (Is this possible? i didn't look at gsmdecode.py) ussdquery.py will fail when writing the decoded reply to stdout as it trys to encode it to ascii. This (python trying to encode the reply to ascii) will only happen if ussdquery.py is called by ussd-widget or ussd-pad. If you execute ussdquery.py directly in the terminal python will encode the output to the standard encoding of your terminal and the problem will probably not show. Possible solution: Open stdout as binary file. Code:
sys.stdout=file("/dev/stdout", "wb") |
Re: Howto install ussd-pad and ussd-widget
First of all I must say, that yesterday I was tired and wanted to sleep, so I was inadequate.
Quote:
By default CP437 is used, not CP850. I don't think it is a good choice, because it doesn't contain greek characters, so not all characters present in GSM encoding can be coded in CP437. But we can switch terminal equipment to GSm encoding with at+cscs="GSM" command. Then our code for decoding would work correctly. I'll make special version us ussdquery.py which does this trick and ask you to test it. Quote:
Quote:
occurred. I tried to say this many times. |
Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
1 Attachment(s)
2 Marshall Banana and fpp
Try this script. |
| All times are GMT. The time now is 02:17. |
vBulletin® Version 3.8.8