GM862-gps hangs after uploading a python script

I have GM862 -GPS evaluation kit. I bought it here in sparkfun a month ago.

http://www.sparkfun.com/products/478

At first there is no problem in uploading and executing python scripts in the module.

But after a couple of times writing and executing python scripts in the module, it then became unstable.

When DTR is set to high (programming mode) I have no problem in executing AT commands in the module, but after uploading a script and setting the DTR to low (Execution mode) and then rebooting the device, there is no reaction coming from the module.

I tried rebooting the device for a couple of times but it seems no reaction.

I am using Rsterm in uploading Python scripts into the module. And here is the code i made, it is not yet finish but it compiles and works fine.

Config

sms_password = ‘jubela’

Constants

TRUE = 1

FALSE = 0

LOOP = 1

SPEEDLIMIT = 30

Modules

#Use serial

import SER

#Use build in module

import MOD

#Use AT command interface

import MDM

#Use GPS

import GPS

General Functions

#Debug message

def debugmsg(msgtext):

msgtext = msgtext.replace(‘\r’, ‘\r’)

msgtext = msgtext.replace(‘\n’, ‘\n’)

print msgtext

SER.send(msgtext + ‘\r\n’)

#f = open(‘log.txt’,‘ab’)

#f.write(msgtext + ‘\n’)

#f.close()

#GPS status

def gps_status(gpspos):

debugmsg(‘Retrieving GPS status’)

gpspos_parts = gpspos.split(‘,’)

if ( (gpspos_parts[5] == ‘2’) or (gpspos_parts[5] == ‘3’) ): #2D or 3D fix

#debugmsg(‘GPS fix "’ + gpspos_parts[5] + ‘" ie valid’);

status = TRUE

else:

#debugmsg(‘GPS fix "’ + gpspos_parts[5] + ‘" ie not valid’);

status = FALSE

return status

SMS Library Functions

#Setup SMS

def sms_setup():

debugmsg(‘Setting up SMS’)

MDM.send(‘AT+CMGF=1\r’, 0)

res = MDM.receive(50)#5 sec

MOD.sleep(1)#wait 0.1sec

debugmsg('SMS setup: ’ + res)

def testspeed(gpspos):

#debugmsg(‘Test if speed is over limit’)

gpsdataparts = gpspos.split(‘,’)

currentspeed = gpsdataparts[7]

debugmsg(‘Time is ’ + gpsdataparts[0] + ’ UTC time’)

debugmsg('latitude is ’ + gpsdataparts[1])

debugmsg('longtitude is ’ + gpsdataparts[2])

debugmsg('heading is ’ + gpsdataparts[6])

debugmsg(‘Speed is ’ + gpsdataparts[7] + ’ km/hr’)

debugmsg('date is ’ + gpsdataparts[9])

if (gps_status(gpspos) == TRUE):

debugmsg(‘Has GPS Fix’)

if (float(gpsdataparts[7]) < 60.0):

debugmsg(‘Speed UNDER the speed limit’)

else:

debugmsg(‘Has NO GPS Fix to be tested for overspeeding’)

##################################################################################

Init

SER.set_speed(‘115200’,‘8N1’)

SER.send(‘\r\n--------------------\r\n\r\n’)

debugmsg(‘Running…’);

#Set verbose error reporting

MDM.send(‘AT+CMEE=2\r’, 0)

MDM.receive(50)#5 sec

MOD.sleep(1)#wait 0.1sec

#Setup SMS

sms_setup()

#Main loop

while (LOOP==1):

debugmsg(‘Entering loop’)

#Retrieve current position

gpspos = GPS.getActualPosition()

debugmsg(‘Position: %s’ % gpspos)

#Retrieve GPS fix status

gps_statusnow = gps_status(gpspos)

#Save last valid position

#If position fix valid, or none recorded already, use last retrieved

if ( (gps_statusnow == TRUE) or (gps_statusnow == FALSE) ):

testspeed(gpspos)

debugmsg(‘Powersave for 10 seconds’)

#Powersave for 10 seconds

MOD.powerSaving(10)

I don’t know why this is happening. It cost me a lot in buying this device and now turns out like this.

Is there any solution in making the module stable again?

Do I need to upgrade my firmware from .400 to 403?

Or maybe the problem is on my script?

What happens if you make a very simple script without the powersave… only a “print” or something like that ?

Hello,

the function float() doesn’t work on me either. On pythonwin the function works, but on my gm862 it doesn’t and I need it. What should I do?

For floating point math, you can scale #'s or use a math co-processor, Sparkfun sells one (Floating Point Co-Processor uM-FPU v3.1).

Hello,

How did you solve the problem occuring on GM862-GPS with sparkfun EVK ?

Even a simple script doesn’t seem to be executed by the module.

import SER

a=SER.send(“hello world”)

The module hangs until I switch it off. No commands are accepted.There are some symbols displayed on the terminal screen.

Any idea or clue please ? It would be very helpfull.

Thanks

I’m having some trouble to update my GM862-GPS Firmware :

after few moment the xfp tool shows the error message :

Error : FlashsendStream - Error rx (0x000061B2 -0x000161B1), Code:0 (Code: -9)

please can you help me to figure this out.