USSD-widget 0.1.6 released

Some operators return balance in SMS messages instead of USSD replies. Now USSD-widget can rule this out. Changes:
  • SMS listener
  • RegExp groups can be used in parsers
If your operator sends replies as SMS you need to activate SMS listener. Then enter filtering options: number from which SMS comes and regular expression, which describes part of the message. If filtering options are specified, all non matching messages will be ignored. Multipart messages are supported. First matching message would be used.
By default text from SMS is not shown, so you would need to enter parser, for example:
echo &
would just show full message contents.

RegExp groups

I've changed parser syntax a bit. Now % and & always mean original reply, even if regular expression was specified. But you can specify, that you need some particular matching group with %N where N is group number. For example if 1st group matches our balance and 3rd number of minutes left you can use something like this:
echo Balance: %1 Minutes: %3

Comments

error handling SMS

hi,

i tried the SMS listener, but only get this error (debugging on x-terminal):

seven:~$ python /usr/lib/hildon-desktop/ussd-widget.py 0
Translation file for your language not found
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 214, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/lib/hildon-desktop/ussd-widget.py", line 346, in handle_sms
    pdu = gsmdecode.decode_pdu (pdumsg)
  File "/usr/lib/python2.5/gsmdecode.py", line 283, in decode_pdu
    pdu['user_data'] = _decode_default_alphabet(deoctify(pdu['user_data']))[0:pdu['udl']]
NameError: global name 'deoctify' is not defined

hope this helps :-)

m.

There is unmet dependency,

There is unmet dependency, which I've forgot to add to package. You have to install it manually:
sudo gainroot
apt-get install python-dbus

stk and quick codes

will you be able to add stk quick code functions to it please? because many people have dual sim cards using magicsim or multisim, though can make no use of them on the n900 which is really a pity especially when they are quite essential... for example 001 to change to sim 1, 002 to change to sim 2, etc. would this be a problem?
Thanks
chris

Quick codes are not USSD

Quick codes are not USSD queries, so the answer is no. If you would find out, what quick code really is: usual number (then dial with phone), call forwarding (then use call forwarding applet) or some other standard GSM feature, which is not supported by n900, this may be doable. In reality, USSD is supported by n900 from the very beginning, but there was no UI for it, I've written one. The same thing could be with your double SIM adapter.

bug in ussd-widget.py

In smart_split_string(), after parsing out a number and deciding which regex group to add to the substitution list, the subst character never gets reset, resulting in another copy of the message being appended to the end of the result. You need to add the following line at ussd-widget.py:879:

subst = ''

Thanks

Would be in the next release which is going to be bug fix release.