SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By AlexF
#29955
Hi All,

I wonder if any of you could help me.

I have a little Python script that runs on the GM862-GPS module. The problem is that it takes a long time to upload script with hyperterminal, enable it, put 2.8V on DTR pin, reboot module and wait till script compiles and run. I would like to use PythonWin, by pressing "Run".

Here is my very simple script:
Code: Select all
import MDM
MDM.send('AT\r',5)
The error I get is:
Code: Select all
Traceback (innermost last):
  File "C:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py", line 301, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Documents and Settings\fera3002\Bureau\b.py", line 3, in ?
    MDM.send('AT\r',5)
AttributeError: send
What I don't understand is why this works with module when I upload script with hyperterminal, but not with PythonWin?

I tried to search forum and internet, but no result.

Thanks for your help, and sorry if this looks like a stupid question.
By gm
#29957
I just tried it and it works for me. What version of PythonWin are you using? It should be the 1.5.2+ version. Do you have the serial port open with another application? Also, there is a bit of a problem with the GM862 Evaluation Board - RS232. The hardware flow control will not work as the RTS and CTS lines being crossed. This problem has been reported to SF so they should be able to give you some directions in correcting it.

Hope this helps,

Greg
By troy
#29958
PythonWin is telling you that the MDM module you've imported does not have an attribute 'send'. I haven't installed the Telit software, so I don't know why this would happen.

I'm really surprised that your script errored where it did. Telit's documentation indicates the MDM module is a software bridge to the AT engine. That makes me think that it is specific to the GM862. You probably don't have this module installed on your PC, so I would have expected an ImportError instead of an AttributeError.
By AlexF
#29960
To Greg --> Thanks for your answer.
What version of PythonWin are you using? It should be the 1.5.2+ version.
I am using the TelitPy1.5.2+_v4.1 version, which seems to be the latest available.
Do you have the serial port open with another application?
Before I run PythonWin, I close my hyperterminal. I don't see anything else that could use that port (COM3).
Also, there is a bit of a problem with the GM862 Evaluation Board - RS232. The hardware flow control will not work as the RTS and CTS lines being crossed.
I use the SparkFun EVK V2 USB evaluation Board. Do you think that flow control could be the reason with an USB eval board?

Thanks. Alex
By AlexF
#29961
To Troy --> Thanks for your answer as well

The MDM module is specific to some Telit Modules, you're right. I installed that module, and followed closely the "Easy Script in Python (rev 2)" Manual. I think (I hope!) software installation is correct. But I will check again.
By gm
#29965
Alex,
I use the SparkFun EVK V2 USB evaluation Board. Do you think that flow control could be the reason with an USB eval board?

Thanks. Alex
I thought it might be the flow control as you said that downloads take a long time. I took a look at the documentation, although it is version 3, and it appears to be wired correctly.

You might want to reinstall Python. Here is a link a previous version that has the installation instructions and the TCL library also.

http://jimdgrayassoc.com/INSTALLING%20P ... S%20PC.zip

-Greg