maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Missing USSD functionality: N900 can't dial numbers beginning with # or * (https://talk.maemo.org/showthread.php?t=32878)

eloquent 2010-02-04 16:01

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
got this message in the application manager if i try to install ussd widget...

"Installation of Ussd-Widget not possible...


why?

KiberGus 2010-02-04 16:20

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by eloquent (Post 510548)
got this message in the application manager if i try to install ussd widget...

"Installation of Ussd-Widget not possible...


why?

I don't know. But application manager should write why. Try clicking on buttons like "info", "more" etc. May be ussd-common I've uploaded today morning didn't get to repository (or did, bub not at the moment you synced with server). So you should look for more info,or, may be, I'll be able to reproduce it.

eloquent 2010-02-04 16:33

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
now the installation of the widget worked... but if i want to add it to my desktop nothing happens

any idea why the ussd pad crashes when i try to start it?

awben 2010-02-04 17:22

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
ok:

have also some probs with widget and pad:

*135# ist working, the rest gives me error massages
any ideas for german n900 users?

floffe 2010-02-04 17:54

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
The rest what? Other codes? What exactly are they and what should they do? What error message do they give?

KiberGus 2010-02-04 18:21

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by awben (Post 510686)
ok:

have also some probs with widget and pad:

*135# ist working, the rest gives me error massages
any ideas for german n900 users?

I'm not a magician. Run widget from console, this will give you debug information. Without this explaining, why they appeared is nearly impossible.

aman18narang 2010-02-04 19:23

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by niqbal (Post 509923)
u dont have to put anything in regular expression box (regexp) or parser. just put *144# in ussd number textbox and thats it.

regexp can be used to extract string from operators response as an example. parser can be used to add (parsing) text etc before or/and after operators response

thanks for helping out..i hv just put in the ussd no and nothing else...the only thing am getting as reply is error..there is no other response after having run in 100 times with different ussd numbers..i kept my phone near a speaker to check if my phone is sending a signal to the operator or not..there surely is d buzzing sound to tell me something is being send but am only getting error as response

KiberGus 2010-02-04 20:09

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
For debugging run widget from X-terminal
python /usr/lib/hildon-desktop/ussd-widget.py
It echoes all errors there.

shady 2010-02-05 03:42

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
hey guys thanks for the widget i however i have not been able to use it successfully. i used the command above and got a syntax error:

$ python /usr/lib/hildon-desktop/ussd-widget.py
Translation file for your language not found
Sintax error in USSD number.

does this work with tmo usa i was using #646# for my minutes, any ideas

KiberGus 2010-02-05 06:49

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by shady (Post 511323)
hey guys thanks for the widget i however i have not been able to use it successfully. i used the command above and got a syntax error:

$ python /usr/lib/hildon-desktop/ussd-widget.py
Translation file for your language not found
Sintax error in USSD number.

does this work with tmo usa i was using #646# for my minutes, any ideas

That comman would create new unconfigured widget, so that error is normal (no number specified yet). Just go to your desktop and configure it (it may hide under other widgets).

shady 2010-02-05 07:07

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
yea i see them now. but the widget still isnt working for me, is there a diagnostic that i could run to copy here?

niqbal 2010-02-05 07:28

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by shady (Post 511408)
yea i see them now. but the widget still isnt working for me, is there a diagnostic that i could run to copy here?

i dont think there is a dignostic, btw u shouldve run it as root otherwise it will give u syntax error. run it as root and it should try to open dbus_connection_get_data() should be NULL since there is no query submitted.

i am not a developer of ussd widget but to my understanding if its trying to open connection widget is on the right track

i would highly recommend reinstalling pexpect, ussd-common, ussd-widget. Configure widget, only puy ussd number plus also put max. width to abt 25. Just to make sure some sort of response is calibrated within widget box. This might be causing error now that i think abt it.

also ussd code has nothing to do with which country or service u r using, its only submitting and recieving messages, as long as your service provider provides this functionality. most of asia and european countries use ussd codes to check balance eg.

KiberGus 2010-02-05 08:37

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
DO NOT run is as a root. dbus connection error is an error and means, that it will not work. This problen newer happens from normal user.
Sintax error on first launsh is normal! You don't have number entered yet. Configure widget, click on it, look what happens and look to the output.
By the way, do not vhange language from unspecified if you are not shure. Unspecified should work always, other languages only if they are supported by operator.

pycage 2010-02-05 08:48

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by joelus (Post 510512)
I use ussd-pad for menu systems which sort of works - see my post in this thread here.
I haven't really kept up with this thread so I don't know if ussd-pad is still being worked on or not, emphasis appears to be on the widgit...

There haven't been updates for ussd-pad yet as I was busy with other stuff. But updates will come.

KiberGus 2010-02-05 12:35

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by pycage (Post 511479)
There haven't been updates for ussd-pad yet as I was busy with other stuff. But updates will come.

By the way, there is new type of communication (interactive) with ussdquery.py, which should be used in ussd-pad for guaranting correct behavoir of ussd menu. This implemented in ussd-common 0.0.6, but it got lost somewhere in autobuilder.
P.S. People asked for bigger area for replyes with word wrap.

fpp 2010-02-05 12:45

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
1 Attachment(s)
Hi KiberGus,

Up to a few days ago I had this working, using Marshall Banana's hack of ussdquery.py :
http://talk.maemo.org/showpost.php?p...&postcount=101

Since the last couple of updates it has stopped working. I suspect this is again due to the non-ascii character in the reply, as testig from the command line outputs this :

Attachment 6890

Should I patch ussdquery.py again, or is this supposed to be working in the latest version ?...

TIA,
fpp

KiberGus 2010-02-05 14:19

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
2 Fpp. I missed that Marshall Banana's comment. I dislike patching, so fixing the problem is a more preferred way. But sujjected fix would break all other encodings, so we need to understand:
1) Is this reply standard complient
2) Does it work with other phones
3) How they understand, what encoding is used
4) How to include this fix without breaking everything.

aman18narang 2010-02-05 16:21

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
hi KiberGus/Niqbal
just a ques. i hav only installed ussd widget..and reading from one of the posts abv do i also need to install pexpect and ussd-common as well? if yes, are they both available in extras-devel? currently i hv only ussd widget installed and whenever i run it i get an error

aman18narang 2010-02-05 16:31

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by KiberGus (Post 510932)
For debugging run widget from X-terminal
python /usr/lib/hildon-desktop/ussd-widget.py
It echoes all errors there.

ok i used this line and run the widget from command line and it worked. it created a new widget and i configured it and here was my balance..thanksa lot for help
it wasnt working earlier when i had installed the package

Omkar 2010-02-05 16:35

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by Marshall Banana (Post 486843)
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.

Hw did u edit the file?? i cant save the file after editing :(

KiberGus 2010-02-05 17:27

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by aman18narang (Post 512051)
hi KiberGus/Niqbal
just a ques. i hav only installed ussd widget..and reading from one of the posts abv do i also need to install pexpect and ussd-common as well? if yes, are they both available in extras-devel? currently i hv only ussd widget installed and whenever i run it i get an error

If installation of widget finished with a success, than all dependencies (including pexpect and ussd-common) have been successfully installed too.
To find out, why it doesn't work, start if from X-terminal, as it was described above many times.
Quote:

Originally Posted by aman18narang (Post 512070)
ok i used this line and run the widget from command line and it worked. it created a new widget and i configured it and here was my balance..thanksa lot for help
it wasnt working earlier when i had installed the package

Sometimes all pty devices on n900 are used and then widget doesn't work. You have to close terminals, stop sshd or just reboot phone. May be that was your case.
Quote:

Originally Posted by Omkar (Post 512075)
Hw did u edit the file?? i cant save the file after editing :(

Get a root privileges before editing.

fpp 2010-02-05 17:55

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by KiberGus (Post 511900)
2 Fpp. I missed that Marshall Banana's comment. I dislike patching, so fixing the problem is a more preferred way. But sujjected fix would break all other encodings, so we need to understand:
1) Is this reply standard complient
2) Does it work with other phones
3) How they understand, what encoding is used
4) How to include this fix without breaking everything.

I don't know about 1)

I'm sure about 2), as I've done it on a Nokia E71 with no problems. *144# is the balance check for a well-known French provider, so it's widely used.

How can I give you information about 3), so you can think about 4) ?... :-)

patt2k 2010-02-05 18:26

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by shamoni8 (Post 502546)
do i have to use the pad? what if i don't want it?

EDIT:

I installed the widget #674# works #225# works. But #646# for minutes gives me error.

And also dialing pad when I launch it nothing happens it gets closed by itself

any ideas?

KiberGus 2010-02-05 19:12

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by patt2k (Post 512200)
EDIT:
I installed the widget #674# works #225# works. But #646# for minutes gives me error.
any ideas?

I've got an idea. You got error. 5 symbols. That's all I know.
P.S. Would users be happy, it diagnostics would be printed to to console, where they can look for it when they need, but on widget itself, making widget grow for a desktop or two?
P.P.S. All posts like "I've got error" without description of error would be ignored.

niqbal 2010-02-05 19:46

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by patt2k (Post 512200)
EDIT:

I installed the widget #674# works #225# works. But #646# for minutes gives me error.

And also dialing pad when I launch it nothing happens it gets closed by itself

any ideas?

if two codes work, clearly widget does its job. problem is caused somewhere else. one make sure its a valid code for ur operstor. second if code is valid, is ur parser | regexp empty or not?

patt2k 2010-02-05 20:01

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by niqbal (Post 512298)
if two codes work, clearly widget does its job. problem is caused somewhere else. one make sure its a valid code for ur operstor. second if code is valid, is ur parser | regexp empty or not?

Yes they are empty (though I have no idea how to make % sign on N900)

what would I need to fill there?

646 is for minutes
225 for t mobile balance
674 for txt messages used

niqbal 2010-02-05 20:33

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by patt2k (Post 512309)
Yes they are empty (though I have no idea how to make % sign on N900)

what would I need to fill there?

646 is for minutes
225 for t mobile balance
674 for txt messages used

If the other codes are working so should #646# code. Maybe it was tmobile at that time, did u try it at a later time?

btw just for the heck of it, use terminal modem for this code rather than widget and see if u get an error. need rootsh for this

$ sudo gainroot
$ pnatd
at+cusd=1,"#646#",15

-------------------------

if u still get an error, blame tmobile. if u get an expected response, right away use widget and see if it works. btw to reach % use Sym key (top left). blue arrow key plus ctrl key

KiberGus 2010-02-05 21:25

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by niqbal (Post 512341)
If the other codes are working so should #646# code. Maybe it was tmobile at that time, did u try it at a later time?

btw just for the heck of it, use terminal modem for this code rather than widget and see if u get an error. need rootsh for this

$ sudo gainroot
$ pnatd
at+cusd=1,"#646#",15

-------------------------

if u still get an error, blame tmobile. if u get an expected response, right away use widget and see if it works. btw to reach % use Sym key (top left). blue arrow key plus ctrl key

I can only repeat one more time. Launch widget from command line. This would give more information, about why it doesn't work.

KiberGus 2010-02-05 21:52

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by fpp (Post 512162)
I don't know about 1)

I'm sure about 2), as I've done it on a Nokia E71 with no problems. *144# is the balance check for a well-known French provider, so it's widely used.

How can I give you information about 3), so you can think about 4) ?... :-)

OK. We were looking on a wrong documentation, a bit. As far as we use AT commands, we need GSM 07.07 - Main AT commands and Annex A from GSM 07.05 - Additional AT commands (SMS and CBS). Can be downloaded from http://wiki.openmoko.org/wiki/GSM#GS...in_AT_commands

I didn't understood how decoding should be done correctly and where did we made mistakes, but now I know how to check, if user has left ussd menu.

Update: According to documentation cp850 can not be used in ussd reply (at least with dsc field 15). On the other hand, our implementation shouldn't work at all, because we expect (and we get!) 8 bit encoding, while we should get 7 bit encoding. I would appreciate, if you try running these commands in pnatd:
at+cmgf=1
at+cscs="IRA"
at+cusd=1,"<your USSD number>",15

They should produce a lot of digits instead of human readable reply.

patt2k 2010-02-05 21:55

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by niqbal (Post 512341)
If the other codes are working so should #646# code. Maybe it was tmobile at that time, did u try it at a later time?

btw just for the heck of it, use terminal modem for this code rather than widget and see if u get an error. need rootsh for this

$ sudo gainroot
$ pnatd
at+cusd=1,"#646#",15

-------------------------

if u still get an error, blame tmobile. if u get an expected response, right away use widget and see if it works. btw to reach % use Sym key (top left). blue arrow key plus ctrl key

http://i49.tinypic.com/iw25pj.png

KiberGus 2010-02-05 22:16

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by patt2k (Post 512454)

Congratulations. Now you know how to use pnatd. Ise it, if you like it.
ARE THESE LETTERS BIG ENOUGH TO BE SEEN?

niqbal 2010-02-05 22:16

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by KiberGus (Post 512408)
I can only repeat one more time. Launch widget from command line. This would give more information, about why it doesn't work.

@kilbergus why do you always think Error means a diagnostic Error, what if its a response Error from the Operator. Being a programmer you should know these things. Running through widget (terminal) will only tell you if its a diagnostic error or not, which you can easily run through terminal modem and see if it is or not. Either way you are pinning down the problem.

so cut some slack to newbies.

fpp 2010-02-05 22:22

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by KiberGus (Post 512452)
OK. We were looking on a wrong documentation, a bit. As far as we use AT commands, we need GSM 07.07 - Main AT commands and Annex A from GSM 07.05 - Additional AT commands (SMS and CBS). Can be downloaded from http://wiki.openmoko.org/wiki/GSM#GS...in_AT_commands
I didn't understood how decoding should be done correctly and where did we made mistakes, but now I know how to check, if user has left ussd menu.

Sorry, but you kind of totally lost me there :-)

KiberGus 2010-02-05 22:36

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by niqbal (Post 512478)
@kilbergus why do you always think Error means a diagnostic Error, what if its a response Error from the Operator. Being a programmer you should know these things. Running through widget (terminal) will only tell you if its a diagnostic error or not, which you can easily run through terminal modem and see if it is or not. Either way you are pinning down the problem.

so cut some slack to newbies.

I also know, that the only place, where my code echoes "Error" is string, which appears on screen, because it is short. I know, that I tried to make reasonable and understandable diagnostics messages in iwdget and ussdquery.py. I know, that if error occurred operator would return error code (not a normal reply) to phone. I know, that modem returns ERROR, not Error if case of error.
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.

KiberGus 2010-02-05 22:38

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by fpp (Post 512485)
Sorry, but you kind of totally lost me there :-)

I've edited that post. I think, that n900 doesn't follow standards. Can you please try making AT commands, added to that post.

fpp 2010-02-05 23:02

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
1 Attachment(s)
Quote:

Originally Posted by KiberGus (Post 512452)
Update: According to documentation cp850 can not be used in ussd reply (at least with dsc field 15). On the other hand, our implementation shouldn't work at all, because we expect (and we get!) 8 bit encoding, while we should get 7 bit encoding. I would appreciate, if you try running these commands in pnatd:
at+cmgf=1
at+cscs="IRA"
at+cusd=1,"<your USSD number>",15

Ah, this I understand better, now I can help, thanks ! :-)

Quote:

They should produce a lot of digits instead of human readable reply.
Sorry, no: just the normal text output from that number, as when I type only the "at+cusd" part.

Attachment 6902

The missing character between "Remise" and "jour" is the "à" that causes the error.

patt2k 2010-02-06 01:07

Re: Howto install ussd-pad and ussd-widget
 
Quote:

Originally Posted by KiberGus (Post 512477)
Congratulations. Now you know how to use pnatd. Ise it, if you like it.
ARE THESE LETTERS BIG ENOUGH TO BE SEEN?

Wow you're a douche im not a linux expert I learned a lot here so if you dont want to help just ignore what im saying kay? thx

Quote:

Originally Posted by niqbal (Post 512478)
@kilbergus why do you always think Error means a diagnostic Error, what if its a response Error from the Operator. Being a programmer you should know these things. Running through widget (terminal) will only tell you if its a diagnostic error or not, which you can easily run through terminal modem and see if it is or not. Either way you are pinning down the problem.

so cut some slack to newbies.

So for now only way to see is via terminal? what about those extra reg options in ussd widget ?

Marshall Banana 2010-02-06 10:01

Re: Missing USSD functionality: N900 can't dial numbers beginning with # or *
 
Quote:

Originally Posted by KiberGus (Post 512452)
OK. We were looking on a wrong documentation, a bit. As far as we use AT commands, we need GSM 07.07 - Main AT commands and Annex A from GSM 07.05 - Additional AT commands (SMS and CBS). Can be downloaded from http://wiki.openmoko.org/wiki/GSM#GS...in_AT_commands

I didn't understood how decoding should be done correctly and where did we made mistakes, but now I know how to check, if user has left ussd menu.

Update: According to documentation cp850 can not be used in ussd reply (at least with dsc field 15). On the other hand, our implementation shouldn't work at all, because we expect (and we get!) 8 bit encoding, while we should get 7 bit encoding. I would appreciate, if you try running these commands in pnatd:
at+cmgf=1
at+cscs="IRA"
at+cusd=1,"<your USSD number>",15

They should produce a lot of digits instead of human readable reply.

For me
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]+)")
reply=strip_unicode.sub('', reply)

This prevents gsmdecode from failing and properly encoded replys can still be decoded. My reply looks like this after that:
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")

KiberGus 2010-02-06 10:28

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:

Originally Posted by fpp (Post 512538)
Sorry, no: just the normal text output from that number, as when I type only the "at+cusd" part.

Today I understood, that everything is done according to standards, but Marshall Banana was wrong about charset. If reply is in HEX or UCS2, then it is printed hex encoded without any conversion. If it was coded in default GSM alphabet n900 automatically decodes it to current terminal equipment charset.
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:

Originally Posted by patt2k (Post 512628)
Wow you're a douche im not a linux expert I learned a lot here so if you dont want to help just ignore what im saying kay? thx
extra reg options in ussd widget ?

I was too nerwous yesterday.
Quote:

Originally Posted by patt2k (Post 512628)
So for now only way to see is via terminal? what about those extra reg options in ussd widget ?

There are many ways to debug. Of course you can try blindly switch options in widget or making low level queries. But the fastest an easiest way is to run widget from console. In most cases this will be enough to find out, where definitely error
occurred. I tried to say this many times.

KiberGus 2010-02-06 11:41

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