473,414 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Python: SMS listener and generator

Hi all,

I am developing a simple application on GM862 GPS modem using python script. I want to toggle a GPIO (General Purpose IO)pin on the board from a SMS. Like if a SMS text says "ON", the pin should set to "1" and if it says "OFF", pin should set to "0".
I think I can do the toggling part but where I am facing difficulty is:
1. How to detect an incoming SMS. On the Rsterm it does show the response as "+CMTI: SM, 2" but how to listen using a python script.
2. How to extract the SMS text using python and use it for invoking desired tasks.

Also I want to send an SMS from the modem using python script. I wrote this script this nothing happens. It doesnt show any error but SMS is not sent also.
Expand|Select|Wrap|Line Numbers
  1. import MDM
  2.  
  3. MDM.send('AT\r', 20)
  4. MDM.send('AT+CMGF=1\r', 20)
  5. MDM.send('AT+CMGS = 585XXXXXXX, 129\r', 20)
  6. MDM.send('Hi Modem...this is a test SMS for you!!!\n', 20)
  7. MDM.send('chr(26)', 20)

I would really appreciate if someone could guide me on this.

Thanks
Oct 30 '09 #1
0 1740

Sign in to post your reply or Sign up for a free account.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
3
by: Michael Sparks | last post by:
Hi, I'm posting a link to this since I hope it's of interest to people here :) I've written up the talk I gave at ACCU Python UK on the Kamaelia Framework, and it's been published as a BBC...
0
by: bharat | last post by:
Hi, I want to connect to SQL Server 2000 at remote site in python using SQLRelay at local machine. When i run my query, the following message comes: Debugging...
4
by: Joe Hrbek | last post by:
Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. var dataListener = { data : "", onStartRequest: function(request,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.