Author Topic: RECEIVING SMS MESSAGES  (Read 21235 times)

gregor

  • Guest
RECEIVING SMS MESSAGES
« on: August 04, 2004, 01:58:07 AM »
Hi all,

I,am working with a T100md plc in a small home monitoring system.
Now I would like to know if it possible to change the state of a output by sending a SMS message to the plc or by give a code after connecting via GSM
If so is there anyone who can give me a example how to do this and also what are the hardware requirments.



Thanks in advance

GREGOR

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:RECEIVING SMS MESSAGES
« Reply #1 on: August 09, 2004, 11:32:21 AM »
There are probably ways and means to do it but it won't be simple or cheap. You need a GSM modem which can be controlled by SMS messaging. The idea is to get the SMS message into the PLC's serial port input. Once the serial port receives an ASCII string the TBASIC program can easily determine the action it is required to do by checking the content of the received string.

Siemens seems to have a suitable modem that some of our users have been working on. Unfortunately we don't have greater details. You may like to search the web for a GSM modem with RS232 port.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

PLCstar

  • Newbie
  • Posts: 24
  • I'm a ladder logic fool!
    • View Profile
    • Morningstar Home Page
Re:RECEIVING SMS MESSAGES
« Reply #2 on: August 16, 2004, 10:15:18 AM »
Ok, first off I do not know if this will work, but I think it has potential.

Why buy an expensive modem when an old phone and an old "Pocket PC" off of Ebay might be the answer, coupled with this software.

http://www.visualit.co.uk/simplesms.htm

I would cable the Pocket PC to the PLC via RS232 and use the IR port between a compatible phone and the Pocket PC. You would have to build an application on the Pocket PC to glue the SMS software to the PLC.

You know if these guys are doing SMS through the phones Blue Tooth, IR PORT, or Serial connection, I wonder why it cannot be done right from the 232 port on the PLC?

Maybe a software development kit from the phone manufacturer, some minmal glue electronics, and a connector to fit the bottom of the phone would make this work. These phones today have many capabilities that we as users do not even know about. I bet there are many models out there that would allow this type of control of the phone (transfer of text via sms external to the device) via the serial connection. Goodbye expensive modem, hello $25 phone off of ebay and some investigative work.

It might take some real tinkering, and some investigative work to find a compatible phone and good documentation, but I think it would be a cool project.

Joel Moore

  • Full Member
  • Posts: 128
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #3 on: August 16, 2004, 12:21:49 PM »
I like the way you think.  8)

However I wonder how hard it is to get cellular services to connect old phones to their network?

One phone that would skip the need for seperate devices is Kyocera's 6035 Smartphone (buy-it-now price  on eBay is typically $100) and I know it works on Verizon's network since I have one right now (my second, actually).

The SDK is free to download from palmos.com.  Although I'm usure about what can be done with the serial port.  I don't know if can only be used by the hot-syncing tool or if custom apps have full access to it.

PLCstar

  • Newbie
  • Posts: 24
  • I'm a ladder logic fool!
    • View Profile
    • Morningstar Home Page
Re:RECEIVING SMS MESSAGES
« Reply #4 on: August 16, 2004, 12:38:44 PM »
Joel,

Point well taken. When I said old I did not mean like old bag phones or items of that era. I was refering to technology more them one month old...  ha ha ha

I have a phone I actually hate, but I keep using because of some it is unique features and ability to work on multiple system types here in the US and overseas.

It is a Siemens model and every time I destroy one (like a five floor drop to cement at a worksite) I usually replace it with a remanufactured phone found on Ebay for $50 or less.

I do know this phone has built in modem and has IR and serial connections. I am unsure of a SDK, and having worked with Siemens PLC and other German technology in the past I would never recommend any newbie to tackle something like this with their products or documentation, unless they are or think like a German.... Ha Ha Ha

The model is S46 and totally sucks as a voice device, but I beleive it has many features under the hood that one could exploit for the SMS project.

Joel Moore

  • Full Member
  • Posts: 128
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #5 on: August 16, 2004, 12:47:16 PM »
Just to satisfy my curiosity I checked out the SDK's from Kyocera and PalmOS and confirmed that full access to the serial port and SMS messaging is available to the developer.  And I even see mention on palmos.com that you can develop stuff using VB which surprises me.  I thought it would be C/C++ only.

I might mess around with this if I get some free time.  While I love my 6035 I rarely use it's more powerful abilities.

Tim C

  • Newbie
  • Posts: 11
  • Help Help Help!
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #6 on: August 16, 2004, 08:00:01 PM »
I checked into sending sms from a PC to a Phone attached to the serial port about a year ago and found out that you have to have a smsc  number to direct the sms's to before they could be sent out to the receiving phone number. Here in the US nework's like Cingular, ATT and so on will not give out thier SMSC number to the public.  You have to be a big company willing to dish out big bucks for it. thats why Siemens Gets 1200 bucks for their GSM modems! The SDK's that come from nokia have alot of examples
in C++ and Visual Basic and they work but you better have a smsc
number if you want to send sms's from your Serial port through a cell phone. There might be third parties with gateways that you can send sms's through I'm not sure though. In one of my Visual Basic Projects i was sending out sms's to cell phones but i had to dialup to the internet and connect to a mail server and send the alert that way as email  eg.. "8001234567@mobil.mycigular.com"
that will get the message to a phone but receiving them is another story.    P.S.  if somone find out you can send sms's please post How
« Last Edit: August 16, 2004, 08:02:52 PM by Tim C »

Tim C

  • Newbie
  • Posts: 11
  • Help Help Help!
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #7 on: August 16, 2004, 08:12:20 PM »
Just a Thought , you should be able to call the computer and after 3 or 4 rings pickup the line and catch any buttons pressed on the cell, but this would require some code, but there is alot of
modem code out on the net for example's. Has anyone done this?
And in the nokia SDK's i think i remember seeing a function to answer an incomming call from a cell phone connected to the PC.
the tones generated when a button is pressed is bound to gennerate some kind of input to the buffer....

PLCstar

  • Newbie
  • Posts: 24
  • I'm a ladder logic fool!
    • View Profile
    • Morningstar Home Page
Re:RECEIVING SMS MESSAGES
« Reply #8 on: August 16, 2004, 08:33:11 PM »
You know guys, and I will have to go back and read the post, but I think GREGOR just wanted to receive SMS. I wonder if that requires the expensive SMSC number that was mentioned above. Reception only would be far simpler then duplex communciation.

I am not doubting your information, but you did say you checked on this about a year ago. With all of these POCKET PC and PALM OS phones I think there has to be a away to tap into these features without paying homage to MA (C)Bell.

Melin

  • Guest
Re:RECEIVING SMS MESSAGES
« Reply #9 on: August 17, 2004, 12:01:43 AM »
HI guys.

It is simple to use a modem like wavecom with PLC.
You need to use the AT commands of modem:

//   COMANDO AT   RESPOSTA   DESCRIPCIO
//
//  AT+CPIN=XXXX   OK      Introducci? codi pin
//
//  AT+CSQ   +CSQ: XX      Nivell Cobertura (11-33 bona)
//
//  ATDxxxxxxxxx         Efectuar una trucada
//   
//  +++            Iniciar tall de comunicacio
//  ATH   OK         Penjar
//
//  Enviar Missatges:
//  AT+CMGS="629969696"<CR>   Enviar missatge
//  "S'escriu el missatge a enviar"<CTRL+Z>   +CMGS:<mr>   OK      mr es el num. missatge enviat
//   +CMTI: "SM",xx   Indica que s'ha rebut el missatge xx   
//
//  Lectura de missatges:
//  AT+CMGR=xx      Lectura del missatge posicio xx
//      +CMGR: "REC UNREAD",
//      "0146290800","98/10/01, 18:22:11+00",<CR><LF>
//                              qwertyrttyuui   Missatgr rebut
//
//   Avis missatge rebut
//  +CMTI:"SM",3   Nou missatge a la memoria SM, posicio 3
//
//   Esborrar missatges:
//  AT+CMGD=xx   OK   Esborra de la memoria el missatge posicio xx
//
//

Look at the manual of wavecom, westermo, siemens to work with AT commands.

Bye Melin
(The text is write in catalonian language, sorry but is my code for use in SCADA system that send alarms using a wavecom modem at port 2 of PC)

Joel Moore

  • Full Member
  • Posts: 128
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #10 on: August 17, 2004, 03:27:46 AM »
You know guys, and I will have to go back and read the post, but I think GREGOR just wanted to receive SMS. I wonder if that requires the expensive SMSC number that was mentioned above. Reception only would be far simpler then duplex communciation.

I am not doubting your information, but you did say you checked on this about a year ago. With all of these POCKET PC and PALM OS phones I think there has to be a away to tap into these features without paying homage to MA (C)Bell.
Exactly.  If you have a phone that is capable of sending and receiving SMS messages, has a serial port, and an SDK that gives access to all these features, then I think you have a potential platform for sending commands to a TriPLC from anywhere.  And you should even be able to receive messages from the TriPLC assuming you have another SMS-capable phone it can send messages to.

But I don't think anyone expected you'd be able to do this without cellular service and a plan that offered SMS messages.  So obviously this is a setup that would involve monthly bills.


Tim C

  • Newbie
  • Posts: 11
  • Help Help Help!
    • View Profile
Re:RECEIVING SMS MESSAGES
« Reply #11 on: August 20, 2004, 05:15:54 PM »
You know guys, and I will have to go back and read the post, but I think GREGOR just wanted to receive SMS. I wonder if that requires the expensive SMSC number that was mentioned above. Reception only would be far simpler then duplex communciation.

I am not doubting your information, but you did say you checked on this about a year ago. With all of these POCKET PC and PALM OS phones I think there has to be a away to tap into these features without paying homage to MA (C)Bell.



Your Right,
and no you dont have to pay , to receive SMS and yes you can get the received SMS messages from the phone, at least i could with the nokia 3360.  I thought he was wanting to send SMS   Oooop's got ahead of my self.

PLCstar

  • Newbie
  • Posts: 24
  • I'm a ladder logic fool!
    • View Profile
    • Morningstar Home Page
Re:RECEIVING SMS MESSAGES
« Reply #12 on: August 21, 2004, 08:48:52 PM »
Concerning monthly bills and fees I think I have a partial solution.

First off I want to say I never thought you could get away wihtout any sort of fee.  I always assumed everyone here thought it would require a monthly plan of some sort from a cell company.

Here is where I think you could save some money, assuming GREGOR is in the USA or somewhere where companies have similar plans.

We have all seen those family plans where additional phones are added for a small monthly fee to a master account and they share the bank of minutes. Well this PLC phone would not be using any minutes, just sms messaging. To me this would be a small fee for worldwide access.

Also I just thought of another thing to consider when coding this project. Make sure your PLC sends code to the phone to clear the inbox. Usually the inbox will hold a limited amount and most phones (at least the ones I have had) will not receive anymore SMS until there is room in the inbox.

I could see a scenario where you test this setup 30 times and it works perfectly each time. Then you head out bragging to your buddies on how well this works and try and show them. This is where you find out the inbox only holds 30 messages and rejects all of your attempts to show off..... ha ha ha