View Full Version : Missing USSD functionality: N900 can't dial numbers beginning with # or *
aboaboit
10-15-2009, 08:32 AM
My operator's credit check function requires me to "call" *5002#
I've tried that with the phone application and it is rejected as an invalid number. The SMS application, on the other hand, complains that I did not enter any text before hitting "send".
Bug, planned feature for future or just blank space for personal projects?
VDVsx
10-15-2009, 09:24 AM
There's a enhancement request already in the bugzilla, please vote: https://bugs.maemo.org/show_bug.cgi?id=5357
aboaboit
10-15-2009, 10:39 AM
There's a enhancement request already in the bugzilla, please vote: https://bugs.maemo.org/show_bug.cgi?id=5357
Done, thanks!
hey i usually check my phone credits by dialing #123#
but with my n900 when i dial it .. it say incorrect number
i figure it has something to do with the Call Type : Cellular
in the dialing pad
i dont know
i appreciate ur help thx :)
Kurare
12-15-2009, 07:11 AM
There's a bug filed for this. For now, no numbers starting with # (network commands) don't work, but a fix is coming afaik.
Marshall Banana
12-15-2009, 07:11 AM
Hi zooz,
the current firmware of the N900 does not support USSD codes, support for USSD codes will come in a firmware update.
See bug #5357: https://bugs.maemo.org/show_bug.cgi?id=5357
alright thanks guys for the reply
i guess we wait for firmware update
what?
this is like building a car where the brake doesnt work - you can drive, but its really questionable.
Darkshine
12-15-2009, 09:08 AM
what?
this is like building a car where the brake doesnt work - you can drive, but its really questionable.
No, it's more like building a car without an FM radio - it still functions perfectly well as a car, you just don't get some of the nice extras you've gotten used to :D You can still check things by other means - I don't know USSD codes being a 'must-have' for any network provider.
sjgadsby
12-22-2009, 05:32 PM
Threads merged.
dawchiks
12-22-2009, 06:12 PM
well, it's the ONLY way for me to check how much money i have left on sim.
titi974
12-29-2009, 09:37 AM
Hello, I've just received my N900 from amazon... it's an german one but it doesn't matters ;)
the trouble is that I can't make special calls, i mean like viewing what's my credit... like quickly calling #123#
it simply doesn't work, the phone doesn't want to try to call it 0__0
someone in the same situation here ? thx
btw i'm french so sorry for my english ^^
Known bug, it will be fixed with the next some later firmware update: https://bugs.maemo.org/show_bug.cgi?id=5357
lorelei
12-29-2009, 10:14 AM
Known bug, it will be fixed with the next firmware update: https://bugs.maemo.org/show_bug.cgi?id=5357
Be sure to read the entire bug report! Not all cases will be fixed with the next firmware update. In fact only the least useful cases will be fixed (get your IMEI number, or change PIN code of the SIM). The more generic USSD codes, typically the ones needed to get the credit left on prepaid cards will still not work with the PR1.1 firmware update.
Please also note that the more generic case has been fixed in the meantime, but apparently won't be available in the upcoming firmware update, but probably in the next one.
more details:
https://bugs.maemo.org/show_bug.cgi?id=5357#c76
sjgadsby
12-29-2009, 10:25 AM
Threads merged.
TA-t3
12-29-2009, 11:04 AM
Threads merged.
.. and it appears my post (reply to lorelei's post) disappeared in the merge?
stefbeer
12-30-2009, 10:07 AM
Hey guys!
Like somebody told in the bug report there is a tricky way to send USSD codes. I tried it on my device and it worked. :)
So here is how I did it:
Open X Terminal
Become root:
sudo gainroot
(requires the package "rootsh" to be installed BUT be REALLY careful what you do as root!)
Open connection to the modem:
pnatd
Say hello to the modem ;)
at
Tell him to send the USSD code *135#
at+cusd=1,"*135#",1
But watch carefully what you type because you are not able to press backspace ;)
Wait for reply
I did not find a way to disconnect from the modem, so simply tap at the blue X.
I attached a screenshot from my device, showing the reply.
In T-Mobile Germany the USSD code *135# simply shows your number.
Hope this helps! :)
It is not really comfortable but at least there is a way to send some USSD codes until the bug is fixed.
timooz
12-30-2009, 10:19 AM
I had the same problem, i was trying to dial *900# to check my credit balance (operator option), my N900 did not recognize the number and a notification "incorrect number " appeared. However, by removing the "#" symbol at the end of the number, everything worked. Don't know if this will work with you but give it a try:)
KiberGus
12-30-2009, 03:35 PM
Now we need a widget, that would show current balance.
KiberGus
01-05-2010, 12:35 PM
This script is intended to be run from root. It prints current balance on russia MTS operator.
#/usr/bin/python
import pexpect
import time
from subprocess import *
child = pexpect.spawn('pnatd');
child.send('at\r');
time.sleep(0.25);
child.send('at+cusd=1,"*100#",15\r');
time.sleep(0.25);
child.readline();
child.readline();
child.readline();
reply = child.readline();
start = reply.find('"');
end = reply.find('"', start+1);
reply = reply[start+1:end];
child.sendeof();
p = Popen(['sh', 'ucsdecode.sh', reply], stdout=PIPE);
print p.communicate()[0];
The message is in UCS-2 encoding, so I need to convert it.
ucsdecode.sh
#/bin/sh
echo "$1" | echo -n -e $(tr -d '[:space:]' | sed 's/../\\x&/g') | iconv -f UCS-2BE -t UTF8
pycage
01-05-2010, 03:04 PM
You're awesome. Thanks for all this research work. Now I'm going to put together a nice user interface and make it an installable deb for Joe Average. :)
KiberGus
01-05-2010, 05:45 PM
I've already started. You can take src here:
ftp://304.ru/maemo/
I could'nt build deb file, so I vould appreciate if anybody does this. grage page under construction. Patches are wellcome.
WARNING, do not install withoput deb file unless you really know what you are doing
Configuration is done via /etc/ussdWidget.conf,
pycage
01-05-2010, 07:19 PM
Thanks, I guess we've been done work in parallel then. I'll look at your code and see how I can unite it with mine. Mine is an app, instead of a widget. :)
Well, anyway, here is the first version as installable deb file. Simply install and you will be able to check your account, your phone number, etc.
It basically works, but currently only for ASCII-encoding. Encodings is still on my TODO list, as well as uploading to extras-devel.
pycage
01-05-2010, 07:21 PM
Oh, btw, screenshot of course. :)
pycage
01-05-2010, 07:40 PM
I could'nt build deb file, so I vould appreciate if anybody does this. grage page under construction. Patches are wellcome.
I'm gonna build a deb of your's tomorrow.
VDVsx
01-05-2010, 08:27 PM
Thanks, I guess we've been done work in parallel then. I'll look at your code and see how I can unite it with mine. Mine is an app, instead of a widget. :)
Well, anyway, here is the first version as installable deb file. Simply install and you will be able to check your account, your phone number, etc.
It basically works, but currently only for ASCII-encoding. Encodings is still on my TODO list, as well as uploading to extras-devel.
Ehhe, works, finally I can request network signal with *# and kinda check my balance with *#123# (reply is a bunch of numbers, should be due to the encoding).
pycage
01-05-2010, 08:48 PM
Ehhe, works, finally I can request network signal with *# and kinda check my balance with *#123# (reply is a bunch of numbers, should be due to the encoding).
Please show me that bunch of numbers so I can try to decode.
Btw, my app doesn't specify a special encoding (sends 15 for Language unspecified). I assume in your case, it would have to be 8 for Portuguese.
You can try to run pnatd directly and see if different numbers for encodings make a difference.
AT
AT+CUSD=1,"#123#",8
VDVsx
01-05-2010, 09:05 PM
Please show me that bunch of numbers so I can try to decode.
Btw, my app doesn't specify a special encoding (sends 15 for Language unspecified). I assume in your case, it would have to be 8 for Portuguese.
You can try to run pnatd directly and see if different numbers for encodings make a difference.
AT
AT+CUSD=1,"#123#",8
Nokia-N900-51-1:/home/opt/ussdpad# run-standalone.sh python USSDPad.py -v 20
/home/opt/ussdpad/components
MESSAGE 4F207072617A6F207061726120636172726567616D656E746F 20646F207365752063617274616F20666F6920756C74726170 61737361646F2E20506F72206661766F72206C696775652031 3639362E
I got errors when running the code above in pnatd over ssh, I've to try again.
VDVsx
01-05-2010, 09:17 PM
Ok, seems that 8 doesn't work, but 15 works.
Nokia-N900-51-1:/home/opt/ussdpad# pnatd
at
OK
at+cusd=1,"*#123#",15
+CUSD: 0,"4F207072617A6F207061726120636172726567616D656E746F 20646F207365752063617274616F20666F6920756C74726170 61737361646F2E20506F72206661766F72206C696775652031 3639362E",68
OK
Same code, note that my carrier has text ads in the balance messages.
pycage
01-05-2010, 09:29 PM
Ah, the carrier gives you 68 for the encoding. I'll look that up in the GSM Encodings manual.
VDVsx
01-05-2010, 09:35 PM
Checked in another phone and the current message only has valid ASCII chars, but the ads change over time can't remember if they use non-ASCII chars, guess not.
RobertHall
01-05-2010, 09:58 PM
i used a "NAM" N900(usa product code)...didnt have the problem...
dialled *2273
plaban
01-06-2010, 12:09 AM
Thanks, I guess we've been done work in parallel then. I'll look at your code and see how I can unite it with mine. Mine is an app, instead of a widget. :)
Well, anyway, here is the first version as installable deb file. Simply install and you will be able to check your account, your phone number, etc.
It basically works, but currently only for ASCII-encoding. Encodings is still on my TODO list, as well as uploading to extras-devel.
How to install this?Please help
KiberGus
01-06-2010, 03:58 AM
Thanks, I guess we've been done work in parallel then. I'll look at your code and see how I can unite it with mine. Mine is an app, instead of a widget. :)
Well, anyway, here is the first version as installable deb file. Simply install and you will be able to check your account, your phone number, etc.
It basically works, but currently only for ASCII-encoding. Encodings is still on my TODO list, as well as uploading to extras-devel.
I just thought, that NOKIA would include ussd in their firmware (I just don't know when). So dial pad would be unneeded. But command line tool and widget should still be useful.
May be the package should be combination of command line tool which does everything and different style gui: application and widget?
P.S. I didn't knew, that last number in reply is encoding number. I just found in internet how to decode messages from russian operators. My version works with UCS-2 encoding.
pycage
01-06-2010, 07:53 AM
I just thought, that NOKIA would include ussd in their firmware (I just don't know when). So dial pad would be unneeded. But command line tool and widget should still be useful.
Yes, they plan to include USSD in the firmware, but apparently not yet in the next release. Not all numbers with * and # are USSD. Some are said to work in the next firmware release, but not yet USSD codes.
How is the garage project registration doing? Having a common SVN would be best to join efforts. :)
P.S. I didn't knew, that last number in reply is encoding number.
Learned so yesterday, too. It's two nibbles (4 bits). high nibble tells about the used alphabet and compression stuff while the low nibble tells about the language. I found these PDFs to be useful:
http://www.mobilecity.cz/doc/GSM_03.38_5.3.0.pdf
http://buildhost.automated.it/reference-docs/atnokia.pdf
There may still be some timing issues in the pexpect stuff because I don't always see an response from my carrier.
pycage
01-06-2010, 08:00 AM
How to install this?Please help
Download the .deb file and put in "N900" (real path is /home/user/MyDocs/ but the N900 hides this from the user, and just names it "N900" in the file dialogs).
Open the application manager and look for rootsh, install it.
Quit the application manager. This step is important.
Start X-Terminal.
Enter exactly like this and don't press [Enter] yet:
rootsh dpkg -i MyDocs/ussdpad
Then push on the [Tab] button on the bottom of the screen. This will expand the complete filename.
Now press [Enter]. It's installing and you will find it in your applications menu from where you can launch it.
VDVsx
01-06-2010, 08:01 AM
There may still be some timing stuff in the pexpect stuff because I don't always see an response from my carrier.
Same here, but this happens with all my phones so far, seems that sometimes the carrier sends invalid/empty replies.
attila77
01-06-2010, 08:12 AM
Hm, I'm getting RuntimeError: could not create GdkPixmap object errors as a result of an assertion fail right after the MESSAGE line and no other response :) :( Will post the exact output here when I regain connectivity on my N900...
pycage
01-06-2010, 08:15 AM
Hm, I'm getting RuntimeError: could not create GdkPixmap object errors as a result of an assertion fail right after the MESSAGE line and no other response :) :( Will post the exact output here when I regain connectivity on my N900...
Yes, I have seen that, too. It's still a little buggy and I think this Runtime error comes from not getting a reply from the carrier. I'm still investigating this.
KiberGus
01-06-2010, 08:22 AM
Here is garage project and my deb
https://garage.maemo.org/frs/?group_id=1219
What is done:
Files are placed in appropriate places (may be excepting config file)
Command line utility which would understand if encoding is 72 (used by Russian operators) and handle it properly. In other case no conversion one.
Home widget - button, which executes query and shows it as a text on it. Pressing button would execute query again.
GUI configuration (press on configure button in layout mode)
Known bugs:
GUI configuration would work after
chmod 777 /etc/ussdWidget.conf
On some systems it would break desktop layout mode: in layout mode pressing on menu which normally sujjests what to add to desktop would stop working. The same code on my device works. I think, that some dependences are missing.
pycage
01-06-2010, 08:30 AM
Ah, the carrier gives you 68 for the encoding. I'll look that up in the GSM Encodings manual.
Let's see...
68 = %(0100)(0100) = (General Data Coding, uncompressed, no message class) (8bit alphabet)
Yes, I think that must be it according to http://www.mobilecity.cz/doc/GSM_03.38_5.3.0.pdf page 11.
pycage
01-06-2010, 08:43 AM
Command line utility which would understand if encoding is 72 (used by Russian operators) and handle it properly.
72 = %(0100)(1000) = (General Data Coding, uncompressed, no message class) (USC2 16 bit)
Hooray, it all makes sense! :D
pycage
01-06-2010, 09:00 AM
On some systems it would break desktop layout mode: in layout mode pressing on menu which normally sujjests what to add to desktop would stop working. The same code on my device works. I think, that some dependences are missing.
I think it breaks because it blocks with a USSD request immediately after being started. Where /etc/sudoers is not modified it will wait indefinitely for a password.
I notice that you use sudo for sending the AT commands. Maybe a better way is to setuid root pnatd. My USSD Pad does this in the postinst script, so that regular users may use it. This shouldn't be a bigger security hole than explicitly enabling pnatd for passwordless sudo.
davost
01-06-2010, 09:14 AM
If you didnt already found it out. The text encoded with 68 is just plain asci but hex encoded. Can be easily endoded back thought.
http://i47.tinypic.com/2le6uds.png
VDVsx
01-06-2010, 11:23 AM
If you didnt already found it out. The text encoded with 68 is just plain asci but hex encoded. Can be easily endoded back thought.
http://i47.tinypic.com/2le6uds.png
Cool, very nice message saying that I don't have any money on that SIM card :D
KiberGus
01-06-2010, 05:13 PM
Cool, very nice message saying that I don't have any money on that SIM card :D
New version of ussd-widget available. Should support you encoding. This widget shows result of USSD query on your desktop. The main purpose is to have rapid access to balance information. Pressing on widget would refresh it.
You can download it from
https://garage.maemo.org/frs/?group_id=1219
First install pexpect, then ussd-common, then ussd-widget. ussd-pad would be using the same code( ussd-common) and support the same encodings.
pycage
01-06-2010, 05:40 PM
We (KiberGus and I) have created a more generic GSM decoding library now. Now we need some tests from real users in different countries to see where stuff doesn't get decoded correctly, yet.
VDVsx
01-06-2010, 05:46 PM
We (KiberGus and I) have created a more generic GSM decoding library now. Now we need some tests from real users in different countries to see where stuff doesn't get decoded correctly, yet.
Thanks. I'll continue helping, just throw links to the new versions here :D
pycage
01-06-2010, 05:56 PM
For now it's the widget for testing. I haven't worked on the USSD Pad app today. I will continue there tomorrow.
VDVsx
01-06-2010, 06:17 PM
I installed the 3 packages, but the widget seems broken, when I add it nothing happens.
KiberGus
01-06-2010, 06:28 PM
I installed the 3 packages, but the widget seems broken, when I add it nothing happens.
Can you please run
python /usr/lib/hildon-desktop/ussd-widget.py
from root.
VDVsx
01-06-2010, 06:47 PM
Can you please run
python /usr/lib/hildon-desktop/ussd-widget.py
from root.
Nothing happens, it just fallback to the command line after the command
KiberGus
01-06-2010, 07:02 PM
Nothing happens, it just fallback to the command line after the command
On russian forum similar issue was caused by missing dependency. I've fixed it in new ussd-widget_0.0.0-3_all.deb
But it seems, that your case is a bit different.
Please check, that widget didn't appear on another desktop, it's a small button. The fact, that it still stays in add widget menu is normal: you can add multiple instances of this widget, but they would use the same number yet.
VDVsx
01-06-2010, 07:19 PM
On russian forum similar issue was caused by missing dependency. I've fixed it in new ussd-widget_0.0.0-3_all.deb
But it seems, that your case is a bit different.
Please check, that widget didn't appear on another desktop, it's a small button. The fact, that it still stays in add widget menu is normal: you can add multiple instances of this widget, but they would use the same number yet.
Nop, nothing there, maybe is some new bug introduced by the firmware that I've. Someone with PR1.1 please test this.
mhamze
01-07-2010, 05:05 AM
Sorry where i can find this widget in order to install ?
pycage
01-07-2010, 05:19 AM
Sorry where i can find this widget in order to install ?
It's available from here:
https://garage.maemo.org/frs/?group_id=1219
We are also going to upload to extras-testing soon.
viasat
01-07-2010, 08:03 AM
Same here,identical situation with @VDVsx ,I've instaled the files via dpkg command,and when I was trying to install the last file (widget) it's complaining about missing dependency python-hildondesktop,I've installed via apt-get,after that no more complaints,but it's not working either.When I select ''add ussd widget'' from menu,nothung appears on any desktop,and when I try the command line,it's just reverting back to the prompt command.I've the latest oficial firmware,and I can't consult my credit withe the command *123# on Vodafone.
Anyway thanks for trying to help us!
Cheers
pycage
01-07-2010, 05:32 PM
Which firmware version do you have? I just tried on a clean N900 with 42-11 without any problems.
pycage
01-07-2010, 05:34 PM
Please try installing hildon-desktop-python-loader and see if that makes a difference.
BTW, a new release of ussd-pad is also available @ https://garage.maemo.org/frs/?group_id=1219
qwerty12
01-07-2010, 06:04 PM
Installing hildon-desktop-python-loader made no difference.
I was able to get it [the widget] started from the command line by moving "import gobject" to the beginning, creating an object of type UssdWidgetPlugin, showing_all() and doing a gtk.main().
I'll stick with the pad, as having to run the widget from X Terminal isn't fun.
One suggestion, however; emit the "settings-changed" signal if the button's label is "Configure me" so that it can quickly be configured instead of trying to "dial" out an empty number.
Thanks, pycage and KiberGus.
VDVsx
01-07-2010, 06:40 PM
Works fine now. Thanks.
http://farm5.static.flickr.com/4019/4254411989_d54436f702_o.png
KiberGus
01-07-2010, 08:13 PM
New version of widget available. Now it it looks much better and it's transparent. Initial support for additional parsing (I got some requests for ability to cut off spam which MO add to the end of replyes).
And now I understood what gtk.main was intendet for. If widget doesn't run, launch it from command line:
python /usr/lib/hildon-desktop/ussd-widget.py
And look what happens.
rlinfati
01-08-2010, 04:39 AM
i run as root
chmot 755 /usr/lib/hildon-desktop/ussd-widget.py
and now work the widget (0.0.1-0)
rlinfati
01-08-2010, 04:44 AM
any example how use "the parser" ?
KiberGus
01-08-2010, 05:40 AM
This functionality is commented in the code. Idea was that you specify comman libe utility, widget would invoke it, pass reply to stdin, read stdout and show the result.
It didn't work with cat yesterday and I wanted to sleep.
pycage
01-08-2010, 06:19 AM
any example how use "the parser" ?
import gsmdecode
# pnatd gives you something like this
# +CUSD: 0,"4F207072617A6F2...",68
# in this example: reply = "4F207072617A6F2..."
reply = ...
# in this example: encoding = 68
encoding = ...
msg = gsmdecode.decode(reply, encoding)
print msg
KiberGus
01-08-2010, 06:42 AM
2 pycage
In new version of widget I started to implement ability to parse reply before it is beeng shown. So iun the configuration dialog there is edit field called "Parser"
BTW Some people get such errors
/home/user # python /usr/lib/hildon-desktop/ussd-widget.py
process 1817: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
This is normally a bug in some application using the D-Bus library.
process 1817: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
This is normally a bug in some application using the D-Bus library.
Aborted
I can't understand, what can cause this. May somebody here knows?
KiberGus
01-08-2010, 01:48 PM
2 pycage
BTW Some people get such errors
/home/user # python /usr/lib/hildon-desktop/ussd-widget.py
process 1817: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
This is normally a bug in some application using the D-Bus library.
process 1817: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
This is normally a bug in some application using the D-Bus library.
Aborted
I can't understand, what can cause this. May somebody here knows?
I caught it myself at some moment. Error appear on
import hildon
At the same time error didn't appear if I started script from user (not root). Right now this bug doesn't appear any more.
New version available. You can add scripts for postprocessing replyes and now widget updates by timer (if you want it to do it).
If query failed previous text would be shown again, but border of the widget would turn red.
joelus
01-09-2010, 10:27 AM
Just some feedback: It's working fine here in South Africa on the Vodacom network. *100# returns balance as it's supposed to. We also have a USSD menu system whereby *111# brings back a menu of numbered items - you just enter the number on the menu and send that and it returns either a submenu or the result of your query. This is how prepaid users buy data bundles, check various balances etc. The menu doesn't display properly on ussd-pad - the top menu items are off the top of the screen and the bottom menu items are layered over the ussd keypad but the functionality does work - I successfully navigated through various menus to purchase a data bundle using ussd-pad. I also tried loading airtime which doesn't work, I think the string is too long for a buffer or something like that. We use *100*01*123123123# to load a voucher with the code 123123123, but a long error message was returned when attempting it...
VDVsx
01-09-2010, 11:57 AM
Out of the blue I got 10+ "configure me" buttons in my desktop, now the widget works :D
2l00Z
01-11-2010, 10:42 AM
2 KiberGus and pycage
Widget and ussd-pad work great (MegaFon - SPb, Russia).
http://distrib.avangard.data.cod.ru/photos/0/d/6/w400_fe3acde192ba1d98d152f1ec015896d0.jpg
Some notes and wishes for the widget:
1. Add option to close or hide message text. (I don't like to see advertising **** on the desktop all the time.)
2. May be to implement forced line breaks after 70-80 characters in the answer to view whole text on the desktop?
3. Correct "meaming" to "meaning" in the help text of the widget configuration dialog .
Thanks.
KiberGus
01-11-2010, 12:02 PM
Due to this bug ussd-widget can't be made responsive.
https://bugs.maemo.org/show_bug.cgi?id=7809
So now I'll dscontnue it's development and when I'll have time I'll
1) Continue it if the bug will be fixed
2) Reimplement widget in C++ otherways
P.S. You can write a script, which will cutt off advertisement and specify it in "parser" settings.
irmin
01-11-2010, 12:09 PM
I added configurable regexp option to this excellent widget.
It matches received data against user-provided regexp and returns first capturing parentheses data.
For example, for MTS Russia you have to provide (.+?[\d\,\.]+) regexp to get only "Balance: 123,34" in a message window.
Regexp matching applied at the end of message processing chain.
I've attached both diff file (for developers) and complete modified /usr/lib/hildon-desktop/ussd-widget.py for those who want to try it.
Python regexp documentation can be found there (http://docs.python.org/library/re.html).
irmin
01-11-2010, 12:52 PM
I wasn't able to add widget from menu while starting it from command line worked fine.
Adding import gobject as first import directive at the beginning of the file seems (as someone mentioned in this thread before) to solve the problem.
KiberGus
01-11-2010, 01:03 PM
I wasn't able to add widget from menu while starting it from command line worked fine.
Adding import gobject as first import directive at the beginning of the file seems (as someone mentioned in this thread before) to solve the problem.
I'll make a release with all your patches this evening. Beside that it would contain code refactored for thread support. But threads would be disabled because they don't work in hildon-home environment. BTW timer doesn't work too, so I'll disable it.
irmin
01-11-2010, 05:36 PM
I'll make a release with all your patches this evening. Beside that it would contain code refactored for thread support. But threads would be disabled because they don't work in hildon-home environment. BTW timer doesn't work too, so I'll disable it.
Seems that I almost solved the problem with interface blocking during long i/o calls.
The solution with gobject i/o Martin Grimme advised (https://bugs.maemo.org/show_bug.cgi?id=7809#c1) is working nice on tests (i.e. I can run other shortcuts during long call and interact with other widgets) when running both as standalone script and from hildon menu.
I'll post a patch this night after making my code more readable :)
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him ;)
GeneralAntilles
01-11-2010, 06:02 PM
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him ;)
It's hardly worth dignifying a statement like this with a response, but I can't let such an insulting comment about such a dedicated member of this community go past without one.
Let me explain a bit about the kind of position Andre is in. Maemo has two separate bugtracking systems. The first is the public tracker you see at http://bugs.maemo.org, the second is the internal tracker that sits behind Nokia's firewall. Andre is very nearly the only connection between these two trackers. What this means is that it's his job to forward information back and forth between the two trackers.
Unfortunately this puts him between a rock and a hard place, as many people (apparently yourself included) interpret Nokia's positions and tone as his own. He's got a hard job, there's no need to make it more difficult by being unpleasant. A good attitude will get you far. :)
KiberGus
01-11-2010, 06:06 PM
Thank you very much. I've compiled deb with your patches and it is in garage now.
irmin
01-11-2010, 06:25 PM
Unfortunately this puts him between a rock and a hard place, as many people (apparently yourself included) interpret Nokia's positions and tone as his own. He's got a hard job, there's no need to make it more difficult by being unpleasant. A good attitude will get you far. :)
Ryan, if one can't do his job well - it's bad. Usually it's better to not do such public job at all rather then trying to work 16 hours per day, have an headache due to overload and write comments which make people feel... strange.
Currently the only option I see which can help to overloaded Andre "The-Only-Connection" Klapper is not to try discuss with him at all. His time is too precious for both sides.
May be community can do something more to fix it? Ask Nokia management to find more personnel for this job for example?
Kieron
01-11-2010, 06:54 PM
Ryan, if one can't do his job well - it's bad. Usually it's better to not do such public job at all rather then trying to work 16 hours per day, have an headache due to overload and write comments which make people feel... strange.
Currently the only option I see which can help to overloaded Andre "The-Only-Connection" Klapper is not to try discuss with him at all. His time is too precious for both sides.
May be community can do something more to fix it? Ask Nokia management to find more personnel for this job for example?
If only there were a no-thanks button.
2l00Z
01-11-2010, 08:01 PM
New widget with regexp works fine, but dimensions of the window still remain too big (seems corresponding to reply string length before regexp-ing)
width, height = self.allocation[2], self.allocation[3]
I explicitly set width=180, height=50 and decrease radius to make the window better fit to my "reply".
Though I think it's not a "kocher" way.
irmin
01-11-2010, 08:37 PM
Thank you very much. I've compiled deb with your patches and it is in garage now.
I have added gobject non-blocking i/o and started to wrap widget methods into class. If you as main author like it - then you can continue such refactoring. If not - it is possible to rewrite it without class though it adds ugly global variables (the main reason I decided to implement extra class for callback processing).
Also config file now is being read during.startup only.
Attached are diff file against version 0.0.2(sorry that not against latest one) and complete widget file.
pycage
01-12-2010, 04:22 AM
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him ;)
Andre is doing a great job but he is not the person for in-depth technical discussions. He cannot keep up with all stuff that's going on with Maemo (nobody can). He's transferring bug reports to Nokia and back, and he helps keeping the bugzilla clean and running, and sometimes takes work off us app developers by making remarks where he knows the stuff (e.g. experiences from earlier bug reports).
Yes, he sometimes asks weird questions, or doesn't get what you mean, but that's because it's impossible to keep up with all Maemo stuff.
jackie_jagger
01-12-2010, 04:58 AM
OK I tried installing the deb file from the garage page. I installed all dependencies..I get this error
"File "/usr/bin/ussdquery.py", Line 42, in <module>
reply = gsmdecode.decode(reply, int(encoding))
ValueError: invalid literal for int () with base 10: "
what is the matter how can I fix this :)
thanks in adv.
Cheers
Jackie
2l00Z
01-12-2010, 05:57 AM
2 irmin.
Now the widget works and looks great without manually settings of the window dimensions
http://distrib.avangard.data.cod.ru/photos/c/9/9/w400_24fc02e6b298391fde816e566adbb99c.jpg
Thank you very much.
irmin
01-12-2010, 06:07 AM
2 irmin.
Now the widget works and looks great without manually settings of the window dimensions
http://distrib.avangard.data.cod.ru/photos/c/9/9/w400_24fc02e6b298391fde816e566adbb99c.jpg
Thank you very much.
Actually, as I understand, current widget box expands automatically but cannot shrink yet. When you restarted widget it began from small box with "update", and later expanded a bit to fit regexp match. There's absolutely nothing in my patch that could fix it.
So it'll keep a small size until you start experiment with regexp again.
I may be wrong as I never worked with GTK (for this patch I just copypasted existing GUI code:). I hope KiberGus will find some time to add autoshrinking for widget.
2l00Z
01-12-2010, 07:44 AM
So it'll keep a small size until you start experiment with regexp again.
Yes I can confirm it. I removed regexp and then I had a headache to get small box back.
KiberGus
01-12-2010, 01:13 PM
Right now I'm making further refactoring of code. I think, I'lladd autoresize.
Erros, I've seen above means ussdquery.py didn't succeed in making query. Ussd-widgets ignores them and shows "ERROR", so they are not critical.
jackie_jagger
01-13-2010, 04:09 AM
Right now I'm making further refactoring of code. I think, I'lladd autoresize.
Erros, I've seen above means ussdquery.py didn't succeed in making query. Ussd-widgets ignores them and shows "ERROR", so they are not critical.
hey there,
yes it suddenly worked after 20 mins of cont. retrying and have never gotten that error again.
Thank you
Andre Klapper
01-14-2010, 04:10 PM
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him ;)
Irmin, feel free to drop me an email if you see issues with my behaviour / attitude / statements / etc.
Sometimes I'm quite direct (which might be interpreted as unfriendly by some folks), often due to lack of time, but I don't think that I've been rude so far. If you have some examples, please tell me - I'm more than willing to learn and improve.
domox
01-15-2010, 02:47 PM
Somebody can tell me if there is any way to type the #131# in cellphone mode.
In my cellphone privider the #131# command is for cheking the balance of the cellphone but in my n900 i can't becouse when i type any number between # and # for example #131# the cellphone display a message "Wrong number".
Can any one helpe to solve this?
floffe
01-15-2010, 05:04 PM
Numbers with *# are not supported in the current firmware. See http://talk.maemo.org/showthread.php?t=32878 (particularly the later pages, they have a widget that works) and https://bugs.maemo.org/show_bug.cgi?id=5357
sjgadsby
01-15-2010, 05:08 PM
The thread "Error typing number in cellphone mode" with two posts has been merged into this thread.
Numbers with *# are not supported in the current firmware. See http://talk.maemo.org/showthread.php?t=32878 (particularly the later pages, they have a widget that works) and https://bugs.maemo.org/show_bug.cgi?id=5357
This problem has been fixed but don't expect it for another 4 to 6 months. Don't ask me why...
Andre Klapper
01-17-2010, 09:43 AM
This problem has been fixed but don't expect it for another 4 to 6 months. Don't ask me why...
That's FUD.
Matan
01-17-2010, 09:47 AM
And all the FUD is Nokia's fault. Nokia don't announce update plans, so there is uncertainty.
We saw the treatment the N810 got, so we have fear and doubt for the future of the N900.
abhijit4569
01-17-2010, 12:21 PM
I have just updated my N900 to 2.2009.51-1.003.
BUT STILL NO USSD FUNCTIONALITY:mad:.
Sorry for screaming, had to let it out.
In india those using Airtel GSM cards send message AIRTEL to 121 and reply with your options to view the balance.
Its long way to know but runs none the least.
As for the update is it just my optimism or I think the transiton animation and screen is looking more responsive and alive.
If you get my meaning:)
*Sonic*
01-17-2010, 12:25 PM
This is somewhat poor really as Vodaphone require you to put the sim into the phone and dial *#00# to get your mobile number and start your account
And that is a sticker on the N900 box !
sdon21
01-19-2010, 09:03 AM
I have just updated my N900 to 2.2009.51-1.003.
BUT STILL NO USSD FUNCTIONALITY:mad:.
Sorry for screaming, had to let it out.
In india those using Airtel GSM cards send message AIRTEL to 121 and reply with your options to view the balance.
Its long way to know but runs none the least.
As for the update is it just my optimism or I think the transiton animation and screen is looking more responsive and alive.
If you get my meaning:)
hey i have airtel as well and i was wondring how to get the gprs setting for the 98rs plan since you cant dial the number(*567*13#) to get the settings ..
Venomrush
01-21-2010, 12:57 AM
This is somewhat poor really as Vodaphone require you to put the sim into the phone and dial *#00# to get your mobile number and start your account
And that is a sticker on the N900 box !
Great, Vodafone will start getting hammered by complaints and hopefully will pull N900 from sale like they did with SE :)
That should push the fix forward.
Marshall Banana
01-21-2010, 11:57 AM
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:
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.
Thanks for that, I was having the same problem with Virgin Mobile in France, with your hack it works!
Edsal
01-21-2010, 06:34 PM
The phone cost 500 plus it should all this stuff in it already !!
rickrvo
01-21-2010, 08:31 PM
Hi,
I've bought a n900 and for me to check my current funds i need to call *555# and on n900 I get an "invalid number" error...
Please fix this issue on the new maemo 5 version.
Thanks
b666m
01-21-2010, 08:36 PM
there's already an existing thread about this one:
http://talk.maemo.org/showthread.php?t=32878
sjgadsby
01-21-2010, 09:19 PM
The thread "Need to fix the phone program to work portuguese services" with two posts has been merged with this thread.
KiberGus
01-22-2010, 02:04 PM
New ussd-widget is out. Changes:
* Non-blocking queries, hildon-home doesn't hang any more
* Regexp support
* Automatically shrinks width (not height)
* Word wrap
* Timed renew
* Localization support (russian localization available)
New version of ussd-common:
* Tries to initialize modem several times
* More robust, all exceptions are caught
https://garage.maemo.org/frs/?group_id=1219
After installation reconfigure vidget: config format has changed.
jgarneau
01-23-2010, 11:45 PM
When i dial *21# i got «UNKNOWN APPLICATION»
*21# is the Call Forwarding code for my phone company.
12vibes
01-24-2010, 10:32 AM
I have firmware 2 2009 51-1.203.2 which i have just updated over the air but the code *#1345# is still not working. Am I doing something wrong or is it still not supported.
Thanks
sjgadsby
01-24-2010, 10:38 AM
The thread "Balance Check on ASDA sim" with one post has been merged into this thread.
andyk74
01-24-2010, 06:00 PM
Hello, just tried to call *111# on Tele2 Sweden. Got error.
By using pnatd and terminal, got reply, one character was Swedish.
Should i use regexp on widget to get it working ?
cross3131
01-24-2010, 06:26 PM
can anyone please help step by step for newbies?
Thanks...
just an info for german tmobile prepaid-users:
you can dial the number 2000 as well!
its free and a voice tells you how much credit is left on your sim.
i guess other providers have similar numbers you can call!
blurbi
01-25-2010, 08:22 AM
i'm staying in malaysia and using prepaid. In order for me to check my balance, i need to dial *126# and it doesnt work on my new N900. Can anybody helps?
sgbirch
01-25-2010, 08:30 AM
If anyone answers this question could they also tell us how to add a pause to a dialing sequence? This is important if you want to set up a contacts entry to navigate a voice menu.
For example, if a company always answers and says "press one for an operator" one would like a contacts entry which does this:
1. Dial the company's number
2. Delay 2 secs (HOW DO YOU DO THIS ????)
3. Send '1'
aboaboit
01-25-2010, 08:34 AM
i'm staying in malaysia and using prepaid. In order for me to check my balance, i need to dial *126# and it doesnt work on my new N900. Can anybody helps?
It is not possible at the moment because of bug 5357 (https://bugs.maemo.org/show_bug.cgi?id=5357). A workaround is mentioned in comment 121 (https://bugs.maemo.org/show_bug.cgi?id=5357#c121)
Didn't somebody write an app for that?
USSD pad & ussd widget are in development.
http://farm3.static.flickr.com/2753/4265993645_eff3a9fb75.jpg
blurbi
01-25-2010, 11:25 AM
thanks!!!!
blurbi
01-25-2010, 11:27 AM
can anyone please help step by step for newbies?
Thanks...
newbie here too..pls help :confused:
sjgadsby
01-25-2010, 11:34 AM
The thread "dialing * / # number using N900" with five posts has been merged into this thread.
Marshall Banana
01-25-2010, 12:21 PM
First a warning:
The software you want to install is not ready for end users and it is even not yet in extras-devel. Please read this first:
Seriously: don't send users out of Extras without a big warning (http://talk.maemo.org/showthread.php?p=343619)
Update: ussd-widget is now in the extras-devel/testing repository. You can install it by adding the extras-devel/testing repository
There are two applications for ussd:
ussd-widget: A widget on your homescreen. You can use to display your account balance for example.
ussd-pad: An application with a dialpad. You can enter an ussd-code and see the result
First you need to be root to use dpkg to install the .debs you download from garage.maemo.org, so you have to install rootsh form the maemo extras repository.
Install ussd-pad:
Go to https://garage.maemo.org/projects/ussd-widget/ and download the .debs for ussd-common, pexpect and ussd-pad and save them in your Documents folder
Open x-term and type:
sudo gainroot
cd MyDocs/.documents
dpkg -i pexpect_2.3.0-1_all.deb
dpkg -i ussd-common_0.0.1-0_all.deb
dpkg -i ussd-pad_2010.01.07_armel.deb
You can use the tab button or press ctrl+i to autocomplete directorys and filenames.
Now you can try the ussd-pad application. It might not work if the answer from your provider contains non-ascii characters (like öäü), in this case you can try this: http://talk.maemo.org/showpost.php?p=486843&postcount=101. ussdquery.py is in /usr/bin. Danger! Shoddy programming! :)
Install ussd-widget:
Go to https://garage.maemo.org/projects/ussd-widget/ and download the .debs for ussd-common, pexpect and ussd-widget and save them in your Documents folder. If you installed ussd-pad before you dont need to install ussd-common and pexpect again.
ussd-widget needs two dependencies to work: python-hildondesktop and hildon-desktop-python-loader. They are in the maemo extras repository.
Open x-term and type (you can use tab to autocomplete the filenames:
sudo gainroot
cd MyDocs/.documents
apt-get install python-hildondesktop
apt-get install hildon-desktop-python-loader
dpkg -i pexpect_2.3.0-1_all.deb
dpkg -i ussd-common_0.0.1-0_all.deb
dpkg -i ussd-widget_0.0.4-0_all.deb
Now a widget on your desktop appears, configure it with an ussd-code. Mine shows my account balance.
lendurhenry
01-25-2010, 03:54 PM
My respect for developers here. I still can’t understand why it was not implemented even after major update by Nokia.
I used lot of business applications based on USSD before. For example I have dual-number SIM. To switch from work number to personal number I had to send USSD command. And believe me, there is no easier way to do this. It was possible to store USSD commands into phone book. It would be even easier to use with N900 because there is possible to add contacts on the desktop. But surprise, none of these commands work.
Is it really that hard to let phone to dial USSD command instead of phone number? I don’t expect even any response, just need to send the command. As I understand these applications do not help me to achieve this?
Henry
Marshall Banana
01-25-2010, 04:32 PM
I used lot of business applications based on USSD before. For example I have dual-number SIM. To switch from work number to personal number I had to send USSD command. And believe me, there is no easier way to do this. It was possible to store USSD commands into phone book. It would be even easier to use with N900 because there is possible to add contacts on the desktop. But surprise, none of these commands work.
Henry
If the code that is used for changing the number is a message to the provider like, for example: *109*(Phonenumber)# you can put ussd-widget on your desktop and configure it to send this code. But you will have to change the configuration every time you want to change your number bcause at the moment every ussd-widget you put on your desktop uses the same config file.
It would be nice if a future ussd-widget version would support multiple instances with different config files.
lendurhenry
01-25-2010, 06:06 PM
This works like this:
*200*0# - activates main number
*200*1# - activates additional number
*200*1*600# - activates additional number for 10minutes (600sec).
*200*8# - hides your number while originating call
*200*9# - makes you unavailable from other number
So I need multiple shortcuts in the desktop. It would be nice to see a conformation message like Maemo shows warnings (in the yellow line over screen) but this is not important.
blurbi
01-25-2010, 08:29 PM
doesnt work for me :(
attila77
01-25-2010, 08:39 PM
cd is case sensitive, you need to type MyDocs, not mydocs
blurbi
01-25-2010, 08:45 PM
cd is case sensitive, you need to type MyDocs, not mydocs
i corrected it and it doesnt work...
attila77
01-25-2010, 08:53 PM
Ah, I just read the post you're probably referring to (#121), so it's cd /home/user/MyDocs/.documents
delaroca
01-26-2010, 03:35 AM
just an info for german tmobile prepaid-users:
you can dial the number 2000 as well!
its free and a voice tells you how much credit is left on your sim.
For Vodafone, is the equivalent number: 22922 -- can you confirm?
--denis
If anyone answers this question could they also tell us how to add a pause to a dialing sequence? This is important if you want to set up a contacts entry to navigate a voice menu.
For example, if a company always answers and says "press one for an operator" one would like a contacts entry which does this:
1. Dial the company's number
2. Delay 2 secs (HOW DO YOU DO THIS ????)
3. Send '1'
If you are syncing with outlook, you may add it there... At least it works for me.
KiberGus
01-26-2010, 10:43 AM
It would be nice if a future ussd-widget version would support multiple instances with different config files.
Already done. But it is not released to public yet.
In a good case, new version would be today in ecstras-devel and there would be an article how to implement multiple widgets behavior. Or, may be, you would have to wait a couple of days.
doesnt work for me :(
Whe you say "doesn't work" alweays say how exactly it doesn't work, or nobody would help you because nobody would understand what has happened and how to help you.
KiberGus
01-26-2010, 03:16 PM
New version is available at garage and in extras-devel. (ussd-common and ussd-widget are updated, package manager would fetch ussd-comon as dependency).
Now you can create several widgets with different settings and widget can try to reexecute query if it fails. Some regressions fixed too.
I also have written HOWTO, which describes how to write widgets, which support multiple instances:
http://kibergus.su/?q=node/1
irmin
01-26-2010, 11:54 PM
New version is available at garage and in extras-devel. (ussd-common and ussd-widget are updated, package manager would fetch ussd-comon as dependency).
Now you can create several widgets with different settings and widget can try to reexecute query if it fails. Some regressions fixed too.
I also have written HOWTO, which describes how to write widgets, which support multiple instances:
http://kibergus.su/?q=node/1
Glad to see this widget is in the repository now. Gratz :)
lendurhenry
01-27-2010, 03:14 AM
Than you, KiberGus. N900 is almost perfect phone now, only videocall is missing.
I suggest adding two fields:
Name – that would be initial text in the widget. It should be restored after restart maybe.
Replace with result – (checkbox, checked by default) indicates that the result should be shown by message box instead of replacing the name if not checked.
As I mentioned earlier I am not using USSD for querying information. I use it to activate service status. Response indicates which status is active. For example I use dual number service. I have two USSD widgets on screen. One activates first number by *200*0# and other activates second number by *200*1# (don’t try, it works only with my mobile operator Elisa if you have ordered this). Now, after testing it, I have two widgets on the desktop, both says „Activated number is …“. It confuses – which?
Or maybe the best solution would be to group USSD widgets and restore others names in this group while using one of those. This means you have to add two more fields – group name and check-box to indicate that only one of them can show the result at the time.
adancau
01-27-2010, 04:11 AM
Also a font size selector might be a very good idea in the widget settings, at the moment it takes quite a bit of space with certain operator replies and it would be nice to be able to reduce the size.
irmin
01-27-2010, 04:14 AM
Also a font size selector might be a very good idea in the widget settings, at the moment it takes quite a bit of space with certain operator replies and it would be nice to be able to reduce the size.
use regexp to cut required information from replies.
adancau
01-27-2010, 04:45 AM
use regexp to cut required information from replies.
not really an option. basically the reply message lists the remaining minutes under different options, and i'd like to know what each number represents (in short, all of it is required information)
adding a font size selector would allow the user more flexibility.
KiberGus
01-27-2010, 06:06 AM
Than you, KiberGus. N900 is almost perfect phone now, only videocall is missing.
I suggest adding two fields:
Name – that would be initial text in the widget. It should be restored after restart maybe.
Replace with result – (checkbox, checked by default) indicates that the result should be shown by message box instead of replacing the name if not checked.
As I mentioned earlier I am not using USSD for querying information. I use it to activate service status. Response indicates which status is active. For example I use dual number service. I have two USSD widgets on screen. One activates first number by *200*0# and other activates second number by *200*1# (don’t try, it works only with my mobile operator Elisa if you have ordered this). Now, after testing it, I have two widgets on the desktop, both says „Activated number is …“. It confuses – which?
Or maybe the best solution would be to group USSD widgets and restore others names in this group while using one of those. This means you have to add two more fields – group name and check-box to indicate that only one of them can show the result at the time.
Use parser command. For eample using
echo "1st number"
as parser would show "1st number" string on widget.
echo "name:" "%"
would show "name: <operators reply>"
lendurhenry
01-27-2010, 07:18 AM
Use parser command. For eample using
echo "1st number"
as parser would show "1st number" string on widget.
echo "name:" "%"
would show "name: <operators reply>"
Thank you.That was useful hint. I was trying to write regexpression to replace “Activated number is” with “Activate:“. Now I am wondering is it possible to write several commands like:
alert “%”;
echo “Activate: …”;
niqbal
01-27-2010, 07:53 AM
first of all amazing job as far as widget is concerned. i didnt try pad. i have a question. operator reply is
blah blah blah blah blah blah. Ur account balance; amount.
how can i write an expression to kill everything before account balance sentence.
KiberGus
01-27-2010, 03:18 PM
Thank you.That was useful hint. I was trying to write regexpression to replace “Activated number is” with “Activate:“. Now I am wondering is it possible to write several commands like:
alert “%”;
echo “Activate: …”;
Widget itself can execute only one command. But you can write bash script and configure widget to launch the script.
first of all amazing job as far as widget is concerned. i didnt try pad. i have a question. operator reply is
blah blah blah blah blah blah. Ur account balance; amount.
how can i write an expression to kill everything before account balance sentence.
Widget shows part of the string, which matches the expression. This is how expressions are written:
http://docs.python.org/library/re.html
So it could be something like
balance: [\d\.\,]*
KiberGus
01-27-2010, 03:21 PM
Also a font size selector might be a very good idea in the widget settings, at the moment it takes quite a bit of space with certain operator replies and it would be nice to be able to reduce the size.
Would be implemented. Naming of widgets may be would be implemented.
Right now I'm more interested in logging amount of money on my balance (that is what "chain" is made for) and plotting it with information about calls, messages and traffic. They say, that operators steal money and I believe this, but I don't have good tools for control right now. Want to fix it.
vinz486
01-27-2010, 03:38 PM
From a bug, unable to send USSD, to a superfeature, a widget showing my balance!
Thanks!!!
But i noticed that the 'parser' config line is lost on reboot. It's a widget problem or my phone is buggy?
KiberGus
01-27-2010, 04:09 PM
From a bug, unable to send USSD, to a superfeature, a widget showing my balance!
Thanks!!!
But i noticed that the 'parser' config line is lost on reboot. It's a widget problem or my phone is buggy?
This is a widget bug, I think.
But i noticed that the 'parser' config line is lost on reboot. It's a widget problem or my phone is buggy?
It works fine (for me) in 0.0.4-0.
-jkq
niqbal
01-27-2010, 05:02 PM
Widget itself can execute only one command. But you can write bash script and configure widget to launch the script.
Widget shows part of the string, which matches the expression. This is how expressions are written:
http://docs.python.org/library/re.html
So it could be something like
balance: [\d\.\,]*
took me a few hours but it was worth writing a regexp to extract just the balance.
vinz486
01-27-2010, 05:18 PM
This is a widget bug, I think.
Can i know where the python script save the config so i can whatch via ssh what's happen?
neboja
01-27-2010, 05:48 PM
http://translate.google.com/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fmaemos.ru%2F2010%2F01%2F14%2Fussd-n900-maemo%2F
KiberGus
01-27-2010, 05:57 PM
.ussdWidget.conf in your home.
/home/user/.ussdWidget.conf if you run widget as usual.
vinz486
01-27-2010, 05:59 PM
http://translate.google.com/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fmaemos.ru%2F2010%2F01%2F14%2Fussd-n900-maemo%2F
???
config files, not .deb
KiberGus
01-27-2010, 06:00 PM
http://translate.google.com/translate?hl=en&sl=ru&tl=en&u=http%3A%2F%2Fmaemos.ru%2F2010%2F01%2F14%2Fussd-n900-maemo%2F
This instruction is bad because author gave direct links to deb's. New versions are available, so, please, use NEW versions. ussd-widget 0.0.4 was mostly rewritten.
neboja
01-27-2010, 06:09 PM
ok! thanks wary much! (i forgott to type "???" )
vinz486
01-27-2010, 06:15 PM
.ussdWidget.conf in your home.
/home/user/.ussdWidget.conf if you run widget as usual.
Thanks.
I think that error was caused by '=' in my parser string, that looks like:
perl -e '$r="%"; $r=.... etc
it's perl code in command line (i don't know python).
Let's go to study some python regex syntax :-D
vinz486
01-27-2010, 06:49 PM
Ok,
this is regex for Italy Wind *123# balance request:
.*(\d+\.\d+).*euro.*
jgarneau
01-28-2010, 01:39 AM
My firmware is: RX-51_2009SE_2.2009.51-1.002_PR_COMBINED_002_ARM.bin (Second Maemo 5 USA variant for Nokia N900 )
The USSD PAD and USSD Widget are showing correctly.
But, trying *21# or any USSD code returm the "UKNOWN APPLICATION"
Are you using the same firmware?
USSD-Pad 2010.01.07
USSD-Widget 0.0.5-0
What am-I doign wrong?
See the attached files.
KiberGus
01-28-2010, 02:52 AM
I think that error was caused by '=' in my parser string, that looks like:
Thanks, I'll change string splitting code.
But, trying *21# or any USSD code returm the "UKNOWN APPLICATION"
There is a code in modem string, which adjusts language on which reply should be. Right now 15 is hardcoded, which means "any language" if I'm not mistaken. May be you need another value.
neboja
01-28-2010, 11:57 AM
ok.... sorry people, i must ask something: from what repository can i download USSD-Pad and Widget????? i can't seem to find it anywhere on extras, or devel.... :P
KiberGus
01-28-2010, 12:50 PM
ok.... sorry people, i must ask something: from what repository can i download USSD-Pad and Widget????? i can't seem to find it anywhere on extras, or devel.... :P
widget should be in extras-devel. ussd-pad is not in repository.Bug with = in parser is fixed, would be available soon. Font settings and color settings would be available too.
neboja
01-28-2010, 12:51 PM
COOL! thx! ;)
patt2k
01-28-2010, 01:34 PM
In most phones you can just type #646# as a regular number hit call and you would receive message saying how many minutes you used in n900 i get incorrect number. is there any fix for that?
or #674# to see how many msgs u used or #225# for balance
sjgadsby
01-28-2010, 01:36 PM
The thread "T-Mobile US / Minute Check #646# ?" with one post has been merged into this thread.
jgarneau
01-28-2010, 10:36 PM
Can someone help me to understand why I got «UNKNOWN APPLICATION»?
nintendogs
01-28-2010, 10:43 PM
probably because *21# doesn't usually do anything on it's own.. what are you trying to do?
"unknown application" is the network's reply.
jgarneau
01-29-2010, 12:14 AM
*21# is the Call Forwarding code for Fido in Canada.
See «How do I Call Forward my phone?» on this link: http://www.fido.ca/web/content/faq/faq_call_forwarding
KiberGus
01-29-2010, 04:41 AM
Can someone help me to understand why I got «UNKNOWN APPLICATION»?
Try changing language. Instead 15 in at+cusd... command use another value, here is a table (numbers are binary, you should convert them to decimal):
Bits 3..0 indicate the language:
0000 German
0001 English
0010 Italian
0011 French
0100 Spanish
0101 Dutch
0110 Swedish
0111 Danish
1000 Portuguese
1001 Finnish
1010 Norwegian
1011 Greek
1100 Turkish
1101..1110 Reserved for European languages
1111 Language unspecified
This functionality would be included in next release.
nintendogs
01-29-2010, 06:19 AM
*21# is the Call Forwarding code for Fido in Canada.
See «How do I Call Forward my phone?» on this link: http://www.fido.ca/web/content/faq/faq_call_forwarding
but as I said, that doesn't do anything on it's own unless the network has a saved number for that specific divert which isn't usually the case.
the syntax is *21*number# to enable and #21# to disable, not *21#...
KiberGus
01-29-2010, 12:03 PM
New version available.
* Fixed buf with \n in reply
* Fixed bug with = in configs
* Customizable font
* Customizable colors
* Names for widgets
* You can select reply language (is supported by operator)
lendurhenry
01-29-2010, 02:05 PM
Very good job! I found some minor issues after testing:
Initial text is „Click to update“. It stays after setting up the name. Good thing is that it will be replaced after restart. That was a bit annoying before - I had to press each USSD command to get names. Maybe this is not bad idea to put this text as default name.
It shows status (Processing/Error) after name. Currently I have to add extra space after name. Maybe you can add hyphen between them. I would prefer if the name is replaced with status or result for few seconds, so I don’t have to reserve extra room for expanding. I hope you can implement a message box also in future. After that it will be perfect. ;)
shamoni8
01-30-2010, 09:58 AM
First a warning:
The software you want to install is not ready for end users and it is even not yet in extras-devel. Please read this first:
Seriously: don't send users out of Extras without a big warning (http://talk.maemo.org/showthread.php?p=343619)
There are two applications for ussd:
ussd-widget: A widget on your homescreen. You can use to display your account balance for example.
ussd-pad: An application with a dialpad. You can enter an ussd-code and see the result
First you need to be root to use dpkg to install the .debs you download from garage.maemo.org, so you have to install rootsh form the maemo extras repository.
Install ussd-pad:
Go to https://garage.maemo.org/projects/ussd-widget/ and download the .debs for ussd-common, pexpect and ussd-pad and save them in your Documents folder
Open x-term and type:
sudo gainroot
cd MyDocs/.documents
dpkg -i pexpect_2.3.0-1_all.deb
dpkg -i ussd-common_0.0.1-0_all.deb
dpkg -i ussd-pad_2010.01.07_armel.deb
You can use the tab button or press ctrl+i to autocomplete directorys and filenames.
Now you can try the ussd-pad application. It might not work if the answer from your provider contains non-ascii characters (like öäü), in this case you can try this: http://talk.maemo.org/showpost.php?p=486843&postcount=101. ussdquery.py is in /usr/bin. Danger! Shoddy programming! :)
Install ussd-widget:
Go to https://garage.maemo.org/projects/ussd-widget/ and download the .debs for ussd-common, pexpect and ussd-widget and save them in your Documents folder. If you installed ussd-pad before you dont need to install ussd-common and pexpect again.
ussd-widget needs two dependencies to work: python-hildondesktop and hildon-desktop-python-loader. They are in the maemo extras repository.
Open x-term and type (you can use tab to autocomplete the filenames:
sudo gainroot
cd MyDocs/.documents
apt-get install python-hildondesktop
apt-get install hildon-desktop-python-loader
dpkg -i pexpect_2.3.0-1_all.deb
dpkg -i ussd-common_0.0.1-0_all.deb
dpkg -i ussd-widget_0.0.4-0_all.deb
Now a widget on your desktop appears, configure it with an ussd-code. Mine shows my account balance.
do i have to use the pad? what if i don't want it?
Marshall Banana
01-30-2010, 12:33 PM
do i have to use the pad? what if i don't want it?
No you dont need to install ussd-pad if you don't need it.
Ussd-widget is in extras-devel now, so you just need to add the extras-devel repository (http://wiki.maemo.org/Extras-devel) and after that you can install ussd-widget with the Application Manager.
shamoni8
01-30-2010, 01:26 PM
do i need a connection to the net to install this? whenever i click on the app manager, it tells me to specify a data source?
also, it gave me errors
the first one told me to enable RD mode if i want to break my device
and the second one told me it could not open lock file/var/lib/dpkg/lock - open
and E: Unable to lock the admin directory, are you root?
plaban
01-30-2010, 01:31 PM
do i need a connection to the net to install this? whenever i click on the app manager, it tells me to specify a data source?
Yes you need internet connection in your mobile to install this.
jgarneau
01-30-2010, 03:13 PM
OK, I found a solution for my call forwarding problem with my Nokia N900:D
First, I am from Canada and I am using phone service with this company: http://www.fido.ca/
The condition may be different if you are from a different country or you are using a different company.
To call forward your call:
1.Open X Terminal
2.type «pnatd»
3.To call forward to number 14186562131 type «AT+CCFC=0,1,"+14186562131"»
4.To cancel call forward type «AT+CCFC=0,0»
5.To check if the unconditional call forwarding is on or off type «AT+CCFC=0,2»
According to my phone company, *21*14186562131# is the USSD code to call forward. (http://www.fido.ca/web/content/faq/faq_call_forwarding)
This doesn't work with my nokia. I tried ussd-pad and ussd-widget without any success:confused:
To found the solution, I used those two links:
http://sw.nokia.com/id/95672052-6c77-488d-a055-acef77e4cdc5/AT_Command_Set_For_Nokia_GSM_And_WCDMA_Products_v1 _2_en.pdf
http://www.forum.nokia.com/piazza/wiki/images/8/80/AT-Commands.doc
Thank you everyone.
KiberGus
01-30-2010, 04:06 PM
2 jgarneau
I don'y know, why that ussd queries don't work. If you find bug in my code, I'll fix it. I'm not going to implement call forwarding application, but you are free to look at ussd-common code, especially ussdquery.py, and write your own script, which will invoke pnatd and do needed queries.
2 lendurhenry
I've implemented banner idea and redesigned workflow, now regexp is applied first, then two parsers and chain. I'll describe it on separate page.
This version will be available today or tomorrow.
Or maybe the best solution would be to group USSD widgets and restore others names in this group while using one of those. This means you have to add two more fields – group name and check-box to indicate that only one of them can show the result at the time.
I'm not going to implement it this way. Instead I want implement interface for controlling widgets by programs, then you can organize such groups by writing specialized parsers or chains. This will make widget absolutely finished because you would be able to implement any behavior. But I don't think I'll start working on it in near future.
2 all
If you have any wishes, post them now, not when I'll swithc to another task.
jgarneau
01-30-2010, 04:31 PM
2 KiberGus,
I don't think there is a problem with your code.
ussd-pas and ussd-widget return me the same answer as the CUSD command with pnatd «UKNOWN APPLICATION».
Thank you for your help.
KiberGus
01-31-2010, 05:35 AM
Final version should be available as soon, as autobuilder builds it. There is also an article, describing how widget works:
http://kibergus.su/en/node/3
There are several advises hor to configure widget for different cases.
How do you put in a reply to the operator?
Is it what the chain does?
I.e., to query the balance I need to dial *102#
that's easy, put that into the config. Then the operator sends back a menu, in which I need to select the 1st option, i.e. 1.
Should I put 1 into the chain box, or echo 1, or it doesn't work yet, or how?
KiberGus
01-31-2010, 08:52 AM
How do you put in a reply to the operator?
Is it what the chain does?
I.e., to query the balance I need to dial *102#
that's easy, put that into the config. Then the operator sends back a menu, in which I need to select the 1st option, i.e. 1.
Should I put 1 into the chain box, or echo 1, or it doesn't work yet, or how?
USSD menu navigation is not supported.
Damn it, so there is still no way to check the balance with Megafon in Russia, as they changed the direct access, to this stupid menu.
Is it hard to implement?
KiberGus
01-31-2010, 09:05 AM
There is a way, but not in ussd widget, I'll think about it. I needed menu navigation too for activation of internet assistant. Here is how it is done:
Nokia-N900-42-11:/usr/bin# ussdquery.py *111*25#
Внимание! Будет произведена смена пароля. Введите новый пароль:
Nokia-N900-42-11:/usr/bin# ussdquery.py <My password>
Ваша заявка принята. Ждите СМС с результатом
So, basically, you just need to dial several numbers.
Excellent, man! It works, great.
Even better than using the widget, can be used in scripts etc. :)
KiberGus
01-31-2010, 09:57 AM
Excellent, man! It works, great.
Even better than using the widget, can be used in scripts etc. :)
Yes, this utility was developed for using in scripts. The widget and ussd-pad just invoke it with needed arguments. The other plus is that ussdquery uses locking to prevent simultaneous access to modem by several apps.
As far as ussd menu functionality isn't hard to implement, next version will support special locking mode for menus. Then you would be shure, that parallel ussd query wouldn't activate wrong item in menu.
adancau
02-01-2010, 05:59 PM
with the newest widget, there is a problem after setting the font size. the X stays in the same position, so even with a smaller widget resulting from a smaller font, you cannot place it against the right side of the screen.
there is yet another problem with the widget not retaining font size between reboots (actually it retains font size, but i need to go in settings and click ok again in the font dialogue, or alternatively change the max width value and click save). after a reboot widget is again larger.
KiberGus
02-02-2010, 06:23 AM
with the newest widget, there is a problem after setting the font size. the X stays in the same position, so even with a smaller widget resulting from a smaller font, you cannot place it against the right side of the screen.
That's how hildon works. As a workaround you can move widget to another desktop and back. You can notice the same behavoir for all widgets, that change size.
there is yet another problem with the widget not retaining font size between reboots (actually it retains font size, but i need to go in settings and click ok again in the font dialogue, or alternatively change the max width value and click save). after a reboot widget is again larger.
That's my fault. Would be fixed. And ussd-menu support would be available soon too.
Morfeusz_2005
02-02-2010, 05:36 PM
When I install whatsoever *.deb show ERROR
Python 2.5, what this? When i find this?
patt2k
02-03-2010, 11:45 PM
do i have to use the pad? what if i don't want it?
Help
http://i48.tinypic.com/eg9zch.png
niqbal
02-04-2010, 01:54 AM
Help
http://i48.tinypic.com/eg9zch.png
rootsh is not installed on your n900. install it to gain root access before installing .deb files.
aman18narang
02-04-2010, 01:59 AM
i just downloaded the ussed widget from extras-devel..can someone tell me what i need to add in the things like parse, reg exp to configure it..i need to check my bal using the no *144#
niqbal
02-04-2010, 02:13 AM
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
niqbal
02-04-2010, 02:35 AM
i just downloaded the ussed widget from extras-devel..can someone tell me what i need to add in the things like parse, reg exp to configure it..i need to check my bal using the no *144#
kindly post the whole operators ussd response, then i can guide u with regexp
KiberGus
02-04-2010, 03:02 AM
i just downloaded the ussed widget from extras-devel..can someone tell me what i need to add in the things like parse, reg exp to configure it..i need to check my bal using the no *144#
Read documentation:
http://kibergus.su/en/node/3
Morfeusz_2005
02-04-2010, 04:33 AM
What the problem. When I install *.deb file show the Error:
Python 2.5 is not installed. When i find this?
KiberGus
02-04-2010, 05:54 AM
What the problem. When I install *.deb file show the Error:
Python 2.5 is not installed. When i find this?
Install package python2.5 using apt-get install. Or do not mess with deb's and install widget from repository (this will install python and others as dependencies). USSD-pad has similar dependencies, so it should install clearly after that.
KiberGus
02-04-2010, 06:19 AM
New version is available. Main feature is USSD menu navigation. And I've written some documentation about command line utility:
http://kibergus.su/en/node/7
If some bugs won't be found today, I'll promote to extras-testing.
P.S. By the way, does anybody know what should I do to aggregate my blog to planet maemo? I've mailed them on sunday, but still no reply.
yorkey
02-04-2010, 08:24 AM
Hmm!
Any chance this USSD utliity would allow dual sim adapters to work?
e.g. those sold here http://www.simore.ch/en/two_sim_cards_in_one_mobile/dual_sim_card_black_2.php
Maybe not full functionality, but even switching betwem sims woudl be very nice.
niqbal
02-04-2010, 08:56 AM
@kilbergus can u explain a little more how chain can be used. btw brilliant job mate.
i just realized u fixed ussdquery -> regexp -> parser. initially parser was before regexp and it was screwing things up.
KiberGus
02-04-2010, 10:39 AM
Hmm!
Any chance this USSD utliity would allow dual sim adapters to work?
e.g. those sold here http://www.simore.ch/en/two_sim_cards_in_one_mobile/dual_sim_card_black_2.php
Maybe not full functionality, but even switching betwem sims woudl be very nice.
No. SIM menu and USSD queries are absolutely different things.
@kilbergus can u explain a little more how chain can be used. btw brilliant job mate.
i just realized u fixed ussdquery -> regexp -> parser. initially parser was before regexp and it was screwing things up.
chain is just a command, that would be run on each query. This doesn't affect USSD widget. But that program can analyze reply and do something useful. A would like to have a graph of my balance (with graph of calls, messages and GPRS traffic), but I didn't write anything for this yet.
yorkey
02-04-2010, 10:45 AM
No. SIM menu and USSD queries are absolutely different things.
yeah i thought they might be. Thanks for confirming my suspecions anyway.
Oh well back to looking at the MiFi then :(
joelus
02-04-2010, 11:41 AM
Damn it, so there is still no way to check the balance with Megafon in Russia, as they changed the direct access, to this stupid menu.
Is it hard to implement?
I use ussd-pad for menu systems which sort of works - see my post in this thread here (http://talk.maemo.org/showthread.php?p=461066#post461066).
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...
Morfeusz_2005
02-04-2010, 11:52 AM
How use this: Install package python2.5 using apt-get install
I don't understand. I'm new user of N900
eloquent
02-04-2010, 12:01 PM
got this message in the application manager if i try to install ussd widget...
"Installation of Ussd-Widget not possible...
why?
KiberGus
02-04-2010, 12:20 PM
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
02-04-2010, 12:33 PM
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
02-04-2010, 01:22 PM
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
02-04-2010, 01:54 PM
The rest what? Other codes? What exactly are they and what should they do? What error message do they give?
KiberGus
02-04-2010, 02:21 PM
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
02-04-2010, 03:23 PM
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
02-04-2010, 04:09 PM
For debugging run widget from X-terminal
python /usr/lib/hildon-desktop/ussd-widget.py
It echoes all errors there.
shady
02-04-2010, 11:42 PM
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
02-05-2010, 02:49 AM
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
02-05-2010, 03:07 AM
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
02-05-2010, 03:28 AM
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
02-05-2010, 04:37 AM
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
02-05-2010, 04:48 AM
I use ussd-pad for menu systems which sort of works - see my post in this thread here (http://talk.maemo.org/showthread.php?p=461066#post461066).
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
02-05-2010, 08:35 AM
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.
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=486843&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 :
6890
Should I patch ussdquery.py again, or is this supposed to be working in the latest version ?...
TIA,
fpp
KiberGus
02-05-2010, 10:19 AM
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
02-05-2010, 12:21 PM
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
02-05-2010, 12:31 PM
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
02-05-2010, 12:35 PM
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:
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
02-05-2010, 01:27 PM
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.
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.
Hw did u edit the file?? i cant save the file after editing :(
Get a root privileges before editing.
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
02-05-2010, 02:26 PM
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
02-05-2010, 03:12 PM
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
02-05-2010, 03:46 PM
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
02-05-2010, 04:01 PM
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
02-05-2010, 04:33 PM
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
02-05-2010, 05:25 PM
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
02-05-2010, 05:52 PM
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#GSM_07.07_-_Main_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
02-05-2010, 05:55 PM
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
02-05-2010, 06:16 PM
http://i49.tinypic.com/iw25pj.png
Congratulations. Now you know how to use pnatd. Ise it, if you like it.
ARE THESE LETTERS BIG ENOUGH TO BE SEEN?
niqbal
02-05-2010, 06:16 PM
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.
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#GSM_07.07_-_Main_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
02-05-2010, 06:36 PM
@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
02-05-2010, 06:38 PM
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.
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 ! :-)
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.
6902
The missing character between "Remise" and "jour" is the "ŕ" that causes the error.
patt2k
02-05-2010, 09:07 PM
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
@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
02-06-2010, 06:01 AM
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#GSM_07.07_-_Main_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:
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.
sys.stdout=file("/dev/stdout", "wb")
KiberGus
02-06-2010, 06:28 AM
First of all I must say, that yesterday I was tired and wanted to sleep, so I was inadequate.
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.
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.
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
02-06-2010, 07:41 AM
2 Marshall Banana and fpp
Try this script.
Marshall Banana
02-06-2010, 07:57 AM
2 Marshall Banana and fpp
Try this script.
It works, non ascii characters are displayed correctly :)
Confirmed, I now have the full sentence, with the "ŕ".
Do we just replace the old ussdquery in /usr/bin with the new one to get the widget & pad working again, or should we wait for an upgrade ?
Thanks again for your work & help KiberGus, and don't forget to get some sleep ! :-)
KiberGus
02-06-2010, 08:15 AM
Confirmed, I now have the full sentence, with the "ŕ".
Do we just replace the old ussdquery in /usr/bin with the new one to get the widget & pad working again, or should we wait for an upgrade ?
Thanks again for your work & help KiberGus, and don't forget to get some sleep ! :-)
You can replace ussdquery.py with this file, ussd-widget should work with it. Next release would include this fix.
Yup, already tried it and it works, thanks!
Morfeusz_2005
02-06-2010, 09:58 AM
USSD-Widget work. It;s super.
Screen: http://img188.imageshack.us/img188/1488/screenshot2010020614191.jpg
KiberGus
02-06-2010, 10:54 AM
Corrected ussd-common is in repositories. By the way, is there a way to force phone update it? As far as I understand, application manager suggests to update packages from visible repositories only. I can make new version of widget which would require new version, but this is not a proper solution.
adancau
02-06-2010, 12:15 PM
apt-get update; apt-get dist-upgrade in the console worked for me, it pulled ussd-common fine (don't even think it needs dist-upgrade).
KiberGus
02-06-2010, 01:48 PM
By the way, if anybody wants to see widget in his native language, it is easily doable. You just need to translate strings from .pot file (I'l publish most recent one, if anybody wants).
Or you could use Transifex, like for Conboy ?...
rldstover48
02-06-2010, 04:47 PM
is the ussd-widget ready for testing and is it in extras-devel im t-mobile us would just like the function. and is the widget the only thing i need to install. thanks for any help. iv read alot of thread but still alil confused
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.