NewLife.JT808 1.1.2026.1022-beta0133

This is a prerelease version of NewLife.JT808.
dotnet add package NewLife.JT808 --version 1.1.2026.1022-beta0133
                    
NuGet\Install-Package NewLife.JT808 -Version 1.1.2026.1022-beta0133
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NewLife.JT808" Version="1.1.2026.1022-beta0133" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NewLife.JT808" Version="1.1.2026.1022-beta0133" />
                    
Directory.Packages.props
<PackageReference Include="NewLife.JT808" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NewLife.JT808 --version 1.1.2026.1022-beta0133
                    
#r "nuget: NewLife.JT808, 1.1.2026.1022-beta0133"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NewLife.JT808@1.1.2026.1022-beta0133
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NewLife.JT808&version=1.1.2026.1022-beta0133&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=NewLife.JT808&version=1.1.2026.1022-beta0133&prerelease
                    
Install as a Cake Tool

NewLife.JT808 - JT/T 808 Vehicle Tracking Protocol

GitHub License NuGet Downloads NuGet NuGet prerelease

test

AOT smoke TFM locales

platform contributors

🌐 简体中文 | 繁體中文 | Español | Deutsch | 日本語 | Français | Português | Русский | 한국어 | العربية

A complete implementation of the JT/T 808 vehicle tracking protocol, covering the 2011/2013/2019 versions with 70+ standard message bodies, the SuBiao (Jiangsu) and YueBiao (Guangdong) active-safety extensions, JT/T 1078 audio/video messages, the JT/T 19056 driving-recorder protocol, and message-queue integration.

Source: https://github.com/NewLifeX/NewLife.JT808
NuGet: NewLife.JT808
Docs: Requirements / Architecture / Feature list / User guide / Localization

Key features

  • Complete protocol: JT/T 808-2011/2013/2019 frame parsing with 0x7E delimiters, 0x7D escaping, XOR checksum and sub-packet reassembly
  • Rich message bodies: 70+ standard message bodies (0x0001~0x8A00) covering both terminal uplink and platform downlink
  • Three-version compatibility: automatic field adaptation through the Version field plus [JT2011]/[JT2019] attributes
  • Dual serialization modes: attribute-driven reflection for simple bodies, IAccessor for complex bodies that need manual control
  • TLV/KLV parsing: built-in Type-Length-Value and Kind-Length-Value codecs with strongly-typed dictionary conversion
  • Networking layer: TCP sticky-packet codec JTCodec and JT808Client with automatic handler routing
  • SuBiao extension: ADAS/DSM/TPMS/BSD active-safety alarms, peripheral status and attachment protocol
  • YueBiao extension: Guangdong active-safety standard with dedicated alarm reporting (0x1FC4), USB pass-through, position extensions and vendor parameters
  • JT/T 1078 basics: audio/video message body models and enums
  • Driving recorder: JT/T 19056 uplink and downlink packet codec
  • BCD encoding: custom serialization attributes for BCD strings and timestamps
  • GBK encoding: built-in GBK string codec with automatic CodePagesEncodingProvider registration
  • Web API management: unified command delivery, online session management, blacklist and token authentication
  • Message queue abstraction: IMessageBus creates producers/consumers, session events and downlink handlers; RedisMessageBus is the built-in internal transport and RocketMQ/Kafka adapters in JT808.Server plug in through the JT808:Messaging config switch
  • Cluster command delivery: ClusterState shares online sessions, node heartbeats and the blacklist through Redis, routes commands to the node that owns the terminal, and keeps ICommandBus as an extension point for custom transports
  • Client hardening: automatic reconnection, configurable heartbeat and send/receive counters
  • Multi-framework support: net45 / net461 / netstandard2.0 / netstandard2.1 / net8.0
  • AOT friendly: NativeAOT smoke project covering codec, factory and serialization paths
  • Localization: 11 runtime languages out of the box, English source text as fallback, AOT-safe tables
  • RocketMQ integration: producer/consumer adapter in the JT808.Server project (not shipped in the NuGet package), supporting Alibaba Cloud, Huawei Cloud, Tencent Cloud and ACL authentication
  • Kafka integration: producer/consumer adapter in the JT808.Server project (not shipped in the NuGet package), based on Confluent.Kafka with consumer groups and ACK support

Supported protocol versions

Version Flag Description
JT/T 808-2011 Version=0 Early version with a few different message layouts
JT/T 808-2013 Version=0 The most widely deployed version
JT/T 808-2019 Version=1 Latest version with new fields and message types

Message matrix

# Message ID Name Direction Done
1 0x0001 Terminal general response Uplink ✅
2 0x8001 Platform general response Downlink ✅
3 0x0002 Terminal heartbeat Uplink ✅
4 0x8003 Retransmit sub-packet request Downlink ✅
5 0x0004 Query server time request Uplink ✅
6 0x0100 Terminal registration Uplink ✅
7 0x8100 Terminal registration response Downlink ✅
8 0x0003 Terminal deregistration Uplink ✅
9 0x0102 Terminal authentication Uplink ✅
10 0x8103 Set terminal parameters Downlink ✅
11 0x8104 Query terminal parameters Downlink ✅
12 0x0104 Query terminal parameters response Uplink ✅
13 0x8105 Terminal control Downlink ✅
14 0x8106 Query specified terminal parameters Downlink ✅
15 0x8107 Query terminal attributes Downlink ✅
16 0x0107 Query terminal attributes response Uplink ✅
17 0x8108 Deliver terminal upgrade package Downlink ✅
18 0x0108 Terminal upgrade result notification Uplink ✅
19 0x0200 Position report Uplink ✅
20 0x8201 Position query Downlink ✅
21 0x0201 Position query response Uplink ✅
22 0x8202 Temporary position tracking control Downlink ✅
23 0x8203 Manually confirm alarm Downlink ✅
24 0x8300 Deliver text message Downlink ✅
25 0x8301 Event setup Downlink ✅
26 0x0301 Event report Uplink ✅
27 0x8302 Deliver question Downlink ✅
28 0x0302 Question response Uplink ✅
29 0x8303 Information on-demand menu setup Downlink ✅
30 0x0303 Information on-demand / cancel Uplink ✅
31 0x8304 Information service Downlink ✅
32 0x8400 Phone callback Downlink ✅
33 0x8401 Set phone book Downlink ✅
34 0x8500 Vehicle control Downlink ✅
35 0x0500 Vehicle control response Uplink ✅
36 0x8600 Set circular area Downlink ✅
37 0x8601 Delete circular area Downlink ✅
38 0x8602 Set rectangular area Downlink ✅
39 0x8603 Delete rectangular area Downlink ✅
40 0x8604 Set polygonal area Downlink ✅
41 0x8605 Delete polygonal area Downlink ✅
42 0x8606 Set route Downlink ✅
43 0x8607 Delete route Downlink ✅
44 0x8608 Query area or route data Downlink ✅
45 0x0608 Query area or route data response Uplink ✅
46 0x8700 Driving recorder data collection command Downlink ✅
47 0x0700 Driving recorder data upload Uplink ✅
48 0x8701 Driving recorder parameter delivery command Downlink ✅
49 0x0701 Electronic waybill report Uplink ✅
50 0x8702 Report driver identity request Downlink ✅
51 0x0702 Driver identity information report Uplink ✅
52 0x0704 Batch position data upload Uplink ✅
53 0x0705 CAN bus data upload Uplink ✅
54 0x0800 Multimedia event report Uplink ✅
55 0x0801 Multimedia data upload Uplink ✅
56 0x8800 Multimedia data upload response Downlink ✅
57 0x8801 Camera immediate capture command Downlink ✅
58 0x0805 Camera immediate capture response Uplink ✅
59 0x8802 Stored multimedia data search Downlink ✅
60 0x0802 Stored multimedia data search response Uplink ✅
61 0x8803 Stored multimedia data upload Downlink ✅
62 0x8804 Start recording command Downlink ✅
63 0x8805 Single stored multimedia data retrieval upload Downlink ✅
64 0x8900 Downstream pass-through Downlink ✅
65 0x0900 Upstream pass-through Uplink ✅
66 0x0901 Compressed data report Uplink ✅
67 0x8A00 Platform RSA public key Downlink ✅
68 0x0005 Terminal retransmit sub-packet request Uplink ✅
69 0x8204 Link detection Downlink ✅
70 0x6006 Text message delivery response Uplink ✅
71 0x1080 Custom message — ✅

Quick start

Install the NuGet package

dotnet add package NewLife.JT808
using NewLife.JT808.Protocols;
using NewLife.JT808.Models;

// Scan the assembly and register every message type
var factory = MessageFactory.Instance;
factory.Init();

// Raw bytes reported by the terminal
var raw = new Byte[] { 0x7E, 0x02, 0x00, /* ... */, 0x7E };

// Decode the JTMessage frame
var jtMessage = new JTMessage();
var stream = new MemoryStream(raw);
jtMessage.Read(stream, null);

// Materialize the strongly-typed body by message ID
var body = factory.Parse(jtMessage);
if (body is T0200 position)
{
    Console.WriteLine($"Latitude={position.Latitude / 1_000_000.0}");
    Console.WriteLine($"Longitude={position.Longitude / 1_000_000.0}");
    Console.WriteLine($"Speed={position.Speed} km/h");
}
// Build a platform general response
var t8001 = new T8001
{
    Sequence = jtMessage.Sequence,
    Kind = jtMessage.Kind,
    Result = ResultKinds.Success
};

// Serialize the body
var ms = new MemoryStream();
var writer = Helper.CreateWriter(ms, jtMessage);
writer.TryWrite(null, ref t8001);

// Wrap it in a JTMessage frame
var reply = new JTMessage
{
    Kind = MessageKinds.平台通用应答,
    Mobile = jtMessage.Mobile,
    Sequence = (UInt16)(jtMessage.Sequence + 1),
    Payload = new ArrayPacket(ms.ToArray()),
    Reply = false
};

// Emit the complete frame
var outMs = new MemoryStream();
reply.Write(outMs, null);
var frameBytes = outMs.ToArray();

Manually serialize a complex body (IAccessor)

[MessageKind(MessageKinds.位置信息汇报)]
public class T0200 : IAccessor
{
    public PositionAlarms Alarm { get; set; }
    public PositionStatus Status { get; set; }
    public Int32 Latitude { get; set; }
    public Int32 Longitude { get; set; }

    public Boolean Read(Stream stream, Object context)
    {
        var reader = context as Binary ?? Helper.CreateReader(stream);
        Alarm = (PositionAlarms)reader.ReadUInt32();
        Status = (PositionStatus)reader.ReadUInt32();
        Latitude = reader.ReadInt32();
        Longitude = reader.ReadInt32();
        // ... remaining fields
        return true;
    }

    public Boolean Write(Stream stream, Object context)
    {
        var writer = context as Binary ?? Helper.CreateWriter(stream);
        writer.Write((UInt32)Alarm);
        writer.Write((UInt32)Status);
        writer.Write(Latitude);
        writer.Write(Longitude);
        // ... remaining fields
        return true;
    }
}

Localization

The library ships 11 runtime languages (Simplified/Traditional Chinese, English, Spanish, German, Japanese, French, Portuguese, Russian, Korean and Arabic). Messages are keyed by the English source text and fall back to it when a translation is missing.

using System.Globalization;
using NewLife;

// Follow the process UI culture by default; pin it explicitly if needed
Localization.Culture = CultureInfo.GetCultureInfo("ja");

// ASP.NET Core hosts can resolve the request language from Accept-Language
using var scope = RequestCultureScope.Create(Request.Headers.AcceptLanguage);

NativeAOT

MessageFactory.Init() discovers message bodies by scanning the protocol assembly. NativeAOT or trimmed apps must keep that assembly:

<ItemGroup>
  <TrimmerRootAssembly Include="NewLife.JT808" />
</ItemGroup>

The AotSmoke project in this repository publishes with NativeAOT and runs 16 scenarios on Windows/Linux (x64 and arm64).

Ecosystem Map

NewLife is a layered ecosystem of independently versioned open-source projects. The map below is shared verbatim by every NewLife repository; each project links to its repository and its primary NuGet package.

Project What it does Downloads
Foundation
NewLife.Core Logging, configuration, caching, networking, serialization, scheduling and APM tracing. NuGet
NewLife.XCode Data middleware: single tables at the tens-of-billions scale, automatic sharding, read-write splitting, 10+ databases. NuGet
NewLife.Net High-performance network library: 1.77M pps / 14.5 Gbps on a single machine (TCP 1KB, 2026-10), 4M long-lived TCP connections. NuGet
NewLife.Remoting Protocol communication and RPC framework for client/server applications and IoT devices. NuGet
NewLife.Agent Installs .NET applications as OS daemons: Windows services and Linux systemd. NuGet
NewLife.Templates dotnet new project templates for console, web, API, service, data and IoT projects. NuGet
Data & Messaging
NewLife.Redis Redis client with microsecond latency, millions of ops/s and built-in message queues. NuGet
NewLife.RocketMQ Pure managed RocketMQ client for Apache RocketMQ and Alibaba Cloud Message Queue. NuGet
NewLife.MQTT MQTT client and server, including Alibaba Cloud IoT connectivity. NuGet
NewLife.NovaDb Hybrid database in C#: embedded or networked, relational, time-series, message queue and KV in one. NuGet
NewLife.MySql MySql driver and helper layer built on the NewLife data stack. NuGet
Web, AI & Distributed
NewLife.Cube Rapid admin-platform framework: permissions, SSO, OAuth server and CRUD scaffolding. NuGet
Stardust Distributed service platform: node management, APM, configuration center, registry and release center. NuGet
AntJob Distributed task and real-time data scheduling platform with sharding, retries and backfill. NuGet
NewLife.AI Unified client for 46 LLM providers plus ChatAI, a ready-to-run web chat application. NuGet
Industrial & IoT
NewLife.IoT IoT standard library defining protocol contracts and device abstractions. NuGet
NewLife.Modbus Modbus TCP/RTU/ASCII implementation on top of NewLife.IoT. NuGet
NewLife.Siemens Siemens PLC protocol on top of NewLife.IoT. NuGet
NewLife.Omron Omron PLC protocol on top of NewLife.IoT. NuGet
NewLife.Melsec Mitsubishi Melsec PLC protocol on top of NewLife.IoT. NuGet
NewLife.OPC OPC client for industrial data access. —
NewLife.BACnet BACnet building-automation protocol stack. NuGet
ZeroIoT Lightweight open-source IoT platform with gateway and device management. —
Vehicle Telematics
NewLife.JT808 JT/T 808 vehicle positioning protocol: 70+ message bodies, 2011/2013/2019. NuGet
NewLife.JT809 JT/T 809 platform-to-platform protocol for transport authorities. NuGet
NewLife.JT1078 JT/T 1078 in-vehicle video: RTP parsing, FLV/fMP4 remuxing and live streaming. NuGet
Domain Components
NewLife.Office One package for Excel, Word, PPT, PDF and 15+ document formats. NuGet
NewLife.Audio Cross-platform audio: codecs, device I/O, DSP, containers and streaming. NuGet
NewLife.Video Video codecs, container formats, frame processing and streaming. NuGet
NewLife.Map Unified interface over Baidu, AMap, Tencent and Tianditu with geocoding and coordinate conversion. NuGet
NewLife.IP IPv4 geolocation with an offline memory-mapped database and an online API fallback. NuGet
Tools & Products
CrazyCoder Developer toolbox: network, serial port, crypto, regex, Modbus and MQTT. NuGet
GitCandy Self-hosted Git source code management system. —
LuckyClover Installs the matching .NET runtime automatically when launched from an older host. —

Badges show the primary package of each project; theme, extension and satellite packages are listed on their NuGet pages. The 30+ packages not listed here (FTP, LoRa, Office extensions, protocol drivers and more) are available under the NewLifeX organization and on newlifex.com.

Team

<img src="https://newlifex.com/logo.png" width="48" align="right" alt="NewLife" />

Founded in 2002, the NewLife team has spent more than two decades on the .NET and IoT ecosystem, maintains nearly 100 open-source projects (34 of them core to this map), and delivers integrated software and hardware solutions for power, logistics, healthcare, industrial control and internet industries. We live by the motto "learning has no seniority — mastery earns respect".

Open-source components have been downloaded 6.48M times from NuGet (ecosystem-wide, as of 2026-10).

Website: https://newlifex.com · Open source organization: https://github.com/NewLifeX

<details> <summary>WeChat Official Account: 智能大石头 (scan to follow)</summary>

智能大石头

</details>

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2026.1022-beta0133 31 10/22/2026
1.1.2026.1020-beta0743 47 10/20/2026
1.1.2026.1020-beta0659 38 10/20/2026

新增 Web API 管理接口(统一下发指令/会话管理/黑名单/Token 鉴权);新增消息队列抽象接口与默认内存实现;新增跨服务器指令下发(Stardust 事件总线);新增客户端自动重连与心跳管理;重组协议类结构(提取 Interfaces/Attributes/Enums 子目录);39/39 测试全部通过