Setting serial baud rate on FreeBSD

I have a navspark gps microcontroller board I backed on indiegogo last year. The board has been sat in my desk for a year so I decided to just use it as a dumb gps and not bother with the microcontroller part of the board.

The default firmware sends nmea strings over a usb serial controller at 115200 baud, this was easy to test with cu. I wanted to use gpsd with the gps, I am planning to integrate it into a wardriving box in the next few weeks.

cu -l /dev/ttyU0 -s 115200

gpsd is unable to accept baud rate changes, instead there is workaround in the faq. The faq is probably wildly out of date, I couldn't get stty to change the baud rate on FreeBSD. I found that FreeBSD offers .init files for each of the serial devices and they should be used for configuring the serial device.

Using the following command worked for me and allowed gpsd to speak to the navspark.

# stty -f /dev/ttyU0.init speed 115200
# gpsd 

I could then connect to the gpsd and make sure it is working with cgps.

$ cgps -s -u m 

I am not really happy with the navspark, the indiegogo made the board look really cool, but so far there no community has formed around the board. This has led to a lack of approachable documentation and an ide only available with Linux and Windows bulds.

cgps

I would love to find a cheap gps that emits data over serial. The closest thing is the Adafruit Ultimate gps, but it is far too expensive for what it is. I have a pair of U-Blox PCI GPS cards, so far I haven't been able to get them working with anything.