summaryrefslogtreecommitdiffstats
path: root/md/writeup/serial_gps_data_reading_utility.md
diff options
context:
space:
mode:
Diffstat (limited to 'md/writeup/serial_gps_data_reading_utility.md')
-rw-r--r--md/writeup/serial_gps_data_reading_utility.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/md/writeup/serial_gps_data_reading_utility.md b/md/writeup/serial_gps_data_reading_utility.md
index b3d233f..289c610 100644
--- a/md/writeup/serial_gps_data_reading_utility.md
+++ b/md/writeup/serial_gps_data_reading_utility.md
@@ -11,20 +11,20 @@ and outputs line by line recieved data.
When device connected ther could be that is not in NMEA mode
it could be switched with:
-```
+```sh
gpsctl -n /dev/ttyUSB0
```
Then you can connect with it with some serial terminal(dont forget baudrate
could be 4800 or 9600):
-```
+```sh
minicom -D /dev/ttyUSB0
```
Now we can use our gpsr utility
-```
+```sh
./gpsr -d /dev/ttyUSB0 -c 0
./gpsr -d /dev/ttyACM0 -c 1
```
@@ -32,7 +32,7 @@ Now we can use our gpsr utility
NMEA format is csv like and it easyly can be used from shell. Here is
exmple how it looks:
-```
+```text
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
```
@@ -50,7 +50,7 @@ A Status A=active or V=Void.
Get time from GPS
-```
+```sh
./gpsr -d /dev/ttyUSB0 -c 100 | stdbuf -o0 grep -w "GPRMC" | cut -d',' -f2
```
@@ -62,9 +62,9 @@ I have tested everything with GPS devices BU-353 and with
some device that havenot any visual marks but have chip
from u-blox manufacturer.
-## COMPILE:
+## COMPILE
-```
+```sh
gcc buf.c -c
gcc serial_tty.c -c
gcc serial_tty.o buf.o gpsr.c -o gpsr