User avatar
jbeale
Posts: 3468
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

GSM modem for sending SMS text ?

Mon Aug 05, 2013 10:38 pm

I am thinking of an R-Pi project that would need to communicate wirelessly via cell/mobile phone service. It is easy to use wifi, which I am already doing; the cell service is a backup when the wifi is unavailable. I would want to send an average of one short text message (SMS) per day.

I'm in the USA, where it seems that "Page Plus Cellular" which uses the Verizon network, offers a prepaid service, $10 for 100 minutes (voice = $0.10/min, SMS Text = $0.05) lasting 120 days. That would enable 1.6 texts per day at a cost of about $30 per year, which is workable, and is the cheapest per-minute cell phone service I have found. Apparently Page Plus can activate any unlocked CDMA cell phone (with a "clear ESN").

Now I can get, for example a "Verizon UMW190 3G GSM CDMA USB Modem" for about US$25 on ebay. Should I expect a GSM / CDMA Modem to be able to send a SMS text? It seems from this page, it should work: http://www.codeproject.com/Articles/204 ... -GSM-Modem although apparently you need support for "Extended AT command set". I see from this thread http://www.raspberrypi.org/phpBB3/viewt ... 32&t=46356 that one person got a GSM modem (Huawei E156G) working in this type of application.

I see an iTead GSM/GPRS module at US$42 which is supposed to work with the R-Pi, they actually have released a library for it. I wonder if that module offers anything the cheaper ebay option does not.

Sp4rKy
Posts: 8
Joined: Fri Feb 15, 2013 3:34 pm

Re: GSM modem for sending SMS text ?

Tue Aug 06, 2013 3:58 pm

Should work. I have used a GSM M2M module to send SMS messages from the pi using pySerial and AT commands.

The module was on a dev board and connected via USB - worked pretty much out of the box on Raspbian - power draw on boot up was a little high I think and probably could have benefited from a powered hub. wvdial for dialup worked as well.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: GSM modem for sending SMS text ?

Wed Aug 07, 2013 10:04 am

wouldn't it be easier to use an online service for sms like twilo etc?

i've managed to create a php script to do this but via a free online service but i am not going to use that service as it was a POC and with out permission ( i know the creator but not been able to get hold of him)
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: GSM modem for sending SMS text ?

Wed Aug 07, 2013 10:44 am

txt3rob wrote:wouldn't it be easier to use an online service for sms like twilo etc?
Is it easier to get online via a GSM modem and use an online SMS service than to use the GSM modem to send SMS direct?

I suppose that if you want SMS via GSM and via WiFi the SMS via internet portion will be common.

What's involved in getting the Pi online with a GSM modem? Does it work out of the box with Raspbian?

Dutch_Master
Posts: 360
Joined: Sat Jul 27, 2013 11:36 am

Re: GSM modem for sending SMS text ?

Wed Aug 07, 2013 11:48 am

Not knowing what your application is, I do offer you the warning not to use text messaging for critical events. You need to realise that texting is considered "network filler" by most (if not all) providers, to be send when there's spare capacity on their network. That may cause a delay on the receiving side up to several hours or even days if their network is seriously congested.

User avatar
jbeale
Posts: 3468
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: GSM modem for sending SMS text ?

Wed Aug 07, 2013 4:44 pm

Dutch_Master wrote:Not knowing what your application is, I do offer you the warning not to use text messaging for critical events. You need to realise that texting is considered "network filler" by most (if not all) providers, to be send when there's spare capacity on their network. That may cause a delay on the receiving side up to several hours or even days if their network is seriously congested.
Good to know. I'm not a frequent text person, but it has always seemed immediate to me in the past. So would using the GSM modem to send an email, and/or post to a website be more timely? That process just seemed more complicated, involving more intermediate systems and points of failure. I've sometimes had emails delayed for days, or disappear. I guess there is no 100% guaranteed communication service. Is a regular voice call more reliable? I would like timely and reliable, but also to be able to log the data. Without spending much money :-).

I'm not using an online SMS service because this is intended as a backup when the regular internet link is down.

geekinthesticks
Posts: 97
Joined: Fri Feb 08, 2013 7:22 pm

Re: GSM modem for sending SMS text ?

Thu Aug 08, 2013 8:34 am

If it's important that the message gets through, I would opt for more than one method of delivery. Here in the UK text messages are fairly reliable, but sometimes there can be delays. If you use email try going for a final address where your email won't go through intermediate servers. You could set up a Gmail account and use Google's servers. However, beware many GSM providers hijack port 25 and force your email to get routed through their servers. A third line of backup would be some sort of instant messaging service, or Twitter.

We have power outages that can last longer than my UPS battery. I have my UPS software setup to email, sms (via GSM) and twitter me if the power goes down. Normally I get all three alerts, but there are times when one or more alerts fails to reach me.

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: GSM modem for sending SMS text ?

Thu Aug 08, 2013 8:58 am

I can confirm from experience that SMS can be very slow at times, maybe an hour. It is usually almost instant.
Voice call is immediate and you know if it fails, so a recorded message voice call might be a better option if prompt confirmed delivery is needed. Of course, voice calls may divert to answerphone, which will look like a successful connection to an automated sender. You could have the sender listen for a keytone response to confirm that you have heard the message.

You could have a prioritised list of numbers to call and keep dialling until success.

I assume Twitter is a low priority service that could be delayed.

If you can run a server on your receiving device you could attempt a stream connection. There are various ways to get an IP address to send to. The sender will know if a connection has been made and the receiver can acknowledge receipt.

Email might sometimes be slow but you may be able to use delivery status notification and read receipt to confirm that the message got through.

User avatar
jbeale
Posts: 3468
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: GSM modem for sending SMS text ?

Wed Aug 14, 2013 8:17 pm

I got the Pantech UMW190 CMDA modem, which comes with a Verizon label. It isn't yet clear to me whether the device can be activated on the PagePlus service (which is a reseller using Verizon's network, but voice/text only ? maybe not broadband).

Apparently, to activate the device I need it to dial *228 for it to pick up its new programming, but I'm not sure how to do that. When connected to my WinXP box, I see the device claims a number of serial ports, as below. Are any of these supposed to accept Hayes "AT" modem commands? The "Connection Port" COM37 actually does respond "OK" when I send "AT" to it. But any other command like "AT+CSS?" or "ATDT*228" just returns "ERROR".

VZAccess (WinXP app) Manager window "Diagnositics": PORT COM34
System Device Manager: Serial Devices:
PANTECH UMW190 Connection Port (COM37)
PANTECH UMW190 Diagnostic Port (COM35)
PANTECH UMW190 NMEA Port (COM36)

UPDATE: Yes it does work (under WinXP, anyway :-). I just needed to open the Verizon VZAccess Manager program (WinXP application) that came with the device, click Options/Activation, wait a few minutes, and it was activated and can send a text to my regular phone. Next step, getting it working from the R-Pi.

UPDATE2: I can read some registers using the "AT modem command set", via /dev/ttyACM0 on R-Pi, but then no more luck. It seems this device will not do SMS messaging in CMDA mode. The VZAccess windows app can do SMS send/receive, but it is using some other undocumented / unavailable API that I cannot use from a non-windows device. The device can also take a SIM card and do GSM mode, but CDMA is the only cost-effective service I found (in the USA). There is a prepaid CDMA plan for $10/120 days, or $30/year through PagePlusCellular, compare that to $50/month for Verizon.

If anyone DOES know how to make SMS work on this device via the AT commands, I'd love to know how! There are several different examples online for sending SMS via GSM modems, like ftp.multitech.com/resolutions/documents/wireless/how%2520to_send%2520and%2520receive%2520sms_cdma.doc, but the relevant commands just return "ERROR" on my device.

Code: Select all

AT+CSMS=1
  +CSMS: 1,1,1		# SMS text mode send,receive,broadcast supported
AT+GMM
  UMW190VW               # device model number
AT+GMR
  W0190VWB222F.205  1  [Aug 28 2009 01:00:00] [Feb  8 2011 13:31:13]  # firmware revision
AT+CDV=*228
  OK                           # voice dial *228 to get new programming from network
AT+CHV
  OK                           # hang up voice call
AT+CSQ?			
  31, 3207880		        # first number is signal strength, 0..31 where 31 is maximum possible. 2nd number = ?
AT+CREG?
  +CREG: 0,0		        # 0,0 means the modem is not connected to the network
AT+CAD?
  1                           # 1 means CDMA digital service is available  (0 = no service, 2 = TDMA, 3 = analog)
AT&V
  {returns 21 lines of cryptic internal register data}
AT+CPMS=?
  ERROR                      # should have said what storage memory is available for SMS
AT+CMGS="5551234567"
  ERROR                      # should have started SMS message entry
Last edited by jbeale on Fri Aug 16, 2013 9:29 pm, edited 5 times in total.

kghunt
Posts: 383
Joined: Sun Mar 04, 2012 9:28 am

Re: GSM modem for sending SMS text ?

Wed Aug 14, 2013 9:21 pm

My huewai e156g worked out of the box and is reliable. Texts can be delayed but in my experience where I was the sender and the receiver the biggest delay I came across was a couple of minutes. Your experience across the other side of the pond may differ though on account of the sheer size of the mobile networks.

When I looked at this I went down the USB modem route because you can pick them up on eBay really cheap less than 10 quid a lot of the time. Plus they are easy to unlock for free ( the huewai ones anyway). Most other gsm devices I found are more than twice the price.

I am using a prepaid mobile provider called GiffGaff (o2) which does 6p SMS mesages but there is no time limit you simply top up with a tenner and it lasts as long as it lasts. My 3G modem was originally a Three modem but I unlocked it using some free software.

litoy2x
Posts: 12
Joined: Fri Apr 19, 2013 9:08 am

Re: GSM modem for sending SMS text ?

Thu Apr 17, 2014 12:47 pm

kghunt wrote:My huewai e156g worked out of the box and is reliable. Texts can be delayed but in my experience where I was the sender and the receiver the biggest delay I came across was a couple of minutes. Your experience across the other side of the pond may differ though on account of the sheer size of the mobile networks.

When I looked at this I went down the USB modem route because you can pick them up on eBay really cheap less than 10 quid a lot of the time. Plus they are easy to unlock for free ( the huewai ones anyway). Most other gsm devices I found are more than twice the price.

I am using a prepaid mobile provider called GiffGaff (o2) which does 6p SMS mesages but there is no time limit you simply top up with a tenner and it lasts as long as it lasts. My 3G modem was originally a Three modem but I unlocked it using some free software.
Hi kghunt, i have a project that is quite similar on what you've mentioned about SMS.

I need some advice. I'm making a kiosk powered by raspberry pi and wanted to attached an SMS connection. This kiosk should have the capability to send, receive and read sms messages. How can I do it? For reading sms, how does it work or how can I handle it?

Initially we're planning to use a 3g usb stick to connect to the internet but the location of the kiosk is a bit unstable. so we've decided to use SMS instead.

Return to “Advanced users”