My astro setup has a GL.iNet GL-MT300N V2 running OpenWRT that I’m using as both a wireless client and a wireless access point. It also has a USB port that I’m using with a cheap U-Blox based GPS device that I got for under £10 on ebay. I’ve configured OpenWRT to use this device as an additional stratum 1 time source for NTPD so I can sync time on my equipment more accurately. I’d also like to share the GPS location data with NINA. Here’s how to do it:-
1) Follow this guide to install kmod-usb-acm, gpsd, gpsd-clients, ntpd and ntp-utils. Follow the guide entirely to set up GPSD and NTPD. Validate that GPS is working by running gpsmon or cgps by SSHing into the device and running from the command line.
2) Now we need to arrange for GPSD to export NMEA data. To do this, install OpenWRT package for luci-app-xinetd. This will also install xinetd itself. Once this is installed, go to the GUI and load the Services/Xinetd screen. Add a new entry. Name it “NMEAGPS” or similar, port 2948 (or any other unused port), protocol TCP, socket type “stream based service”, server “/usr/bin/gpspipe”, server aguments “-r localhost:2947. Hit save and then save & apply. You can now test this is working by telnetting to port 2948 on your router to verify that NMEA data is returned
3) Now we need to set up a virtual serial port on your Windows PC so that your astro software can access this GPS data over the network. To do this, download HW VSP3 Virtual Serial Port. Install it and run it. Configure it by choosing a free com port, setting the ip address of your router device, and port 2948 (or whever you set up in step 3). Next go to the settings tab and tick “create vsp port when HW VSP startup”, “purge buffers when port is opened” and “connect to device even if virtual com is closed”. Go back to virtual serial port tab and enable the port by clicking “Create COM”. This should be persistent across reboots.
4) Now run NINA, go to “options” section, equipment tab and set the GNSS device as “NMEA Serial GNSS”. Now return to the General tab and click the button to refresh your location from GNSS. As well as NINA, this should also work with any other software that can use NMEA on a serial port.