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’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
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.
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?
denmansoft:
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:
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
mtbbiker:
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.
jasonharper:
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:
class SerWriter:
def write(s):
SER.send(s)
import sys
sys.stdout = sys.stderr = SerWriter()
I tried this and it works perfectly!
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:
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)
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.
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 !!
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 .
Now i can’t upload anymore python files and the whenever i open the comm port in RSterm application i keep seeing “Running” displaying non-stop from the screen. How do i disabled it and recover my module?
The script will be executed at start-up only if the DTR line is found LOW during initial start-up (that is: COM is not open on a PC), otherwise the Easy Script® interpreter will not execute and the module supporting the Python extension will behave normally answering only to AT commands on the serial port.