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 in 'Linux Distributions' 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:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    Now we can install great Linux application Please or Register to view links and its GTK frontend Wammu, again here's how:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    Before configuring our modem we must know a few things about it. First thing you should do is go to the Please or Register to view links and find your GSM device. In this how to I will use my Huawei e220, with Gammu phone database page Please or Register 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:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    Here's output of this command on my hardware:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    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:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    Here's how you will setup your hardware with port ttyUSB0 and connection parameterat19200 I'm using for my Huawei e220 GSM modem:
    Please or Register 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:

    Code:

       Sorry you need to Register / Login to see this Codes!    

    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: Please or Register to view links
     
    xSilent, sniper76 and jehadhd like this.
  2. Draft

    Draft Administrator Staff Member Administrator

  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. wala po ba para sa windows OS?????
     
  8. Draft

    Draft Administrator Staff Member Administrator

    Sa Windows, built-in naman yan sa Modem Dashboard eh :)
     
  9. 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.
  10. 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!

    [​IMG]
     
    mylabs26 and Draft like this.
  11. xSilent

    xSilent Support Team Staff Member Support Team

    salamat dito boss! try ko to mamaya :D
     
Tags / Keywords: