Facebook   Twitter    YouTube    RSS Feed    Android App    iPhone and iPad App     BlackBerry App    
Subscribe to Newsletter



Results 1 to 7 of 7

Thread: 8-ta E173 on openSUSE with USSD setup

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Location
    Somerset West
    Posts
    8

    Default 8-ta E173 on openSUSE with USSD setup

    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/showthre...=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 by skietOOg; 18-11-2011 at 10:55 PM.

  2. #2

    Default

    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.

  3. #3

    Default

    Quote Originally Posted by mydoghasworms View Post
    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.

  4. #4

    Default

    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#

  5. #5
    Junior Member
    Join Date
    Nov 2011
    Location
    Somerset West
    Posts
    8

    Default

    Hi, sorry for my late reply.
    I followed the steps in the link http://mybroadband.co.za/vb/showthre...=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?

  6. #6

    Default Working now

    Quote Originally Posted by skietOOg View Post
    Hi, sorry for my late reply.
    I followed the steps in the link http://mybroadband.co.za/vb/showthre...=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!

  7. #7
    Junior Member
    Join Date
    Nov 2011
    Location
    Somerset West
    Posts
    8

    Default

    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

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •