1

I am new to linux OS. I have connected d-link USB data card to my laptop and I can connect to internet with that using mobile broadband connection. but how can I check my data balance ? I mean USSD Code. I have tried both modem manager GUI and prepaid manager app.

In Modem Manager

enter image description here

See.. the modem is listed.

but in info tab

enter image description here

And when I try to run USSD code

enter image description here

Please help me. I have tried a lot of methods from askubuntu and other sites. no result.

I just only want to run ussd codes.

1 Answer 1

0



You can use a command line application called "gammu". Open the terminal (press Ctrl+Alt+t) and type sudo apt-get install gammu. Type in the password when prompted(password will be invisible).

After installing gammu create the configuration file for gammu using the command gammu-detect > .gammurc. Ignore any output in the terminal. This command will create a hidden configuration file in your home folder. Open your file browser (nautilus) and press ctrl+h to view hidden files. Check whether the .gammurc file is created.

Open the configuration file created and check for the devices detected by gammu. The devices listed as ttyUSB0 to ttyUSB3 belong to the D-Link modem.

Using gammu you can send ussd only if you are not presently connected to internet. So to send ussd disconnect from the internet connection.

Now to send a ussd type the following command in "terminal" : gammu getussd "USSD_CODE". For example gammu getussd *125#. Then wait for some time and you will get the reply for the ussd(time depends on the network provider. Took 2 min for me!).

If proper reply is not getting, add the device number along with the above command ie, gammu 1 getussd *125# or gammu 2 getussd *125# etc.

'gammu 1 getussd *125#' worked for me in Ubuntu 14.04 with D-Link DWP-156. It should work with DWP-157 as well. Good luck on that :)

Explore the manual pages of gammu by issuing the command man gammu in the terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .