USB-Port-GPS Module SKU:EZ-0048

From 52Pi Wiki
Jump to navigation Jump to search

USB-Port-GPS Module[edit]


  • Support Raspberry Pi model A, B, A+, B+, Zero, 2, 3 with its' L80-39 GPS chip inside.
  • Communicates satellite with UART or USB.
  • CP2102 as USB to UART Bridge chip, stable and faster.
  • The L80-39 with 66 search channels and 22 simultaneous tracking channels,it acquires and tracks satellites in the shortest time at Outdoor.

Attention This module is fit for outdoor operation. please put the Antana in the open air.

Compatibility List[edit]

  • Compatibility
Platform USB-Port-GPS Module Notes
Raspberry Pi 3 Model B Plus
Raspberry Pi zero
Raspberry Pi zero W
Raspberry Pi 3 Model B
Raspberry Pi 2 Model B
Raspberry Pi Model B+


  • -165 dBm sensitivity, 1Hz (Default), up to 5Hz, 66 channels
  • At least 100mA current draw to startup.
  • PPS output can be used to coordinate time with satellite.
  • Internal patch antenna which works quite well when used outdoors SMA connector for external active antenna for when used indoors
  • Fix status LED blinks to let you know when the GPS has determined the current coordinates
  • EASY™, advanced AGPS technology without external memory
  • Support time service application which can be achieved by PPS sync NMEA feature
  • Built-in LNA for better sensitivity
  • RTC battery-compatible
  • 1x8 male headers, USB micro Interface
  • includes CP2102 Module Serial Converter USB 2.0 To TTL UART

Document Download: File:Quectel L80-R GPS Specification V1.0.pdf


Type value
Satellites 66 acquisition channels,

22 tracking channels

Work Voltage 4.5-5.5V
Weight 4.35g
Maximum Current 100mA MAX
Work Temperature -40~+85℃
scale 16.6x26x18.6(mm)
GPS L80-M39
Patch Antenna Size 15.0 x 15.0 x 4.0mm
Position Accuracy <2.5M CEP
Velocity Accuracy <1.0m/s
Warm/cold start without ESEY <35s
Warm/cold start with ESEY <15s
Acquisition sensitivity -148dBm
Tracking sensitivity -165dBm
Update rate 1Hz (Default)

up to 5Hz

Baud Rate 4800~115200 bps

9600bps default

Protocols NMEA 0183
Mount Cable 1*8 Stacking Header

USB micro data cable




Package includes:[edit]

  • 1x USB-Port-GPS(L80-39) module
  • 1x USB data wire

How to wire it up[edit]

Uart Style:[edit]

Because of the Serial port issue of Raspberry Pi 3, Model B, it may cause unexpected problem, we suggest that you do not connect GPS module with Raspberry Pi directly with GPIO Pins.

  • 1.You need a USB-to-TTL cable to connect GPS module and Raspberry Pi ,and you can wire it up like this chart:
GPS module Wire color
VCC Red wire
GND Black wire
TXD Green wire
RXD White wire

  • 2.Power on Raspberry Pi and login, open a terminal and type following commands if you use raspberry Pi in desktop environment.

USB Style:[edit]

  • Just use a microUSB cable connect Raspberry Pi USB port with GPS module and power on Raspberry Pi.



How to use it[edit]

1. After power on and login to system. you can open a terminal and typing following command to install packages for GPS module.
sudo apt-get update && sudo apt-get -y install gpsd gpsd-clients python-gps
2.Start the gpsd service and control it.
Enable it: sudo systemctl enable gpsd.socket
Start it: sudo systemctl start gpsd.socket
Restart it: sudo systemctl restart gpsd.socket
Check status: sudo systemctl status gpsd.socket

4.Modify the configuration file of gpsd in /etc/default/gpsd
Modify the "DEVICE" parameter according to the name of serial port in /dev folder.
It is usually named "/dev/ttyUSB0" if you connect it to Raspberry Pi via USB cable.
You can use "nano" or "vim.tiny" editor to finish it.


Restart service:
sudo systemctl restart gpsd.socket
Finally, use this command to get information from GPS module.
sudo cgps -s
5. The GPS status will be like this:


Example Code in C for Client[edit]

  • Using following code can be get GPS infomation from gpsd progress from local port 2947 via libgps library.
  • GPS client HOWTO
  • CODE name gps.c:
#include <gps.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>

int main() {
int rc;
struct timeval tv;

struct gps_data_t gps_data;
if ((rc = gps_open("localhost", "2947", &gps_data)) == -1) {
    printf("code: %d, reason: %s\n", rc, gps_errstr(rc));
    return EXIT_FAILURE;
gps_stream(&gps_data, WATCH_ENABLE | WATCH_JSON, NULL);

while (1) {
    /* wait for 2 seconds to receive data */
    if (gps_waiting (&gps_data, 2000000)) {
        /* read data */
        if ((rc = gps_read(&gps_data)) == -1) {
            printf("error occured reading gps data. code: %d, reason: %s\n", rc, gps_errstr(rc));
        } else {
            /* Display data from the GPS receiver. */
            if ((gps_data.status == STATUS_FIX) && 
                (gps_data.fix.mode == MODE_2D || gps_data.fix.mode == MODE_3D) &&
                !isnan(gps_data.fix.latitude) && 
                !isnan(gps_data.fix.longitude)) {
                    //gettimeofday(&tv, NULL); EDIT: tv.tv_sec isn't actually the timestamp!
                    printf("latitude: %f, longitude: %f, speed: %f, timestamp: %lf\n", gps_data.fix.latitude, gps_data.fix.longitude, gps_data.fix.speed, gps_data.fix.time); //EDIT: Replaced tv.tv_sec with gps_data.fix.time
            } else {
                printf("no GPS data available\n");


/* When you are done... */
gps_stream(&gps_data, WATCH_DISABLE, NULL);
gps_close (&gps_data);

  • Complie and run it.
gcc -o gps gps.c -lm -lgps
sudo ./gps

Trouble Shooting[edit]

If you can not get the information mentioned before. You can use this command to check if serial is working properly. cat /dev/ttyUSB0 it works fine if you see this picture:



  • Question: I use L80-39 GPS module. I choose to connect the GPS to the raspberry using a USB port. I followed these steps:
pi@raspberrypi ~ $ sudo cat /dev/ttyUSB0  

sudo apt-get update
sudo apt-get install gpsd gpsd-clients
sudo dpkg-reconfigure gpsd   
start gpsd automatically: yes
Should gpsd handle attached USB receivers automatically: yes
Device the GPS receiver is attached to: <leave blank>
Options to gpsd: -n /dev/ttyUSB0
gpsd control socket path: <use default>

sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
cgps -s
**NO FIX**

What should I do for NO FIX problem?

    • Answer: You can modify /etc/defalut/gpsd file and make sure you input the right arguments as following picture:
    • Gpsconfig.png

  • Question: Can I use it in my car as a GPS receiver ?
    • Answer: please see this manual and try lcdgps command.
       A client that passes gpsd data to lcdproc, turning your car computer into a very expensive and 
       nearly feature-free GPS receiver. Currently assumes a 4x40 LCD and writes data formatted to fit
       that size screen. Also displays 4- or 6-character Maidenhead grid square output.
    • Does it supports the entire NMEA Version 3 sentences or just a subset of it?

Answer: Yes, it is, Our GPS module support standard NMEA protocol, more information you can read this datasheet: [L80 gps protocol specification v1.0.pdf |]