Are there some tools or commands I can use to send USSD codes for checking balance and data balance of the GSM SIM Card in my USB modem (Mobile broadband dongle)?
|
These are some Apps with USSD balance check support: Prepaid Manager
Prepaid Manager is an applet for the GNOME Desktop that allows you to check and top up the balance of GSM mobile prepaid SIM cards. It is a simple and minimalistic app with USSD balance check and topup being all that it does. But on the flip side, it is a very dated application and haven't received any new updates in a long time. And if your provider isn't supported, you'll have to manually configure it as described on their homepage. To install, click here: Or run the following command:
Modem Manager GUI
Modem Manager GUI is a complete solution to manage and monitor mobile network based modems. It packs quite a lot of features, and USSD support is just one of them. For a complete list of features, visit their official homepage. To install, click here: Or run the following command:
V Mobile Broadband
V Mobile Broadband is the original Vodafone Mobile Connect software for Linux rewritten to be compatible with Network Manager by Vodafone's open source Betavine Connection Manager team. Unfortunately, it doesn't seem to be very actively maintained at the moment and isn't available in Ubuntu repos. However, you may try your luck building the project from source. Check out their GitHub page. Warning: Sources |
|||||||||||||
|
|
You can use the command-line utility
For installation and configuration instructions and more details, see here. |
||||
|
|
|
You can do them with the package If you are in Ubuntu 13.10:
In other versions of Ubuntu you can do it with the application
|
||||
|
|
|
You can use the Linux command line tool For detailed installation and configuration instructions see here. The version 0.4 Debian package offered there for installation is the latest dev branch version. If the USSD code to get your balance is (say) *901# and your modem is
|
||||
|
|
|
You can use the
For the case that querying your balance requires operating a USSD menu: this is also possible with |
|||||
|
|
You can use AT commands directly to query your balance via USSD. For that, use any serial terminal program that lets you communicate with your modem directly ( I chose
Then, if you use ModemManager (the default under Ubuntu Linux), you might have to disable it first to allow
Now, to send a USSD code for balance query to the network (say, *901#) and display the result, you would use this command:
This assumes that your modem is at For the case that querying your balance requires operating a USSD menu: this is also possible with |
||||
|
|
|
For me, both ModemManager-based solutions and
It's disappointing to see just the first useless line: Finally I found a workaround with First, stop Modem Manager:
Now, you need to know your modem port; in my case, it is If you don't know your port, try this:
And look for the entry with
For more information on getting the right port, see this link: https://gist.github.com/heyalexej/cc6c97b1ea42736b3ff7 Then, use picocom to connect to your port:
You should see something like this:
(if you don't see this Then enter:
And after several seconds, you should get your reply, which can be multiline:
To exit picocom, use Ctrl-A Ctrl-X And start modem manager again:
|
|||
|
|
|
You can use the open source virtual PBX solution FreeSwitch together with its extension GSMopen to send USSD commands [source]. For example, if the USSD code to get your balance is (say) *901#, you would execute:
There are simpler solutions in the other answers of course, but in case you use GSMopen anyway (… for example because it's the only way to do GSM voice calls under Linux …). |
|||
|
|

