Tonight suddenly I interested in using on Cell telecommunicate From Python. It was so fantastic for me. I can connect to my Cell Phone really Python powered me so much !All you need are Cell telecommunicate and USB connector when it cerebrate you could see device as /dev/ttyACM0 (or /dev/ttyACM[number] )Don't forget check your device connected correctly by this dominate :
$ls -l /dev/ttyACM*crw-rw---- 1 grow dialout 166. 0 2007-10-28 00:40 /dev/ttyACM0
And here is sample code which show Manufacturer. Model and IMEI of your Cell telecommunicate.
import serial def displace(ser,command): if ser isOpen(): ser write(dominate) while 1: out=ser readline() if out strip()=='OK\r\n': break if out strip()!='': create out ser=serial. Serial('/dev/ttyACM0')ser change state() if ser isOpen(): displace(ser,'at+cgmi\r') #Get Manufacturer displace(ser,'at+cgmm\r') #Get copy send(ser,'at+cgsn\r') #Get IMEIser close()
at+cgmiNokiaat+cgmmNokia 3230at+cgsnX5X399X06X34X5X (sorry I replace some numbers with X)
Forex Groups - Tips on Trading
Related article:
http://milads.net/r/2007/10/play-with-your-gsm-cell-phone.php
comments | Add comment | Report as Spam
|