8-ta E173 on openSUSE with USSD setup

skietOOg

New Member
Joined
Nov 9, 2011
Messages
9
Reaction score
0
Location
Somerset West
Using 8-ta 10Gig, Huawei E173 modem on openSUSE 11.4

Modem setup was straightforward with Yast->Modem on /dev/ttyUSB0
I created a new provider called 8-ta: Phone number *99#, username 'guest', leave password blank
Under 'how the interface should be set up' select Automatically
tick "dial on demand"
tick "modify DNS when connected"
Enter DNS servers to use as a starting point, they will be overridden with DNS servers from 8-ta when you connect
tick "External firewall interface"
Leave IP settings (dynamic, default route)

To ask for balance, you need to send a USSD query.
Install gsm-ussd, OR ussdq
for gsm-ussd, see http://mybroadband.co.za/vb/showthr...D-(gsm-ussd)?p=4866874&viewfull=1#post4866874
for ussdq, you have to compile from source at http://sourceforge.net/projects/ussdq/

To request your data balance, do one of the following as root (su -)
>gsm-ussd (this works if you've changed the defaults in /usr/bin/gsm-ussd, see the link above)
>gsm-ussd -m /dev/ttyUSB2 *188#
>ussdq -i /dev/ttyUSB2 *188#


8-ta sends the usage report to you via sms.
Using Yast, install "gammu" (repo openSUSE-11.4-Oss)
gammu came pre-installed with my openSUSE version

First configure gammu by doing the following as root (su -)
>gammu-config
Change Port to /dev/USB2
Leave rest defaults

Now clear all sms's from device to stop clutter, as root:
>gammu deleteallsms 1 (clear inbox on sim)
>gammu deleteallsms 3 (clear inbox in memory)

To get all sms's from device, do the following as root
>gammu getallsms


Now that everything is setup, to get your balance type as root:
>gsm-ussd
Your balances will be sent to you via SMS, Thank you.
>gammu getallsms
Location 0, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+2781191"
Sent : Fri Nov 18 22:34:56 2011 +0200
Coding : Default GSM alphabet (no compression)
Remote number : "+2781188"
Status : Read

You have used 4302 MB of data and have 4572 MB available. 4572 MB will expire on 30/11/2011.

1 SMS parts in 1 SMS sequences
>gammu deleteallsms 1
Deleting SMS from "Inbox" folder: *
>
 
Last edited:
Hi, thanks for the write-up. I have tried (on Ubuntu) using gssm-usd to query my balance, but I get some errors like "GSM equipment error: Unknown error (100)" even as root.

Is the modem supposed to be connected or not? Either way, it gives me errors.
 
Hi, thanks for the write-up. I have tried (on Ubuntu) using gssm-usd to query my balance, but I get some errors like "GSM equipment error: Unknown error (100)" even as root.

Is the modem supposed to be connected or not? Either way, it gives me errors.

OK, just got it working by copying the script to ~, and adding my model to the list of PDU modems (guess that must be right?), and now when running it (I had to add -p 0000) it says: "Your current balance is R2.00.". Strange. I got the 60G+60G deal, not sure how this works.
 
OK, that only worked once, and not again :-( Going to try another time, or go the other route (sigh) of putting the SIM card into a handset and phone *188#
 
Hi, sorry for my late reply.
I followed the steps in the link http://mybroadband.co.za/vb/showthr...D-(gsm-ussd)?p=4866874&viewfull=1#post4866874 to set up gsm-ussd on my side.

What you need to remember is that the usb modem/dongle instantiates (at least) 2 usb devices, and both might be different to what I used. The first usb device is the modem device, the 2nd is the control device.
The modem device, eg /dev/USB0, is your dial-up interface.
The control device, e.g. /dev/USB2, is the interface through which you send USSD codes.
Depending on what dongle u have, it may also register a device for the SD-card slot.

To answer your first question, the modem needs to be plugged in, but as far as I can remember it doesn't need to be connected.

What does lsusb tell you about the usb devices that are connected to your box?
 
Working now

Hi, sorry for my late reply.
I followed the steps in the link http://mybroadband.co.za/vb/showthr...D-(gsm-ussd)?p=4866874&viewfull=1#post4866874 to set up gsm-ussd on my side.

What you need to remember is that the usb modem/dongle instantiates (at least) 2 usb devices, and both might be different to what I used. The first usb device is the modem device, the 2nd is the control device.
The modem device, eg /dev/USB0, is your dial-up interface.
The control device, e.g. /dev/USB2, is the interface through which you send USSD codes.
Depending on what dongle u have, it may also register a device for the SD-card slot.

To answer your first question, the modem needs to be plugged in, but as far as I can remember it doesn't need to be connected.

What does lsusb tell you about the usb devices that are connected to your box?

I have just tried this again on my laptop, and it works now, just as you describe. In this case, the device is also /dev/ttyUSB2, and my modem was connected when I followed these steps.

Also, I used the packaged .deb (development version, 0.4.0-25) from http://linux.zum-quadrat.de/downloads/.

Thanks again!
 
Great! I'm glad you got it sorted.
I use this very basic script to retrieve balances, I put it in my home folder, named "getbalance.sh"
It puts the balance info into a textfile "balance.txt" so you can refer to it later if needed.

(I added /usr/bin/gsm-ussd and /usr/bin/gammu in the sudoers file.)

Code:
#!/bin/bash

sudo /usr/bin/gsm-ussd
sleep 30
sudo /usr/bin/gammu getallsms | grep -e Sent -e expire | tee -a balance.txt
sudo /usr/bin/gammu deleteallsms 1
 
Hi, sorry for my late reply.

I followed the steps in the link http://mybroadband.co.za/vb/showthr...D-(gsm-ussd)?p=4866874&viewfull=1#post4866874 to set up gsm-ussd on my side.


What you need to remember is that the usb modem/dongle instantiates (at least) 2 usb devices, and both might be different to what I used. The first usb device is the modem device, the 2nd is the control device.

The modem device, eg /dev/USB0, is your dial-up interface.

The control device, e.g. /dev/USB2, is the interface through which you send USSD codes.

Depending on what dongle u have, it may also register a device for the SD-card slot.


To answer your first question, the modem needs to be plugged in, but as far as I can remember it doesn't need to be connected.


What does lsusb tell you about the usb devices that are connected to your box?
Posted by essay writer

I faced the same error with my HUAWEI 4G Dongle E3372. I tried to add no-cleartext. It turns out that the program contains the list of modems which require no-cleartext. Whereas for all the rest (the non-known) devices, it sends it in clear text.
Oh, sorry, just noticed the topic is quite old.
 
Top
Sign up to the MyBroadband newsletter
X