Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:vim4:applications:gnss-5g

VIM4 GNSS on 5G Module

Introduction

This page will introduce the usage of the GPS/GNSS capabilities on 5G module (RM500Q-GL). This includes how to enable the GNSS functions and get the raw satellite data from the module, And how to display the Positional data graphically.

Enable GNSS

Install minicom and open /dev/ttyUSB2 port.

$ sudo apt-get install minicom
$ sudo minicom -D /dev/mhi_DUN

Send the following commands via minicom to enable GNSS.

AT+QGPS=1

Get the GPS data

Obtain GPS data through /dev/mhi_LOOPBACK port.

$ cat /dev/mhi_LOOPBACK
$GPVTG,,T,,M,,N,,K,N*2C
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGGA,,,,,,0,,,,,,,,*66
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,T,,M,,N,,K,N*2C

Get GPS data using gpsd

Install gpsd

Before you begin, install gpsd and the client programs by running the following command.

$ sudo apt install gpsd gpsd-clients

Configure gpsd

Open the gpsd configuration file.

$ sudo vim /etc/default/gpsd

Make the necessary changes to specify the correct device node.

 Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
+ DEVICES="/dev/mhi_LOOPBACK"
 
# Other options you want to pass to gpsd
+ GPSD_OPTIONS=""
 
# Automatically hot add/remove USB GPS devices via gpsdctl
+ USBAUTO="true"

Restart the services.

$ sudo systemctl restart gpsd

Observe data

Start the cgps client to observe data.

$ cgps

Start the gpsmon client to observe data.

$ gpsmon
2023/10/27 03:47 · sravan
Last modified: 2023/10/27 03:59 by sravan