Cell phone text message/email interface
Jay Kickliter
Posts: 446
After giving up for a while, I finally returned to this project. For some reason, I got it to work this time.
What it is:
Just a simple interface to a Motorola c168i cell phone. This code allows you to send text messages and emails from a Propeller chip. Nothing more at this point. It has no timeouts built in and can not receive commands yet. I'll need help figuring out how to do that. This is the same phone that OpenGPSTracker uses, and I did use their project as a reference. If you want to add tracking or status reports to your propeller project, this phones is a good choice.
You can get these for $15 at Radioshack. It is a pay as you go phone, so it is pretty cheap to use, especially if you get the monthly 1000, or unlimited messaging plans, at $10, and $20 respectively.
I'll post it in the object exchange when I add better documentation and get some comments from you guys. I a fairly casual programmer, so if any of you are interested adding features, feel free. Please let me know if you come up with anything cool. I'd like to add timeouts, and the ability to send commands to the Propeller remotely. But I don't have much time to work on this.
What you need:
Motorola c168i Phone ~ $15 (Radioshack/Target)
2.5 mm stereo connector ~ $2
At least 1 month of service (AT&T GoPhone) $15 (texts/emails are $.15 each, so I burned though a lot while testing)
Optional:
1000/Unlimited messages $9.99/$19.99
Legend for the 2.5 mm connector image attached:
1. Sleeve: Ground
2. Ring: Phone TX, Propeller RX
3. Tip: Phone RX, Propeller TX
Post Edited (Jay Kickliter) : 11/19/2008 2:57:50 AM GMT
What it is:
Just a simple interface to a Motorola c168i cell phone. This code allows you to send text messages and emails from a Propeller chip. Nothing more at this point. It has no timeouts built in and can not receive commands yet. I'll need help figuring out how to do that. This is the same phone that OpenGPSTracker uses, and I did use their project as a reference. If you want to add tracking or status reports to your propeller project, this phones is a good choice.
You can get these for $15 at Radioshack. It is a pay as you go phone, so it is pretty cheap to use, especially if you get the monthly 1000, or unlimited messaging plans, at $10, and $20 respectively.
I'll post it in the object exchange when I add better documentation and get some comments from you guys. I a fairly casual programmer, so if any of you are interested adding features, feel free. Please let me know if you come up with anything cool. I'd like to add timeouts, and the ability to send commands to the Propeller remotely. But I don't have much time to work on this.
What you need:
Motorola c168i Phone ~ $15 (Radioshack/Target)
2.5 mm stereo connector ~ $2
At least 1 month of service (AT&T GoPhone) $15 (texts/emails are $.15 each, so I burned though a lot while testing)
Optional:
1000/Unlimited messages $9.99/$19.99
Legend for the 2.5 mm connector image attached:
1. Sleeve: Ground
2. Ring: Phone TX, Propeller RX
3. Tip: Phone RX, Propeller TX
Post Edited (Jay Kickliter) : 11/19/2008 2:57:50 AM GMT
Comments
this is exactly what i have been looking for. Thanks Jay
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
What do you need this for? I'm going to use it as a backup locator in a high altitude balloon, but I can see many possibilities. If you're any good at spin, tear apart the code and let me know what you come up with. I think a lot of people could find use for a generic, modifiable cell phone link.
My house needs a way to txt me when it's safe to go back (Hurricane) and the internet messaging was too unreliable. So if you can post this, it would be great.
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
Post Edited (Jay Kickliter) : 10/11/2008 11:46:20 AM GMT
Here's a good site on SMS: www.developershome.com/sms/howToSendSMSFromPC.asp
I'm going to try modifying Perry James Mole's gps parsing code to parse the status messages from the phone. I'll post if it works. Attached is the original code I posted, just cleaned up a little bit. Its still pretty ugly. It just shows the basic functionality of how to send a text message/email.
I'm thinking it may be a good idea to send messages to memory, then send them. That way if there is an error, the code can try resending it later. The command to send to memory is: AT+CMGW
The chip should have come with the phone, right? Or did I need to buy something else? Bummer is I am a 50 mile round trip from RatShack.
Can't wait to play with it though, thanks for all the work you have done, looks pretty simple.
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Post Edited By Moderator (Chris Savage (Parallax)) : 10/13/2008 3:24:26 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
Now you can:
Send email
Send text message
Send position report in a text or email
Get the battery strength
Get the signal strength
Reset the phone
For some reason, I cannot get the position reports to return the proper message number. They're parsing the same format text from the phone as the basic text/email methods, but seem to only respond with 4043 for the message ID. I think there might be a lot of redundant code, so if anyone has ideas on how to clean it up, let me know.
Still needed to be done:
Store messages to memory to be sent later
Receive commands by SMS
Should we be able to get data from the phone from text messages??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's Only A Stupid Question If You Have Not Googled It First!!
But like I said, I'm really not a very good, or experienced, programmer, so any help is welcome. I've gotten the cell phone interface to do most of the things I need it to, so I'm mainly concentrating on making a Propeller bases tracker/datalogger as a whole. I think I have that mostly working now, it fires a camera every 10 seconds, logs position reports with the air temperature to and SD, and sends text messages.
How is the progress on your SMS messaging project? Have you wrapped it up to your satisfaction? I would like to expand upon your work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH - Electronics: Engineer - Programming: Professional
Post Edited (Jay Kickliter) : 11/19/2008 2:58:54 AM GMT
Did you migrate this to a Verizon phone or have any luck with the w174? I have an application for which this would be perfect, but Verizon is the only carrier.
Thanks,
Peter
Did you have to do anything to tell the phone you wanted to use the serial port (rather than the head phones)?
I've managed to get my hands on the exact phone you used but I can't get any response. I see from an older thread you were having trouble at first. Did it turn out that you'd blown the serial port, or was there something else?
Any tips on how to get started would be great. I think I've got all my parts together, but now I can't seem to get off square one because I can't get any response from the phone. I've even tried connecting the phone's serial port to a PropClip and trying to issue AT commands directly to the phone via Hyperterm and PST. The phone doesn't react at all. Do you think I've blown the phone's serial port, or am I just not doing this correct? The phone seems to function find otherwise (i.e. I can send and receive text messages when entering them directly into the phone). So if I've damaged it, the damage is limited to the serial port. Unfortunately, that's the whole reason to use this phone.
Thoughts? Anyone?
Hope you're all having a Merry Christmas,
Peter
Looks like another interesting project. I was thinking of something similar, but I was thinking more along the lines of using a modem and interfacing through a telephone jack, where the Prop would be stationary.
Bruce