GPS Module
HW-595 Board
- Based on uBlox NEO-6M-0-001
- 5V operation (3.3 V regulator onboard)
- UART: 4800 - 230400 bps (9600 bps 8N1 default), TTL levels buffered by 220R resistors
- U.FL connector supplies 3.3 V to active antenna
- Crystal Osc, not TCXO
- LED:
- Constant: Searching
- Blink 1s: Position fix
- Battery-backed RAM contains config data and clock and speeds first-time-to-fix
- Data in NMEA 0183 format
- More background here
Board pinouts:
Pin | Function | Description |
---|---|---|
1 | PPS | 1 pulse/s, synchronised at rising edge, length 100 ms (by default) |
2 | RXD | UART input |
3 | TXD | UART output |
4 | GND | Ground |
5 | VCC | 3.3 - 5 V |
PPS can be reconfigured as a frequency reference:
- Send PPS to UART via CTS
- 0.25 Hz - 10 MHz
- Configure in u-Center here
- Output has high frequency accuracy, but suffers from jitter except at a few specific frequencies
Software
U-Center
- U-Center
- Select COM port and Baud rate
View/Change Settings (View -> Messages View):
- Firmware version: UBX -> MON (Monitor) -> VER (Version)
- Baud rate: UBX -> CFG (Config) -> PRT (Ports)
- Choose the Baudrate
- Send
- Save for restart:
- UBX -> CFG (Config) -> CFG (Configuration)
- Select 2-I2C-EEPROM in the Devices option
- Send to save the configuration.
GPSD
- gpsd
- Packages: gpsd, gpsd-clients
Use of a serial device (eg ttyS0) is prefered over a USB/serial interface (eg ttyUSB0).
Can be tested with something like (Debug level 4) :
gpsd -N -n -s 9600 -D 4 /dev/ttyS0 /dev/pps0
Configuration in /etc/sysconfig/gpsd, which by default enables detection of USB devices via udev events including creation of a PPS device (/dev/pps0):
USBAUTO="true"
Options can be forced, eg:
OPTIONS="-n -s 9600" DEVICES="/dev/ttyS0 /dev/pps0"
Check data stream with gpsmon:
gpsmon /dev/ttyS0
when gpsd is not started, or connected to gpsd:
gpsmon
Can show raw data:
gpscat /dev/ttyS0
Enable and start gpsd:
systemctl enable gpsd systemctl start gpsd
Monitor with:
cgps -s gpsmon gpscsv gpsplot --image gps.png xgps
Pulse Per Second (PPS)
With PPS output connected to a serial port pin, GPSD should detect it. If it is on GPIO or other serial port, this can be used to create a PPS device:
dnf install pps-tools modprobe pps_ldisc setserial -v /dev/ttyS0 low_latency ldattach PPS /dev/ttyS0
Check PPS signal:
ppstest /dev/pps0 ppscheck /dev/ttyS0
Can set at boot with udev rule (/etc/udev/rules.d/gps.rules):
KERNEL=="ttyS0", SYMLINK+="gps0" KERNEL=="ttyS0", RUN+="/usr/bin/setserial -v /dev/%k low_latency" KERNEL=="ttyS0", RUN+="/usr/sbin/ldattach PPS /dev/%k"