SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By Robert Mann
#26466
After many days of reading and trial and error to get the GM862 configured semi. I find myself needing to start to use python scripts which are VERY troublesome to get working correctly. You almost MUST have the ability to debug your scripts using one of the debugging methods available to the GM862. The problem is I have not found a solution that works with the SF board yet.

Has anyone got a working example of using debugging with this setup? Can you provide which FIRMWARE you are using and a step by step of how you got the process to work? I have tried both methods in the Easy Python Scripting PDF with no luck and have tried many variations in between.

The next step for me would be to try to use the EMMI TX port but from what I read it is dedicated to the NMEA stream of the GPS so I do not think it will work. Plus it has to be ran through a MAX232 in order to convert from the low voltage CMOS of the GM862 to a standard COM port voltage for a PC.

I hope someone has a better solution then this?
By cabbage
#26554
I'm currently trying to build a Python debugger module for my GM862 - Round Solutions have just started selling one as well, but I quite fancied the idea of having a shot at my own - I'll let you know in a couple of days hwo I did it if it works :)
By denmansoft
#28213
I've been having difficulty with the GM862 USB EVK V3.
I couldn't use any of the pythonwin download stuff as it kept oming up with module not responding. The problem is that for the python serial code on the pc to work (using MS fileio as if it was on linux) you must supply a DSR active signal to the PC over the USB port. To fix this I jumpered pin 9 of the ftdi232r to ground to assert the DSR signal to the PC. This would be nice on a new rev of these boards...... The fix was simple once I wrote my own downloader and compared differences with TELIT's Eval board and kit. (I'm lucky to have both available.) Now for the Debug port. Telit's kit has a second serial port that works, but to use it on a GPS version (which is our whole point) you need to use their CMUX stuff and I haven't got that to work yet. During development I sprinkle in lots of debug prints to be able to follow what my code is doing. instead of using python print i use 'SER.send(debugstring)' and get it out of the main serial (USB) port.
By AlexF
#29789
Same problem as Robert Mann.
I am using module GM862-GPS, with PS:05.03.012/AL:07.01.406-B005-GM862-GPS software version and EVK V2 USB evaluation board.
I am trying to find a way to debug a simple Python script ("HelloWorld"). 2 options are mentionned on the Easy Script in Python (rev 2) document : using SSC bus or using CMUX, but neither work. Maybe because of the Evaluation Board?
I guess another solution would be to use the EMMI TX pins, but as Robert Mann mentionned, what about the GPS?
Anyone have a better solution? How did you solve that problem?
Thanks in advance.
By denmansoft
#29795
I just gave up on the python print command and use SER.send('Hello World\r\n')

Of course at the top of my program i first do a
SER.set_speed('115200','8N1')
SER.send('Hello There\r\n')

I find the 'Hello there' important because I then know my script is started.
There can be long delays to get to this point.

Biggest problem with not having the debug port available is I don't get any error messages from Python. Things just stop....
I use SER.send('...') to monitor progress of my application while I am
still debugging. When does that ever end ???
By AlexF
#29796
Wow, that was quick!
Thank you so much, I was getting crazy! It works now!
By jasonharper
#29797
denmansoft wrote:Biggest problem with not having the debug port available is I don't get any error messages from Python. Things just stop....
I have no experience with these modules, but speaking from a purely Python standpoint, it should be possible to redirect debugging and print statement output wherever you want. Try something like this:
Code: Select all
class SerWriter:
    def write(s):
        SER.send(s)

import sys
sys.stdout = sys.stderr = SerWriter()
It may be necessary to implement additional standard file methods, such as flush() and writelines().
By mtbbiker
#33654
Hi I am new to developing on Telit Modules and I have the same problem that none of the Debug software/application from Roundsolutions (Or from Telit's documentation) works on the Eval Board (V3).

denmansoft can you please send me a picture or schematic on how you jumpered PIN9 to assert the DSR signal to the PC

Any help in Debugging on the SFE Eval V3 board will be appreciated
By karl
#33670
mtbbiker wrote:
Any help in Debugging on the SFE Eval V3 board will be appreciated
I found that the SER.send method described above was perfectly adequate, but debugging doesn't occur 'in real time' - all the lines are reported at the end of the execution.

BTW, has anyone else had any thoughts on the speed of the python interpreter? My program is taking up to 4 minutes to complete.

K.
By leoperria
#34570
jasonharper wrote:I have no experience with these modules, but speaking from a purely Python standpoint, it should be possible to redirect debugging and print statement output wherever you want. Try something like this:
Code: Select all
class SerWriter:
    def write(s):
        SER.send(s)

import sys
sys.stdout = sys.stderr = SerWriter()
I tried this and it works perfectly!
Code: Select all
import MDM
import MOD
import SER
import sys

SER.set_speed('115200','8N1')
class SerWriter:
    def write(self,s):
        SER.send(s+'\r')
sys.stdout = sys.stderr = SerWriter()

print 'Hello world!'

while 1:
	print('Running')
	MOD.sleep(10)
You can try for example to throw an exception:
Code: Select all
import MDM
import MOD
import SER
import sys

SER.set_speed('115200','8N1')
class SerWriter:
    def write(self,s):
        SER.send(s+'\r')
sys.stdout = sys.stderr = SerWriter()

print 'Hello world!'

print thisVariableNotExist

while 1:
	print('Running')
	MOD.sleep(10)
By dpat12
#36426
I tried the SER.send method and tried listning on COM1 but i could not seen anything .

Please any body tell me how i can debug using SER.send method . ie. where to listen on COM1 with that what settings will be require .

even i tried the other Telit cmux procedure buy it does not work at all ???
at least i could see something with the help of SER.send??

Please help
By denmansoft
#36489
Get RSTerminal from Round Solutions to use as your host terminal program.

http://www.roundsolutions.com/techdocs/

Configure it for your Com port on your host as 115200, 8N1.
If you are using a usb/serial adapter make sure you close RSTERM before unplugging it. RSTERM gets nasty if you don't. Other that that it is a great terminal program and development tool for these modules!

The method for re-directing prints and errors to SER that JasonHarper Posted works great! leoparria's samples show how to use it.

Ian
By dpat12
#36518
Yes am using RSTerm only and that the post setting on COM1 is 115200, 8N1.

when i download script as posted by JasonHarper and change the DTR switch to High and then close the rsTerm switch off the module then connect rs term and the npower on the module i could not see SER output on COM1.

I am also keen on working on with CMUX the techdocs says that AT+IPR=0 will not work for CMUX . which is the default setting for GM862-GPS 7.02.403 version !!

by doing this changes i think it should work .
By denmansoft
#36519
I just download with RSTerm, set EScript to the new file then Execscr.
I'm not sure what the other steps you are doing are about. See my post about the dsr jumper dated 05 apr 2007
By dpat12
#36522
SER works now . i did this AT#CMUXSCR=0,115200 disable the CMUX and
magically i got the SER output on the RSterm . now i can debug the module .

But i am also interested in statring the CMUX thing on SFE boad as number of people facing problem if CMUX works on SFE board that would be great . i will keep woking on this topic .

if your ar interested please help me .

Thanks ,