How to send SMS with a computer running Linux and a cell phone

Send an SMS from a computer running Linux

FIXME

Configuring Gammu

FIXME

Send SMS from the command line

FIXME

echo "Hello world from my PC" | gammu sendsms TEXT <PhoneNumber>

Send SMS using Python

FIXME

sendsms.py
#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
 
import gammu
 
 
SMS = {
        'Class': 1,                            #SMS Class
        'Text': "Hello World from Python",     #Message
        'SMSC': {'Location': 1},
        'Number': "+336xxxxxxxx",              #The phone number
      }
 
 
gamu_sm = gammu.StateMachine()
gamu_sm.ReadConfig()              #Read the default config file (~/.gammurc)
gamu_sm.Init()                    #Connect to the phone
 
gamu_sm.SendSMS(SMS)              #Send the SMS

EXAMPLE: A simple Python application with a GTK2 GUI

FIXME

You could leave a comment if you were logged in.
 
phone/gammu_send_sms.txt · Last modified: 2017/09/01 12:24 (external edit)