Difference between revisions of "Transclusion: IOT-GATE-iMX8: GPS"

From Compulab Mediawiki
Jump to: navigation, search
imported>Uri.mashiach
(Created page with "Optional GPS interface is implemented with the cellular modem module.</br> The [https://manpages.debian.org/jessie/gpsd-clients/cgps.1.en.html cgps] client can be used to disp...")
 
imported>Uri.mashiach
 
Line 2: Line 2:
 
The [https://manpages.debian.org/jessie/gpsd-clients/cgps.1.en.html cgps] client can be used to display the GPS information.
 
The [https://manpages.debian.org/jessie/gpsd-clients/cgps.1.en.html cgps] client can be used to display the GPS information.
 
The cgps client utility depends on the gpsd daemon (starts automatically).
 
The cgps client utility depends on the gpsd daemon (starts automatically).
 
+
* Select the GPS interface:
* Connect to the modem configuration port with Minicom:
 
 
<pre>
 
<pre>
root@iot-gate-imx8:~# minicom -D /dev/ttyUSB3
+
root@iot-gate-imx8:~# sed -i "/^DEVICES=.*/c\DEVICES=\"/dev/ttyUSB1\"" /etc/default/gpsd
 +
</pre>
 +
* Enable the GPS with the following AT commands:
 +
<pre>
 +
root@iot-gate-imx8:~# echo AT+CGPS=0,1 | socat - /dev/ttyUSB3,crnl
 +
root@iot-gate-imx8:~# echo AT+CGPS=1,1 | socat - /dev/ttyUSB3,crnl
 
</pre>
 
</pre>
* Enable the GPS with the following commands:
 
AT+CGPS=1,1
 
* Verify that the OK respond is generated.
 
* Exit minicom (CTL-a, x).
 
 
* Start the cgps client to display GPS information.
 
* Start the cgps client to display GPS information.
 
The synchronization process might take a few minutes.
 
The synchronization process might take a few minutes.

Latest revision as of 08:25, 20 December 2020

Optional GPS interface is implemented with the cellular modem module.
The cgps client can be used to display the GPS information. The cgps client utility depends on the gpsd daemon (starts automatically).

  • Select the GPS interface:
root@iot-gate-imx8:~# sed -i "/^DEVICES=.*/c\DEVICES=\"/dev/ttyUSB1\"" /etc/default/gpsd
  • Enable the GPS with the following AT commands:
root@iot-gate-imx8:~# echo AT+CGPS=0,1 | socat - /dev/ttyUSB3,crnl
root@iot-gate-imx8:~# echo AT+CGPS=1,1 | socat - /dev/ttyUSB3,crnl
  • Start the cgps client to display GPS information.

The synchronization process might take a few minutes.

root@iot-gate-imx8:~# cgps
┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2020-05-04T14:13:30.000Z   ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    32.65985123 N             ││  71    29    123    22      Y   │
│    Longitude:   35.10027205 E             ││  85    27    047    22      Y   │
│    Altitude:   102.700 m                  ││                                 │
│    Speed:      0.00 kph                   ││                                 │
│    Heading:    128.7 deg (true)           ││                                 │
│    Climb:      6.00 m/min                 ││                                 │
│    Status:     3D FIX (53 secs)           ││                                 │
│    Longitude Err:   n/a                   ││                                 │
│    Latitude Err:    n/a                   ││                                 │
│    Altitude Err:    +/- 18 m              ││                                 │
│    Course Err:      n/a                   ││                                 │
│    Speed Err:       n/a                   ││                                 │
│    Time offset:     -3.682                ││                                 │
│    Grid Square:     KM72np                ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘