for my first post that actually contains content, I would like to show you what I use as a cheap and small GPS device.
GPS devices can be found in a lot of different devices, like mobile phones, cars and security devices. One class of such security devices are GPS -Tracker. GPS-Tracker constantly register their position and send the information to a previously specified user via eMail or SMS. I bought this tracker (for ~60€) that sends a SMS with the current position as a reply to a request SMS coming from me. The initial idea was to get the position of a RC plane in case its lost or to track the position of my cat 🙂
Me being me I opened the device to get a look inside and I found solder spots marked GPS_VBK (black), GPS_TX (white), GPS_RX (blue), TX (gray), RX (brown), VCC (red), GND (green), and ON (yellow). On the image you can see those spots with cables already attached . At this point I was hoping I might be able to listen to what is being sent forth and back when I send a request SMS. This way I could later send the same message to get the GPS position, etc.
Using a multimeter I found out all signal levels are at $$3.3~V$$ which is good since I was able to use a USB<->serial converter I already own.
After sending several SMS and testing which lines to use, I found out that the GPS device talks on the GPS_RX/TX lines (obviously, duuh 🙂 ). The messages I received seemed kinda cryptic (sadly I do not have a sample) but a google search showed that those messages are NMEA commands. A second search for a library lead me to gpsd a small but very powerful program that understands many dialects of NMEA.
Now this is truly perfect! It turns out that I do not have to code a program (with all the issues of serial communication) but instead I can use an existing solution! gpsd is working like a charm when hooked up to the GT-170, if I send an SMS. Wait… what?
At this point I faced the only real problem so far. The GPS device is switched on only after it receives a command SMS. For an independent GPS device this is unusable. Luckily, I wasn’t willing to give up yet. The whole time I was fiddling with the GT-170 I was wondering what the GPS_VBK is used for. I measured the voltage level with the tracker switched on and its $$0~V$$. For some reason I measured it a second time right after sending a SMS to the tracker and it jumped to $$3.3~V$$ for some time and then back to $$0~V$$. Could it be that easy? Yes, the GPS_VBK is the enable switch of the GPS device. After connecting it to the VCC pin gpsd printed the position in a continous stream!
And it gets better! Even with the GPS device being switched on the whole time, I can still use the SMS command feature of the GPS-170. This does not break anything, so in case the RC plane, cat, etc. is lost I can still request it to send me the current position.
My plan is to utilize the libraries that come with gpsd to create a custom C-program reading the position. How this is done will be the topic of a future post, so keep checking this site 😉