try:
digit_1 = int(str[0])
digit_2 = int(str[1])
octet = (digit_2 << 4) | digit_1
except:
octet = (1 << 4) | digit_1
return octet
octet = (15 << 4) | digit_1
| The Following User Says Thank You to sutaburosu For This Useful Post: | ||
| The Following User Says Thank You to Cue For This Useful Post: | ||
#!/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();

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: | ||