Skip to main content

Teltonika Codec 8 / 8 Extended decoder + TelematicsProvider implementation — the first vendor package in the mgf-tele-* family, built on mgf-tele-core. Sibling of mgf-common under the mgf.* namespace.

Project description

mgf-tele-teltonika

Teltonika Codec 8 / 8 Extended decoder + a TelematicsProvider implementation for FMB/FMC/FMM devices. The first vendor package in the mgf-tele-* family — it builds on mgf-tele-core (the vendor-neutral seam) and never the other way around.

Extracted from PlasmaMapper's ingest path.

Install

pip install mgf-tele-teltonika

Use

from mgf.tele.teltonika import TeltonikaProvider, decode_avl_packet

# Decoder (pure: bytes -> mgf.tele.core.DecodedAvlRecord[]):
records = decode_avl_packet(wire_bytes)

# Provider (the mgf.tele.core.TelematicsProvider seam) in an ingest loop:
provider = TeltonikaProvider(imei_authoriser=my_registry_lookup)
handle = await provider.open_session(reader, writer)   # IMEI handshake
packet = await provider.receive_packet(handle)         # ReceivedPacket

What's in it

Name What
decode_avl_packet / decode_codec8 / decode_codec8e pure decoders → mgf.tele.core.DecodedAvlRecord; unsupported codecs raise mgf.tele.core.UnsupportedCodecError
TeltonikaProvider / TeltonikaSessionHandle the TelematicsProvider concrete (TCP handshake → receive → ack → close)
mgf.tele.teltonika._crc.crc16_ibm the CRC-16/IBM primitive
mgf.tele.teltonika._packets wire-packet encoders (round-trip testing)

Codec 12 RX (command responses), 13/14/15, and 16 are not yet implemented and raise UnsupportedCodecError.

Design

  • The decoder is a pure function (bytes → records); the provider owns the session lifecycle (the mgf-tele-core two-layer shape).
  • Every malformed-frame / CRC / unsupported-codec / handshake / unknown- tracker / peer-close condition is a typed mgf.tele.core.TelematicsError subclass (rule EH-02).
  • A 64 KiB frame cap (SH-04) bounds the unauthenticated ingest socket against a hostile data_field_length.

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

mgf_tele_teltonika-0.1.3.tar.gz (113.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mgf_tele_teltonika-0.1.3-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file mgf_tele_teltonika-0.1.3.tar.gz.

File metadata

  • Download URL: mgf_tele_teltonika-0.1.3.tar.gz
  • Upload date:
  • Size: 113.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for mgf_tele_teltonika-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c43a1ef0ca364b884116883853a55421de3e7acdb58a9f37ba87d3f253dab275
MD5 2d79ecef3d5f8aefa4bd611f122f6e48
BLAKE2b-256 5c8cc083d9fa1192762919c70321a5888ca8a2ce67ee6fefb5bb9584c469ce40

See more details on using hashes here.

File details

Details for the file mgf_tele_teltonika-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mgf_tele_teltonika-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d4dee04ecec5a1270c3e1c77b4f51847da58ac303222a89da2cd5c62bdc70baa
MD5 54c21b7713b89bcf86c2fc1c71096a9f
BLAKE2b-256 119c439d56caebe97c4bf0c4b3a5ac0ed8c9be71323705669327e6c420ac72ae

See more details on using hashes here.

Supported by

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