Other GNU/Linux on HTC Universal mobile phone tips
To query the credit balance on your mobile phone in GNU/Linux:
| $ titchy-phone-daemon atcmd 'at+cusd=1,"104#",15' |
- In a few seconds the operator's GSM system will send back your balance. It is recorded in the titchy-phone-daemon log.
- To view it:
| $ tail -n 1 /var/log/titchy-phone-daemon |
It is ASCII values, hex-encoded.
- To decipher this into regular ASCII text, install xxd, unless you have vim installed which has xxd included.
- To install xxd, download xxd-1.10.tar.gz originally found here:
- Compile xxd:
$ tar xvf xxd-1.10.tar.gz
$ cd xxd-1.10
$ make |
- Put the xxd binary somewher in your path.
- To read the mobile credit balance now:
| $ tail /var/log/titchy-phone-daemon ][ grep CUSD ][ sed 's/.*0,"(.*)",15/1/' ][ xxd -r -p |