QUECTEL Modem GPS Setup

QUECTEL mPCIe modems combine HSDPA/3G/LTE wireless connectivity along with GPS functions (with support for active GPS antenna)

These modems are very cost-effective for medium to high volume usage and provide excellent results in both upload/download speeds and GPS response for tracking applications.

For this example we'll be using a QUECTEL UC20 modem, but the same process will be similar on all QUECTEL modems. Start by installing the udev rule (20-modem-uc20.rules) in /etc/udev/rules.d from the modem rule pack

This sets up shortcut references to allow us to consistently identify which of the ttyUSBx ports do which functions

root@raspberrypi:~# ls /dev/modem* -l
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemAT -> ttyUSB3
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemGPS -> ttyUSB2
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemPPP -> ttyUSB4
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemS0 -> ttyUSB1
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemS1 -> ttyUSB2
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemS2 -> ttyUSB3
lrwxrwxrwx 1 root root 7 Jan  1  1970 /dev/modemS3 -> ttyUSB4

As the QUECTEL UC20 device uses a Active GPS antenna we can use most of the gps aerials on the market or combo antennas.

After connecting up a combo antenna let's do a quick check to make sure the modem is configured correctly:

root@raspberrypi:~# modemstat
SIM status                         : SIM unlocked and ready
Signal Quality                     : 2/32    (Bit error rate cannot be determined)
Network Registration               : Automatic network selection
Network ID                         : "vodafone UK"
Registration state                 : Registered to home network
GPRS/EDGE/UMTS/HSDPA Availability  : UMTS,HSDPA,HSUPA


GPRS/EDGE/UMTS/HSDPA Mode Status   : HSDPA+HSUP
 ** Infomation Not Available **

There are a few commands we need to understand to correctly configure the GPS setup on the modem

 

AT+QGPS=1 Starts GPS service + NMEA Feed on /dev/modemGPS
AT+QGPSEND  Stops GPS Service + NMEA Feed on /dev/modemGPS
AT+QGPSCFG="gpsnmeatype",xxx Configure which NMEA output sentences are generated (See SIMCOM GPS Page)
AT+QGPSLOC? Run on AT command port to give a one-shot reading
AT+QGPSGNMEA="RMC" Run on AT command port to give a one-shot reading of recommended minimum NMEA data
AT+QGPSGNMEA="GGA" Run on AT command port to give a one-shot reading of GPS Fix Data, Time, Position and related fix data

 

To do the tests below we'll need to setup two terminal windows to monitor /dev/modemAT and /dev/modemGPS so we'll use a LAN connection to allow us to run two minicom sessions.

To do this run the below commands, one per windows

minicom -D /dev/modemAT
minicom -D /dev/modemGPS

This will allow us to keep track of the NMEA output whilst we run the GPS AT configuration commands

To start the feed we'll configure the NMEA stetence type to give these two output lines

GPGGA - Global Positioning System Fix Data, Time, Position and related fix data
GPRMC - Recommended minimum data

Then we'll start the feed up, as you can see when there is no location information available untill a fix has been obtained, this can take up to 5 mins to achieve depending on the number of satalites the system can see.

Quectel UC20 EC20 EC21 EC25 GPS NMEA Fix Configuration

 

Looking at the GPS feed we see a similar story

Quectel UC20 EC20 EC21 EC25 GPS NMEA Fix feed

 


Once the system has obtained a fix then both the one-shot reading commands and the NMEA feed will report data

Quectel UC20 EC20 EC21 EC25 GPS NMEA Fix 1

 

Quectel UC20 EC20 EC21 EC25 GPS NMEA Fix Feed 2

 

To stop the GPS service use AT+QGPSEND command

 

For more information please refer to the QUECTEL user guides below :

QUECTEL GPS Application Note

QUECTEL UC20 AT COMMAND REFERENCE

Contact us now to discuss your project

Ready to order, contact us today for pricing or samples

Contact Us