Gath
Gath

Reputation: 559

How do I go about writing a program to send and receive sms using python?

I have looked all over the net for a good library to use in sending and receiving sms's using python but all in vain!

Are there GSM libraries for python out there?

Upvotes: 6

Views: 9115

Answers (6)

tehwalrus
tehwalrus

Reputation: 2659

I was at a hackday where we had free access to a few APIs, including twillio. It was very easy to use their python library to send and receive SMS, and we built an app around it in about 3 hours (twillio integration was about 15 minutes).

Upvotes: 0

Dawie Strauss
Dawie Strauss

Reputation: 3706

I provided a detailed answer to a similar question here. I mention a Python interface to an SMS gateway provided by TextMagic.

Upvotes: 1

Eugene Morozov
Eugene Morozov

Reputation: 15806

Also check PyKannel.

There's also a web service for sending and receiving SMS (non-free, of course), but I don't have URL at hand. :(

Upvotes: 0

Jerub
Jerub

Reputation: 42608

I have recently written some code for interacting with Huawei 3G USB modems in python.

My initial prototype used pyserial directly, and then my production code used Twisted's Serial support so I can access the modem asynchronously.

I found that by accessing the modem programatically using the serial port I was able to access all the functionality required to send and receive SMS messages using Hayes AT commands and extensions to the AT command set.

This is the one of the referneces I was able to find on the topic, it lists these commands:

AT+CMGL      List Messages
AT+CMGR     Read message
AT+CMGS     Send message
AT+CMGW     Write message to memory 

They are complicated commands and take arguments and you have to parse the results yourself.

There are more references on the internet you can google for that reference these 4 commands that will let you work out how your modem works.

Upvotes: 2

vartec
vartec

Reputation: 134551

Python-binding for Gammu perhaps?

BTW. It's GUI version (Wammu) is written in wxPython.

Upvotes: 2

Galwegian
Galwegian

Reputation: 42227

Have you looked at py-sms?

Upvotes: 3

Related Questions