The Following User Says Thank You to sutaburosu For This Useful Post: | ||
|
2010-11-30
, 23:49
|
Posts: 840 |
Thanked: 823 times |
Joined on Nov 2009
|
#102
|
The Following User Says Thank You to Cue For This Useful Post: | ||
|
2010-12-01
, 00:27
|
|
Posts: 79 |
Thanked: 47 times |
Joined on Oct 2010
@ Devon, UK
|
#103
|
|
2011-01-01
, 23:00
|
Posts: 21 |
Thanked: 1 time |
Joined on May 2010
|
#104
|
|
2011-02-07
, 08:08
|
Posts: 3 |
Thanked: 0 times |
Joined on Feb 2011
|
#105
|
Got it:
to send an SMS from the commandline with Python:
Working on an Emacs way now, it should be easy. Complications only for converting UTF-8 text to hex etc. but will get it done...Code:#!/usr/bin/env python2.5 import pexpect import time from subprocess import * child = pexpect.spawn('pnatd'); child.send('at\r'); time.sleep(0.25); child.send('at+cmgf=1\r'); time.sleep(0.25); child.send('at+cmgs="+XXXXXXX"\r'); child.send('SMSTEXTSMSTEXTSMSTEXT'); child.send(chr(26)); child.send(chr(26)); child.sendeof();
|
2011-02-07
, 08:22
|
|
Posts: 1,187 |
Thanked: 816 times |
Joined on Apr 2010
@ Australia
|
#106
|
|
2011-02-08
, 11:24
|
Posts: 37 |
Thanked: 18 times |
Joined on Apr 2010
|
#107
|
|
2011-02-08
, 15:42
|
|
Posts: 533 |
Thanked: 1,341 times |
Joined on Dec 2010
@ Italy
|
#108
|
Usage: smssend [options] -n +39xxxxxx:+39xxxxxx -m "Text" Options: -c : compose message with conversation
chmod 4555 /usr/bin/pnatd
The Following 6 Users Say Thank You to sakya For This Useful Post: | ||
|
2011-02-09
, 10:34
|
Posts: 37 |
Thanked: 18 times |
Joined on Apr 2010
|
#109
|
|
2011-02-09
, 11:16
|
|
Posts: 533 |
Thanked: 1,341 times |
Joined on Dec 2010
@ Italy
|
#110
|
It does work after changing the 'except' clause to: