Reply
Thread Tools
VDVsx's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#61
Works fine now. Thanks.

__________________
Valério Valério
www.valeriovalerio.org
 

The Following User Says Thank You to VDVsx For This Useful Post:
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#62
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.
 

The Following 2 Users Say Thank You to KiberGus For This Useful Post:
Posts: 177 | Thanked: 199 times | Joined on Nov 2007 @ Concepcion, Chile
#63
i run as root

chmot 755 /usr/lib/hildon-desktop/ussd-widget.py

and now work the widget (0.0.1-0)
__________________
User:rlinfati
 
Posts: 177 | Thanked: 199 times | Joined on Nov 2007 @ Concepcion, Chile
#64
any example how use "the parser" ?
__________________
User:rlinfati
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#65
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's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#66
Originally Posted by rlinfati View Post
any example how use "the parser" ?
Code:
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
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 

The Following User Says Thank You to pycage For This Useful Post:
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#67
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
Code:
/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?
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#68
Originally Posted by KiberGus View Post
2 pycage
BTW Some people get such errors
Code:
/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.
 

The Following 2 Users Say Thank You to KiberGus For This Useful Post:
Posts: 49 | Thanked: 23 times | Joined on Oct 2009 @ Cape Town
#69
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's Avatar
Posts: 1,070 | Thanked: 1,604 times | Joined on Sep 2008 @ Helsinki
#70
Out of the blue I got 10+ "configure me" buttons in my desktop, now the widget works
__________________
Valério Valério
www.valeriovalerio.org
 
Reply

Tags
dial, dialing, lack of phone features, lack of quality control, sms, telephony, ussd

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:36.