I'm Impressed with Python-gammu, after gammu was released i was building a python program passing to the hole via AT Commands trough Com ports of a computer to a mobile phone but it was a messed spending hours every day, although got a success in learning AT Commands it was a headache.
What do you need:
What do you need:
- Mobile Phone(of course) i used SE T230, you ca use SE T series, or Nokia Old Models or the best is the benq S series
- You need a Python 2.4 or 2.5 runs with Linux or Windows(headache)
- Python-gammu 1.6 to 2.0, ei dont use 2.1 up for those who use fedora 7 or suse 10.2, it will give you a headache
- A bluetooth if you require a bluetooth transmission than a cable.
- edit /etc/gammurc
port = ttys0:
model = se T230
connection = at- Note port if located at /dev/ to know what device is that got to /dev ls the folder remember all the files, plugin your phone to usb then a file will come out, that would be you port
- finish
import gammu
sm = gammu.StateMachine()
sm.ReadConfig()
sm.Init()
status = sm.GetSMSStatus()
remain = status['SIMUsed'] + status['PhoneUsed'] + status['TemplatesUsed']
start = True
while remain > 0:
if start:
sms = sm.GetNextSMS(Start = True, Folder = 0)
start = False
else:
sms = sm.GetNextSMS(Location = sms[0]['Location'], Folder = 0)
remain = remain - len(sms)
for m in sms:
print '%-15s: %s' % ('Number', m['Number'])
print '%-15s: %s' % ('Date', str(m['DateTime']))
print '%-15s: %s' % ('State', m['State'])
print '\n%s' % m['Text']
Comments