Tag Archives: gps
Somehow I ended up finding a Tessel GPS on Seeed Studio for $20 (it’s not $20 currently, but maybe someday soon). The Tessel GPS is really a Maestro A2235-H GPS chip on a semi-convenient breakout board.
I want to use it with a Raspberry Pi Zero-W.
The problem is that the GPS output appears to be a newer type of data called OSP. It’s not easy to read, and I didn’t find any pre-built libraries that decode it. If one slows the baud rate down, the output is in NMEA, which is standard and free libraries exist.
Raspberry Pi-0W OS Setup
I’m assuming the use of Raspbian here.
Recommended first-time setup courtesy of Adafruit.
A few things need to happen on the Pi-0W: turning off the serial console.
- $sudo raspi-config
- Option 5: Interfacing Options
- P6: Serial
- No, you don’t want the shell accessible over serial
- Yes, you want serial port hardware to be enabled
- Finish
- $sudo shutdown -h now
The last command is shutdown because at this point, I’m assuming the hardware is not plugged in.
Raspberry Pi-0W Hardware Setup
The Tessel GPS breakout has the TX and RX inverted (depending on how you look at it). Pi-0W pin 1 to the Tessel GPS 3V3 power, pin 6 to the Tessel GPS ground, pin 8 to the Tessel GPS TX, and pin 10 to the Tessel GPS RX.
Reading From The Device
When the device is first powered on, any serial connection prints gibberish because the GPS strings are in hex. To change that, one must send a string of bytes to the GPS device. I’ve prepared a quick python script to do just that:
Once this script is run, any serial connection can be made to the GPS device, such as:
$sudo minicom -b 9600 -o -D /dev/serial0
Or with python or another language.