TODO
====

This is just a collection of ideas. Care to comment?

* Do a ATZ before actual modem use. The Qualcomm Gobi 2000 seems
  be a bit brittle and can get wedged, always answering ERROR to
  completely correct USSD queries. An ATZ removes the wegditude.
  Caution: Might have side effects with other modems? USSD sessions?

* Completely do without a "these modems need PDU mode" list by 
  simply trying a cleartext USSD query and retry in PDU mode if
  the first query ERRORs.

* Factor out PIN handling/setting. Could be managed by a 
  "gsm-pin" command which allows to query the SIM state in a 
  more thorough way that gsm-ussd does right now.

* Query +CMEE, set it to 1 to receive CMS/CME ERROR messages,
  reset it to old value.

* Add another option "-v|--verbose", which will query and output
  modem type, net the modem is logged into and other trivia.

* Some kind of localisation?
  I'd prefer to keep this little script as selfcontained as possible,
  so I probably won't build some gettext()/.po-file infrastructure.
  But as there are not _that_ many user visible messages, I can
  imagine some internal support for English/German/French/Spanish
  messages. Of course, the actual translation (apart from English
  and German) would have to be done by someone else...


DONE
====

* Rework Expect scripts: One to send commands and wait for OK/ERROR,
  one to wait for +CUSD: answer. Why didn't I do it that way
  before?

* Added support and Makefile targets for 
  - .tar.gz archives
  - .deb packages,
  - .rpm packages
  for an even easier installation.

* Added a small GUI, built around zenity and kdialog: xussd

* CME/CMS ERRORs get translated now, so you'll get
	"Network error: No network service" 
  instead of
	"Network error: 30"

* USSD response types, while still not completely understood, will now
  at least be reported in debug mode.

* After the PIN check/unlocking, gsm-ussd now polls the network
  registration every two seconds for ten times until it runs out
  of tries (and aborts) or it receives messages that the modem
  finally registered in its home net or roaming.

* Checks the USSD queries for legal characters first: /^\*[0-9*]+#$/

* More than one USSD query will now be done if several are given on
  the command line. Every USSD query result will be printed on its 
  own line. 
  Up to v0.2.2, you *could* enter more than one query, but all but the
  first were ignored.

* USSD sessions are supported now. 
  If a USSD response signifies an open USSD session, the user is told.
  Presumably, some menu or instructions to enter a string of numbers
  will be the actual response. So I had to relax the USSD query checking
  an accept simple sequences of numbers too. gsm-ussd is still a 
  one-shot command; it exits while a session is still active. To cancel
  a session, use option "--cancel" (or "-c" as short option).

* After realising that I couldn't get around setting termios values for
  the control device, the first workaround was done using
      system("stty -F $modem_device ...")
  That incurred an external dependency on stty and three extra processes
  just for saving, setting and restoring the termios values. The 
  workaround is now replaced by proper use of POSIX q/:termios_h/.


NOT TO DO
=========

These are things I will *not* consider doing to my poor script:

* Get it to run under Windows.
  There's no shortage of tools for this on Windows; furthermore,
  I have absolutely no experience talking to modems on Windows.
  If someone wants to have a try: Substitute "COMx:" for
  "/dev/ttyUSBx" and go from there.

* Get it to send SMSes, set the modem clock, read phone book entries 
  off the SIM, ...
  All of that _can_ be done, of course, but there are already better
  tools for that available. gsm-ussd is supposed to be a one trick
  pony only! 

Jochen Gruse
