GithubHelp home page GithubHelp logo

jrcichra / sim7600g-gps-collector Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 74 KB

A GPS collection package to monitor Pis in the wild

License: MIT License

Makefile 9.86% Go 52.51% Python 37.63%
sim7600 golang shell-script collect-metrics

sim7600g-gps-collector's Introduction

sim7600g-gps-collector

  • A GPS collection package to monitor Pis in the wild
  • Tested on Raspbian using a Raspberry Pi 4B and Raspberry Pi Zero W with this hat: https://www.waveshare.com/wiki/SIM7600G-H_4G_HAT
  • Sometimes you lose /dev/ttyUSB1 which is needed for GPS. This program will restart if it detects that /dev/ttyUSB1 is missing. V3 runs two perl threads - one that monitors the data connection with a ping to Google, and the other checks for TPV data in calls to gpspipe -w. Each issue will be addressed separately by the responsible thread

Setup

Server-side

  • Create a new database in mysql for this project: i.e create database gps
  • See sim7600g.sql. Create a table with these columns
  • Create a database user for the next step: create user ingest@'%' identified by a_password
  • Grant insert privs on the gps database.table you made earlier grant insert on gps.gps to ingest@'%'
  • See https://github.com/jrcichra/ingestd. Spin up this docker container on your server, specifying your mysql database as described. This tool ingests data from HTTP POSTS into a database
  • ingestd should start up and be listening for data

Client-side

  • Modify constants at the top of gps_collector/gps_collector.go to point to the appropriate URL/database/table
  • I've included some simple make targets to help installation
  • (You'll need a recent version of the Go compiler)
  • sudo make install compiles the Go code, places binaries/scripts in /usr/local/bin, and enables the systemd targets
  • sudo make uninstall removes what was added to /usr/local/bin and instantly disables the systemd targets.
  • Modify /etc/default/gpsd and set DEVICES="/dev/ttyUSB1"
  • sudo systemctl daemon-reload
  • sudo systemctl restart gpsd

sim7600g-gps-collector's People

Contributors

dependabot[bot] avatar jonathandbriggs avatar jrcichra avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.