none
Access to GPS in (possibly tuned) Windows CE 6.0

    Question

  • Dear forum,

    I'm trying to run my GPS app in an industrial PDA which runs Windows CE 6.0. I have tried some sample apps but I always get into one of these two problems:

    - the system does not have gpsapi.dll which is a dependency of the app.

    - the app connects to the GPS port (COM9) but is unable to actually start the GPS device. The only way to start the GPS is by starting the application included by the company who tuned the device, and click on their "Start GPS" option. So I pressume they are doing something special to start the GPS (running a .exe file with some parameters? using some not very common DLL?)

    Any ideas on how a third-party app can actually start the GPS in this case?

    Regards,
    Juan Lucas

     

    Friday, September 17, 2010 8:05 AM

Answers

  • I'm not 100% on the name. MS has done a LOT of name changing in the last year. But, I believe Windows CE 6.0 is the same as Windows Embedded CE 6.0.

    CE devices hide certain filetypes like .DLL from the File Explorer app by default. You may have to enable "Show All" to see it. If it still doesn't show up, then it is possible that functionality wasn't included by your device's OEM and you'll have to use the CreateFile() ReadFile() method. The best thing, probably, is to just try it and see.I believe the WM6 SDK comes with a GPS sample application all ready to go.

    -PaulH

    Friday, September 17, 2010 5:56 PM

All replies

  • The very last thing I have tried looks like this:

    =================================================
    ...
    HANDLE hPort = CreateFileW(...)
    GetCommState(...);
    PortDCB.fBinary = TRUE;
    ...
    SetCommState(...);
    GetCommTimeouts(...);
    CommTimeouts.ReadIntervalTimeout = 0;
    ...
    SetCommTimeouts(...);
    EscapeCommFunction(hPort, SETDTR);
    EscapeCommFunction(hPort, SETRTS);

    SetupComm (hPort, 0x1000, 0x1000);
    PurgeComm (hPort, PURGE_TXCLEAR | PURGE_RXCLEAR);
    ...
    =================================================

    But this didn't start the GPS either.

    I have also read something about a certain port called GPD0: but when I start the GPS from the other app, my app starts to receive the data through the COM9 port.

    Any ideas?

    Regards,
    Juan Lucas
    Friday, September 17, 2010 8:17 AM
  • Why not use the GPS Intermediate Driver API? It will parse the NMEA strings and handle the power management for you.  http://msdn.microsoft.com/en-us/library/bb202128.aspx

    If you want to use the serial port directly and need to know how GPS power is managed: http://msdn.microsoft.com/en-us/library/bb202066.aspx

    Also, to access the GPS driver by comm functions: http://msdn.microsoft.com/en-us/library/bb202097.aspx

    -PaulH

     

    Friday, September 17, 2010 2:46 PM
  • Hello, thanks. I'll try that. Forgive my ignorance, I have a few questions:

    - In the system properties, the device says 'Windows CE 6.0'. Is it the same as 'Windows Embedded CE 6.0' ? Here is the device datasheet:

    http://www.leica-geosystems.com/downloads123/zz/gpsgis/Zeno%2010%20&%20Zeno%2015/brochures-datasheet/Leica_Zeno_10_Zeno_15_DS_us.pdf

    - There is no 'gpsapi.dll' in the Windows folder. Do WinCE 6.0 usually have that DLL in their Windows folder? Or should developers provide it if they need it? The fact that that DLL is not there indicates that the software that comes with the device is not using the GPSID API?

    Regards
    Juan Lucas

    Friday, September 17, 2010 5:49 PM
  • I'm not 100% on the name. MS has done a LOT of name changing in the last year. But, I believe Windows CE 6.0 is the same as Windows Embedded CE 6.0.

    CE devices hide certain filetypes like .DLL from the File Explorer app by default. You may have to enable "Show All" to see it. If it still doesn't show up, then it is possible that functionality wasn't included by your device's OEM and you'll have to use the CreateFile() ReadFile() method. The best thing, probably, is to just try it and see.I believe the WM6 SDK comes with a GPS sample application all ready to go.

    -PaulH

    Friday, September 17, 2010 5:56 PM
  • GPSAPI is an software wrapper around the hardware ports, and it provides high-level/logical gps-infos's instead nmea-coded gps-log.

    So, when it isn'n installed, you have no "gps"-port (e.g. COM9) ,
    but you have to read the original COM-Port for the receiver,
    and you have to decode the NMEA Data yourself.

    Therefor you need exclusive access for the COM-Port,
    what means, that only one app can use the GPS-Info at time.

    That is, what your "other" apps do.

    Regards,
    Bernhard Schmidt

    Friday, November 26, 2010 10:56 AM