Check airtel 3g balance on Huawei e303c from Ubuntu linux

To check Airtel 3G balance on huawei e303c ubuntu Linux perform the following steps

  1. Install Gsm-ussd. For ubuntu or debian Linux download the deb and for Redhat or RPM based Linux download the rpm binary.
  2. connect your Huawei E303c 3g modem to the computer. if this is the only modem connected , it will create three usb serial devices named ttyUSB0, ttyUSB1, ttyUSB2. You can verify that by running
    dmesg | grep ttyUSB
  3. Then run the following command from shell.
    sudo gsm-ussd '*123*11#' --no-cleartext -m /dev/ttyUSB2

The output will look like this

Your current 3G Mobile Internet balance for your airtel number are: 1Amt 1421.14 MB&VD Jun 27 2013 ;2Amt 0.00 MB&VD Jun 26 2013.

Issues you might face
For some reason the gsm-ussd tool is not consistent. Sometimes the above command will throw this error even though the Sim is not protected with pin.

ERROR: SIM card is locked, but no PIN to unlock given.
Use "-p "!

However waiting for few seconds and retrying the same command works. Looks like some device lock issue.

Sometimes running this command will disconnect you from internet. And any attempt to reconnect will fail. Sweat not, remove the dongle and connect back and try dialing. It will connect now.


2 Replies to “Check airtel 3g balance on Huawei e303c from Ubuntu linux”

    1. I agree it is inconsistent. I keep running it 4-5 times and have seen it work . I think when the modem is busy it ignores this request. Donot know how to overcome it.

Leave a Reply

Your email address will not be published. Required fields are marked *