To check Airtel 3G balance on huawei e303c ubuntu Linux perform the following steps
- Install Gsm-ussd. For ubuntu or debian Linux download the deb and for Redhat or RPM based Linux download the rpm binary.
- 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
- 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.