How to read GPS data from COM port, install into Windows Location Services lazarus / 67-Windows ---------------------------------------------------------------------- PaulRowntree · 2020-01-16 19:04 Hi! Most GPS units that I work with produce NMEA messages, often over RS232 or USB communication lines.  However, most Windows 10 mapping based programs want to read from the Windows Location Services.  So far I have only found one (commercial) code to read the NMeA data from a COM port and to send it to Location Services for other codes to work with. https://www.gpssensordrivers.com/ Does anyone know how to do this with Laz/FPC? EDIT : my vocabulary may be off ... LocationServices might be Win7, and Geolocation more win10-ish Thanks! ---------------------------------------------------------------------- dsiders · 2020-01-16 19:57 Quote from: PaulRowntree on January 16, 2020, 08:04:08 pmHi! Most GPS units that I work with produce NMEA messages, often over RS232 or USB communication lines.  However, most Windows 10 mapping based programs want to read from the Windows Location Services.  So far I have only found one (commercial) code to read the NMeA data from a COM port and to send it to Location Services for other codes to work with. https://www.gpssensordrivers.com/ Does anyone know how to do this with Laz/FPC? EDIT : my vocabulary may be off ... LocationServices might be Win7, and Geolocation more win10-ish Thanks! I haven't seen anything specifically for FPC or Lazarus. But there is virtual com port driver on http://nmea.sourceforge.net/ in C and C++. And, apparently rather dated. ---------------------------------------------------------------------- sstvmaster · 2020-01-16 20:53 In LazSerial (see OPM) there is an example for GPS/NMEA in the package folder (test). Maik ---------------------------------------------------------------------- PaulRowntree · 2020-01-17 04:18 Thank you for your replies.  Reading and parsing the NMEA isn't a problem, they are like ASCII csv strings with a CRC added.  I believe the codes in LazSerial and the NMEA site do this, as do my own codes. I am stuck at the process of 'force feeding' the sensor data into the Windows Geolocation API, so that other Win programs can read it, much as Android apps do.  Under Linux there is the gpsd that serves this role so that multiple apps can use the data from a single source.  There is a cygwin adaptation of gpsd, but it doesn't work with the new GeoLocation API. ---------------------------------------------------------------------- dbannon · 2020-01-17 06:09 Paul in the Linux world the solution is almost universally GPSBabel, apparently its available on Win 7-10 as well. Worth a look.... Davo ---------------------------------------------------------------------- PaulRowntree · 2020-01-17 18:54 Thanks DavoYes, and it looks like it is available on Win10.  It is a perfect 'hub' for GPS programs to receive from, but often those programs that are built for Win10, such as microsoft's Maps, will only get their data from the Geolocation API. Microsoft should have provided a software bridge for older, generic hardware on a COM port ... yet here we are. ---------------------------------------------------------------------- PascalDragon · 2020-01-18 10:49 You'd need to write a device driver (at least using the User Mode Driver Framework, so no need for kernel mode code) for this. A commercial driver for this is available here. ---------------------------------------------------------------------- PaulRowntree · 2020-01-18 23:20 Quote from: PascalDragon on January 18, 2020, 11:49:00 amYou'd need to write a device driver (at least using the User Mode Driver Framework, so no need for kernel mode code) for this. A commercial driver for this is available here. Yes, that is the one I linked to in the OP.  Is it possible to write such a driver with the FPC, and are there any example frameworks or examples to go by?  I am very surprised there is just this one example available. ---------------------------------------------------------------------- PascalDragon · 2020-01-20 08:30 Ah, hadn't noticed that this was the same link. Well, considering that we're talking about the User Mode Driver Framework it should be possible. However it seems that you'll have to dig through examples and the MSDN yourself as I didn't find anything for FPC or Delphi yet. ---------------------------------------------------------------------- BillyKerk · 2020-08-21 12:32 I know that the Eltima company has a VSPD software (https://www.virtual-serial-port.org/) that has an official digital signature from Microsoft. The software is not cheap, but there is a trial and you can try for compatibility with FPC or Lazarus. I could not find a valid virtual com port driver that would work with WIN10...