Virtual GPS NMEA Access

Virtual GPS Access

Many Digi products supporting Python include a GPS service which you open as '/gps/0', treating it like a read-only serial port. You will not need to set port settings like baud rate because you are not really talking to the hardware. Only one Python script can open the port at a time - it cannot be shared. If there are no valid GPS hardware(s) present, then port '/gps/0' still exists but no data will be returned. If port '/gps/0' does not exist, then your firmware and/or hardware does not have the GPS service available.

The NMEA sentence data returned from '/gps/0' might be from any valid GPS source - including one built into a cellular modem or an external USB GPS such as the USGlobalSat BU-353. Be warned that the cellular GPS is not free - you will need at least an external GPS antenna to obtain meaningful data, plus some cellular systems require a minimum level of cell service to exist before the GPS data can be accessed. The external USB GPS model BU-353 sells online for between $35 and $40 in quantity one.

If a GPS data source exists, then the Digi product automatically shows you the GPS Position information on the product's web pages under Administration -> System Information -> Position. Here is a screen shot from a Digi ConnectPort X4 with the BU-353 connected (and no, my desk is not moving at 1.07 knots - that is normal analog 'noise' in GPS systems):

Digi Product List

These products have the 'gps/0' port support for cell modem, serial or USB:

Model Firmware Cellular USB Serial Comments
ConnectPort X4 82001536D or newer No Yes Yes  
ConnectPort X8 82001115E or newer Possible Yes Yes For internal cell modem support, unit must have GPS antenna connected to secondary port
ConnectPort WAN VPN 82001276J or newer Possible Yes Yes For internal cell modem support, unit must have GPS antenna connected to secondary port
ConnectPort GPS All Versions Possible Yes Yes Has separate GPS hardware built in with dedicated SMC connector for GPS antenna
Connect WAN - 16MB Memory 82001660_B or newer No No Yes  
Connect WAN IA - 16MB Memory 82001661_B or newer No No Yes  
Connect WAN VPN - 16MB Memory 82001662_B or newer No No Yes  
Connect WAN 3G 82001532_D or newer No Yes Yes  
Connect WAN 3G IA 82001912_A or newer No Yes Yes

Cellular Notes: 'Possible' means some (but not all) cellular modules have GPS option and separate antenna is possible; 'No' means even if cellular module has GPS, lack of second antenna connector means signal quality will be poor and unreliable.

USB Notes: requires a compatible USB product which the Digi product can install as a virtual serial port; not all USB GPS will work

Serial Notes: most RS-232 products following NMEA guidelines should work; you MUST manually set the appropriate Serial Port Profile to the "GPS" setting and make sure the basic settings are 4800 baud, 8 data bits, no parity, 1 stop bit, and no flow control

These products do not support GPS via the '/gps/0' port, however Python could support directly by RS-232 serial.

Digi Connect TS1 to TS16 (serial only, requires full Python management; USB units not supported)

External GPS Products Known to Work

Note Digi is not affiliated with any of these suppliers, but these products are known to work.

USGlobalSat BU-353 USB GPS Navigation Receiver

Using NMEA Sentences

If you want a simple way to understand "Where am I? What time is it? How fast am I moving?", then you only need to understand the single RMC sentence, which stand for "Recommended Minimum Navigation Information" and looks like this "$GPRMC,154516.000,A,4453.8294,N,09324.9550,W,0.35,189.45,070209,,*1C".

Up to a dozen "sentences" or lines of data are dumped out per second, so overall traffic could be well above 200MB per month. You do not want to just forward all traffic over a cost-sensitive network like cellular.

While the NMEA 0183 standard document is sold by the US-based National Marine Electronics Association, many web sites world wide summarize the "sentences".

See Also