Skip to main content

UDP GPS Tracker Relay

Project description

airtrackrelay

UDP socket server to collect live tracking reports and relay them to metarace telegraph as JSON encoded objects.

Supported tracking devices and messages:

  • Quectel GL300/320 "Air Interface"
    • +ACK : Command acknowledge, type: 'drdack'
    • +RESP, +BUFF:
    • GTFRI, GTRTL, GTSOS, GTLOC : Location report, type: 'drdpos'
    • GTINF : Information report, type: 'drdstat'
  • Beaker
    • AES128 Location, type 'drdpos'

Configuration is via metarace sysconf section 'airtrackrelay' with the following keys:

key (type) Description [default]
topic (string) MQTT relay topic ['tracking/data']
port (int) UDP listen port [1911]
k1 (string) Beaker K1, 128 bit hex string [null]
k2 (string) Beaker K2, 128 bit hex string [null]
uid (int32) Beaker uid/config id [0x45670123]

Tracker imeis are read from the section 'tracking' under the key 'devices', which is a map of device ids to a dict object:

key (type) Description [default]
imei (string) Device IMEI
type (string) Device type

Example config:

{
 "airtrackrelay": {
  "port": 12345,
  "topic": "tracking/data",
      "key": "000102030405060708090a0b0c0d0e0f",
      "cbcsig": 1234567890
 },
 "tracking": {
  "devices": {
   "bob": { "imei": "012345678901234", "label": null,
    "phone": "+12345678901", "type": null },
   "gem": { "imei": "023456788901234", "label": null,
    "phone": null, "type": null },
  }
 }
}

Example Info Message:

{"type": "drdstat", "drd": "bob", "devstate": "41", "rssi": "13",
 "voltage": "4.08", "battery": "94", "charging": "0", "buffered": false,
 "sendtime": "20220101023424" }

Example Ack Message:

{"type": "drdack", "drd": "gem", "ctype": "GTFRI", "cid": "1A3D",
 "sendtime": "20220101031607", "req": ""}

Example GL3xx Location Message:

{"type": "drdpos", "fix": true, "lat": "-13.567891",
 "lng": "101.367815", "elev": "22.6", "speed": "12.7",
 "drd": "gem", "fixtime": "20220101022231",
 "buffered": false, "battery": "94", "flags": 0}

Example Beaker Location Message:

{"type": "drdpos", "fix": true, "lat": "-12.345666",
 "lng": "101.123555", "speed": "0.0", "drd": "bob",
 "fixtime": "2023-01-13T03:12:49.00Z", "battery": "100",
 "buffered": false, "flags": 255}

Requirements

  • metarace >=2.0

Installation

$ pip3 install airtrackrelay

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airtrackrelay-1.0.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

airtrackrelay-1.0.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file airtrackrelay-1.0.2.tar.gz.

File metadata

  • Download URL: airtrackrelay-1.0.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for airtrackrelay-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d7996cdc8b0e0083b724f8beb7a14d6d38eef4d4fcefc80109e1358a57dfd910
MD5 3be0980d618d2eea0de8a54827702120
BLAKE2b-256 0b0697d4ee92cebfb28b4ffc8b515c112130c0cc87351f2d6035147ac3aca635

See more details on using hashes here.

File details

Details for the file airtrackrelay-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for airtrackrelay-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3504be81c0bb2c3e15294d6455bef206ac9fe70e1d3d2173f9152ac82f2547f0
MD5 b23e5acaaddf4961a1de5774d74c31bd
BLAKE2b-256 264a6e75f528094c81e6d68d69e109ffdc150a0647c6727162be611faaef579d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page