1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial Send and receive sms using gsm modem or phone on ubuntu

Discussion started by Draft, Mar 31, 2013.

  1. Draft

    Draft Administrator Staff Member Administrator

    I currently use mobile broadband as my primary Internet connection and this worked great on my Linux PCs for a while. The GSM modem I'm using every day is good old Huawei e220, but there is one aspect of this great hardware device I haven't used on my Linux PCs, and that is sending/receiving SMS messages. In this article I will show you how to send and receive SMS messages using GSM modem or phone on Ubuntu Linux PC.
    Lets begin. We don't really want to enter our administration password every time we want to send SMS message, so first thing we must do is to add our selves to the dialout user group. All members of this group have permission to use modem-like devices on Ubuntu system. This is how we do it:

    sudo adduser $USER dialout
    Now we can install great Linux application Login to view Links and its GTK frontend Wammu, again here's how:

    sudo apt-get install gammu wammu
    Before configuring our modem we must know a few things about it. First thing you should do is go to the Login to view Links and find your GSM device. In this how to I will use my Huawei e220, with Gammu phone database page Login to view Links. On this page I've found first data we need to configure Gammu, the connection parametar that is at19200 in my case. You should obtain the connection parameter for your GSM device on its Gammu phone database page.
    Also you must find your GSM device entries inside /dev directory. You will recognize this entries because they usually start with "tty" prefix. On my hardware this device entry is namedttyUSB0 and ttyUSB1. You can also check dmesg this way:

    dmesg|grep tty
    Here's output of this command on my hardware:

    :~$ dmesg|grep tty
    [	0.000000] console [tty0] enabled
    [	8.103849] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
    [	8.103998] usb 2-2: GSM modem (1-port) converter now attached to ttyUSB1
    Now you can use gammu-config to configure your hardware or you can write Gammu configuration file manually. Here's how to do it using gammu-config:

    Here's how you will setup your hardware with port ttyUSB0 and connection parameterat19200 I'm using for my Huawei e220 GSM modem:
    Login to view Links
    After you set configuration options you can save changes and you will get Gammu configuration file .gammurc file inside you home directory. You can also save this file for future use once you are sure that configuration it contains is correct.
    Important notice: Network manager has tendency to lock your GSM device once you start your GSM Internet connection. The device stays locked even after you disconnect so you must make sure that right click on Network manager -> Enable mobile broadband option is unchecked before you use Gammu. If this option is enabled you will get permission denied errors from Gammu.
    After we got that right I will show you how to check your SIM card messages the CLI way and how to start the GTK Gammu GUI called Wammu. To view all messages on your SIM card using CLI you can use something like this:

    gammu getallsms
    For more about CLI usage you can check Linux manual pages usin man gammu command. To send and receive SMS messages using you GSM device you can also use GUI frontend to Gammu called Wamu. You will find this program by navigating to the Applications -> Accessories -> Wammu. Then you can go to Phone -> Connect. If the connection to the modem is successfully established you can use Retrieve menu to get messages or contacts from your SIM card and Create menu to send new SMS messages. If connection couldn't be established then you need to double check port and connection parameter you have used to configure Gammu. Cheers!

    Credits: Login to view Links
    xSilent, sniper76 and jehadhd like this.
  2. Draft

    Draft Administrator Staff Member Administrator

    Post Modified. ;);)
  3. bosS pano po ba paganahIN ang globe broadband sa ubuntu
  4. Draft

    Draft Administrator Staff Member Administrator

    Automatic na yan na de-detect.
  5. kahIT PANG windows po? O meron pa pong ibang vesion na pang linux?
  6. Draft

    Draft Administrator Staff Member Administrator

    Built-in na yan sa Default Ubuntu Distru.
    Automatic na yan pag plug mu.
  7. thanks sa tutorial. .
  8. thanks for sharing....
  9. wala po ba para sa windows OS?????
  10. Draft

    Draft Administrator Staff Member Administrator

    Sa Windows, built-in naman yan sa Modem Dashboard eh :)
  11. Thanks for sharing!.. I tried running the modem gui dashboard using wine.. well yeah it works just by showing the nice dashboard but was not able to detect the usb modem stick.. will try this one ;ater on my Linux Lite box ;-)
    Draft likes this.
  12. it works!.. I am using unlocked Globe Tattoo's Huawei E1550 using the same set-up.. additional note to the steps TS.. after adding the DIALOUT user "sudo adduser $USER dialout" and install Gammu Wammu don't forget to log-out or restart your system.. then on the part where you need to configure hardware "gammu-config" there is an image part there that did not appear on my screen but here it is.. just change the port part to tty USB0 click OK then click SAVE.. and that's it!

    mylabs26 and Draft like this.
  13. thanks for sharing
  14. salamat dito boss! try ko to mamaya :D
  1. PHCorner uses cookies to help personalise content and tailor your experience. By continuing to use this site, you are consenting to our use of cookies. Accept Learn More
    Dismiss Notice