This article is related to Fun With Arduino, Global Navigation Satellite Systems (GNSS) and Teseo III . At a lower level though: interaction with the UART interface. The "Fun with Arduino" post of shabaz provides an Arduino sketch to talk to a Teseo-LIV3. That firmware uses UART to get info off the GPS. I'm going to do some of these things from a terminal. Read what the Teseo sends. And try to control that stream of info.
I'm investigating this to understand how this GPS behaves. I'm writing an I2C program for it, and it's hard to understand why and how I receive data. Fortunately, the I2C and UART interface are the same, except for the transport layer. Because it's easier to free-wheel a conversation with a terminal over UART, I'm going that way today. For a selected number of commands, I have to use another bit, to indicate I'm using the UART interface. But that's where the difference in logic ends.
Instead of having to go through a flow of code-change, build and inspect i2C trafic cycle,
I can test all interactions via the serial monitor. And that's really easier.
Hardware needed:
- a UART (3.3V) to USB COM Port converter. I used a picoprobe. Any pass-through UART to USB will work.
- 5V power. Also delivered by that picoprobe in my setup.
Commands I've tested:
$PSTMSRR: reset
$PSTMSAVEPAR: save current settings in flash
$PSTMGPSSUSPEND: stop engine
$PSTMGPSRESTART: start engine
$PSTMCFGMSGL,0,1,0,0: clear UART list (this is the only one that's UART specific in my scenario. For I2C the first parameter is 3 instead of 0.
$PSTMSETPAR,1227,1,2: disable overeager messaging
$PSTMRESTOREPAR: restore to original settings. Undo flash write
$PSTMNMEAREQUEST,100000,0: request location
$PSTMNMEAREQUEST,40,0: request time
Here's the result of a few exchanges:
image:I managed to tame the output. It only returns what I ask, instead of a regular flow of all data.
That's it. A simple post that shows that you can control the behaviour in a very similar way with I2C or UART.