Python Forum

Full Version: sending sms messages from your smartphone
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What library can I use to send sms messages from my smartphone?
All of the PyPi packages related to this are here: https://pypi.org/search/?q=%27sms+message%27
import sms
m = sms.Modem('/dev/ttyS0') what does '/dev/ttyS0 ' mean ?

I'm trying this code
from sms4 import send,  nonblocking_send
result =  send('+123456798',  'The server is down!') 
print(result)
error 3 arguments !?

https://pypi.org/project/sms4/
(Apr-01-2020, 08:59 PM)skorost5 Wrote: [ -> ]import sms
m = sms.Modem('/dev/ttyS0') what does '/dev/ttyS0 ' mean ?

On Linux, it's the path to a file representing a serial port to which the modem is attached.

A couple questions then:

1. Which OS are you running and does this library support it?
2. Do you even have a modem attached?

If the answer to 2 is no, presumably you're out of luck (the library homepage wasn't working, so I couldn't really take a look). You might want to find an HTTP API that lets you send messages, because then you'd not need anything special, just that the machine you're sending from is on the Internet so you can make the HTTP request. Twilio offers that kind of service (and there are probably others these days), but I don't know what their pricing is like.
I work on windows. I installed the library. But I want this code to work not on a computer, but on android. But I don't know how to do it.???