[PythonCE] reading GPS?

Justin Mitchell gmane at justinmitchell.net
Sat Jul 12 02:21:14 CEST 2008


Alex Mandel wrote:
> Justin Mitchell wrote:
>> Alex Mandel wrote:
>>> Justin Mitchell wrote:
>>>> Any suggestions on where to get started on reading GPS coordinates? 
>>>> Would these be read through the serial interface? I have a Motorola 
>>>> Q9C Smartphone.
>>>>
>>>> Justin
>>>>
>>>
>>>
>>> Yes, do a search through the history of this list for ceserial to get 
>>> the python wrapper around the com ports.
>>>
>>> I'm actually working on a GPS tool based on this. I have a sample 
>>> tool that logs anything over com port and specifically is aimed at 
>>> parsing NMEA with a tcl/tk interface right now.
>>>
>>> Ideally I just need to contact the ceserial author since the license 
>>> is unclear and see about where we should post this stuff. Maybe a new 
>>> sourceforge project?
>>>
>>> Let me know if you need some examples,
>>> Alex
>>
>>
>> Examples would be excellent!
>>
>> Justin
>>
> 
> I don't have my full svn of my project moved to a public website yet 
> (actually only have the last checkout right now) but I can show you the 
> example I used to figure out how to deal with the gps. This should get 
> you started.
> 
> http://article.gmane.org/gmane.comp.python.windows-ce/1631/match=ceserial
> 
> More to come later I'm sure,
> Alex


Thanks! I've been fooling around with that code, and am getting an 
exception in this function in ceserial.py:


def getCommTimeouts(self):
   """Get the comm timeouts."""
   timeouts = COMMTIMEOUTS()
   if not(windll.coredll.GetCommTimeouts(self.__handle,byref(timeouts))):
     raise SerialException, windll.coredll.GetLastError()
   return timeouts


windll.coredll.GetLastError() print's "0", which isn't of much help! I'm 
not too familiar with the win32api. What is the proper way to print 
error messages?

I googled it, and found one other person who ran into the same problem, 
but did not resolve it.

I've looked through the MSDN docs, and the ceserial source, but I'm 
stuck. Any ideas?

Thanks again,
Justin



More information about the PythonCE mailing list