You don't know til you try . . .


Telit GE865 GSM/GPRS Module + Python = Schweet

, posted: 4-Dec-2010 12:33

Just a quick intro and reminder to myself for later.

Not the prettiest setup but it works.
The devboard (ez864) was for an GC864 module, ie one with a connector.
I am only using the regulated PSU and Sim holder on it.
The Sim has not been wired up yet in the picture.

Photobucket

Connected we have
.Power, GND, VBATT, VBATT_PA, VBATT_PA
.Serial, TXD, RXD
.RTS, shorted to ground as no flow control is being used.
.ON_OFF, shorted to ground , turns on as soon as power is applied.
.STAT_LED, a good indicator that the moduel is working properly
.GPIO_06, into a led, active high
.GPIO_04, into a switch, active low
.DTR, into a switch, active low. Controls script excution on power up.

The 2.54mm pitch is very generous compared to the 0.5mm on the connector based moduels.
Downside is the lack of an antenna coonnector and fewer GPIO's.
10 vs 22 on the GC864.

While it is not recommended to upload scripts without error checking enabled we will do without for now to save some soldering.

Since Hyperterm is not avaiable for Win 7, I download the successor from the same company.
http://www.hilgraeve.com/
My usual terminal program, Docklight, did not do file sending.

For a fuller step by step see this link
http://www.codeproject.com/KB/system/CellularDevTelitGSMPython.aspx


So, GPS/GSM cat tracker anyone?
Remote montitoring system?

Other links of interest.
http://www.telit.com/en/products.php?p_id=3&p_ac=show&p=47


Sample code below:--

 

#A quick intro to Python in relation to running in a Telit Module

# import the built-in modules
import SER    
#Uart0
import MDM
#Internal modem interface
 

var_response = MDM.send('AT#GPIO=6,1\r', 2)
#Set GPIO6 to output and high.
#Send this AT command to the modem, storing the result code in varible "var_response". ie. 1 or -1
#Same as if you were tying into the modem normally via a terminal program.
#Note this is not the modem response, "OK", but a indication of if the command was actually recieved by the modem
#Reading the modem response is done later in this example.
#For now we will ignore it.
#Note we could also use the inbuilt "GPIO" to work with the pins.

 
var_response = SER.set_speed('115200')
#Setup the serial port
var_response = SER.send('Type Something')
#Print to the uart
var_response = SER.sendbyte(0x0d)
#Line feed/New line

var_ser_input = SER.receive(100)
#Wait 10 secs for response. 100 x 1/10 secs
#Note the inter character timeout is very short.
#If manually typing it will most likely only catch the first character.
#If you paste into the terminal program it will show the whole string

var_response = SER.send(var_ser_input)
#print what was recieved
var_response = SER.sendbyte(0x0d)
var_response = SER.send('echoed\r')
#Print with line feed

var_response = MDM.send('AT#GPIO=6,0\r', 2)    
#Set GPIO6 to output and low.
 
#check pin status
var_response = SER.send('Checking pin status\r')
var_response = MDM.send('AT#GPIO=4,2\r', 2)    
#Set GPIO4 to input and read status.
#Internally pulled up by default.

var_ser_input = MDM.receive(10)
#Store modem response, which show the status of the GPIO/Button.
var_response = SER.send(var_ser_input)
var_response = SER.send('EOF\r')

 
#All this is covered in   Telit_Easy_Script_Python_rXX
#Note all comments are compiled and uploaded to the modue, so take up space.
#Remove them if you want to save some space.
#The GE865 only has 2,013,256 Bytes and this little example is 2,016b


Other related posts:
Mobility Scooter eCarts conversion
Samsung galaxy cutdown
How big a heatsink do you need to run a green laser pointer continuously?






Comment by Harald Naumann, on 10-Dec-2010 07:26

> So, GPS/GSM cat tracker anyone? Maybe you like my concept based on GE865, Fastrax IT430 or IT520 on Flex PCB. http://www.gsm-modem.de/M2M/m2m-faq/gsm-gps-tracker-flex-pcb-module-sim-on-chip/


Comment by zac, on 19-Jan-2011 04:40

Hey, thanks for sharing. Iworking on a 865 at the mo. do you have a forum where i can post some questions? thanks zac


Author's note by MrWestie, on 19-Jan-2011 07:47

Hi Zac, best place is probably
http://forum.sparkfun.com/viewforum.php?f=13
Post a link here when you have started a thread so I can assist.


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and placed in the moderation queue for the blog owner's approval.

Your name:

Your e-mail:

Your webpage: