BeagleBone and GPS

Tonight brings us to GPS’s and how to get the BeagleBone to know where it is in the world.

I had a request during the week for a unit that would track and monitor a refrigerated truck.  So first thing that sprung to mind was a BeagleBone, I’ve already looked into the 1-wire network and setting up a DS18B20.. That is the temperature monitoring out of the way.

Now on to position… I know I could just get an off the shelf USB GSP module, but I’ll need the Bone’s one USB port to hook up a GSM modem, and sure I could put a USB hub in and connect both to the one port. But there has to be a nicer solution that can make use of one of the other UARTS on the Bone.  A dig around in my parts box and I found this old skool GPS receiver. Back in the day when I have a Palm Treo “Smart” phone.This unit has bluetooth (yepee!), but without a USB dongle won’t be much use… unless there is an internal serial line I can hack into.  Time to crack this bad boy open and see what is inside.  Turns out it is a re-badged Holux GPS receiver called the GPSlim236.

The GPSlim236 GPS module (with bluetooth)

What are the connectors on the left? Looks like these might be worth a poke at with the scope, see what is going on.

Cool.. Pin 3 (up from the bottom left pin) we see some serial data, and it even sweeter, it looks like it’s at 3.3V levels too.

The GPS serial data on the DSO (measured on pin 3)

A little more poking around with the DSO, I find the three pins needed.. 1) Gnd, 2) Data out and 3) +5V

The pinouts for the GPSlim263 module

So now I can hook up the GPS module to the BeagleBone on a spare UART and get the GPS data in that way.  Much easier that trying to get Bluetooth working!  I was already testing my RFID module out on UART1, so time to config UART2. UART2 Rx comes in on header P9, pin 22 [MUX pin spi0_sclk] and needs to be set up (along with TX).

echo 1 > /sys/kernel/debug/omap_mux/spi0_d0
echo 21 > /sys/kernel/debug/omap_mux/spi0_sclk

With a dig around I found the default serial config for the GPS data is 38400,n81.  Drop into Minicom and config the port (/dev/ttyO2), and bingo:


We have position data now… cool..!