### JT/T808 Message: Terminal Authentication (0x0102) Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt This snippet contains two raw hexadecimal examples of the JT/T808 Terminal Authentication message (0x0102). After registration, terminals send this message with an authentication code to verify their identity with the platform. ```Hexadecimal 7e0102000b0123456789017fff6162634031323326343536017e ``` ```Hexadecimal 7e010240500100000000017299841738ffff2c706d59477a47756b4f384b345a356c70494f54673864716233657072596148426258504c7464627947383d313233343536373839303132333435332e372e31350000000000000000000000000000347e ``` -------------------------------- ### JT/T808 Message: Terminal Registration (0x0100) Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt Two raw hexadecimal examples of the JT/T808 Terminal Registration message (0x0100). Terminals send this message to register with the platform, providing information such as manufacturer ID, terminal model, and terminal ID. ```Hexadecimal 7e0100002e1234567890127fff001f0073797a6800007777772e6a74743830382e636e000000000000003736353433323101b2e241383838383838227e ``` ```Hexadecimal 7e010040550112345678901234567890ffff001f0073797a6800000000000000007777772e6a74743830382e636e000000000000000000000000000000000030393837363534333231303938373635343332310000000000000000000001b2e241383838383838227e ``` -------------------------------- ### JT/T808 Message: Terminal General Response (0x0001) Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt This snippet provides two examples of the JT/T808 Terminal General Response message (0x0001) in raw hexadecimal format. This message is typically sent by a terminal to acknowledge receipt and processing of a server command. ```Hexadecimal 7e000100050123456789017fff007b01c803bd7e ``` ```Hexadecimal 7e000140050100000000017299841738ffff007b01c803b57e ``` -------------------------------- ### JT/T808 Message: Set Terminal Parameters (0x0104) Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt Two raw hexadecimal examples of the JT/T808 Set Terminal Parameters message (0x0104). This message is sent by the platform to configure various operational parameters on the terminal, such as communication settings or reporting intervals. ```Hexadecimal 7e010401ff0123456789017fff00682600000001044945425200000002047068555400000 ``` -------------------------------- ### JT/T 808 Terminal Control Hexadecimal Examples Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt These hexadecimal strings illustrate JT/T 808 terminal control messages, which are used by the server to send commands to a vehicle terminal. They showcase different command structures within the protocol. ```Hexadecimal 7e8a0000840123456789017fff000003e70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e27e ``` ```Hexadecimal 7e8a0040840100000000017299841738ffff000003e70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ea7e ``` -------------------------------- ### JT/T 808 Location Information Report and General Response Hexadecimal Examples Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt These hexadecimal strings represent common JT/T 808 protocol messages, including location information reports from a terminal and general responses. They demonstrate the structure of raw data packets exchanged between a vehicle terminal and a server. ```Hexadecimal 7e020100240123456789017fff686200002a5a000074280000a3e50000db4fbc732711012c200512121259010400313233547e ``` ```Hexadecimal 7e020140240100000000017299841738ffff686200002a5a000074280000a3e50000db4fbc732711012c2005121212590104003132335c7e ``` -------------------------------- ### JT/T 808 Text Information Hexadecimal Examples Source: https://github.com/yezhihao/jt808-server/blob/master/jtt808-protocol/src/test/resources/JT808.txt These hexadecimal strings demonstrate JT/T 808 text information messages, typically used for sending short text commands or notifications to a terminal. They highlight the encoding of textual data within the protocol. ```Hexadecimal 7e0900000f0123456789017fff006173647a786371776531323333354c7e ``` ```Hexadecimal 7e0900400f0100000000017299841738ffff006173647a78637177653132333335447e ``` -------------------------------- ### APIDOC: Issuing Commands to JT808 Terminals via OpenAPI Source: https://github.com/yezhihao/jt808-server/blob/master/README.md This section describes how to use the integrated OpenAPI documentation (Knife4j UI and Swagger UI) to issue commands to JT808 terminals. Users can access the UI, input required parameters for commands, and send them to the terminals. The system also provides a device message monitoring page for real-time observation of messages. ```APIDOC OpenAPI Documentation UIs: Knife4j UI: http://127.0.0.1:8000/doc.html Swagger UI: http://127.0.0.1:8000/swagger-ui/index.html Usage: 1. Access one of the provided UI links. 2. Locate the desired command/API endpoint. 3. Input the required parameters in the UI form. 4. Click 'Send' to dispatch the command to the terminal. Monitoring: Device Message Monitoring: http://127.0.0.1:8000/ws.html Purpose: Real-time observation of device messages and command responses. ``` -------------------------------- ### Java: Defining JT808 Message Structure (T0100 Terminal Registration) Source: https://github.com/yezhihao/jt808-server/blob/master/README.md This Java code snippet illustrates how to define a JT808 message, specifically the `T0100` (Terminal Registration) message, using custom annotations (`@Message`, `@Field`). This annotation-driven approach simplifies the process of describing protocol fields, their types, lengths, and descriptions, which is then used for automatic encoding and decoding of messages. ```Java package org.yzh.protocol.t808; @Message(JT808.终端注册) public class T0100 extends JTMessage { @Field(desc = "省域ID") private short provinceId; @Field(desc = "市县域ID") private short cityId; @Field(length = 11, desc = "制造商ID") private String makerId; @Field(length = 30, desc = "终端型号") private String deviceModel; @Field(length = 30, desc = "终端ID") private String deviceId; @Field(desc = "车牌颜色:0.未上车牌 1.蓝色 2.黄色 3.黑色 4.白色 9.其他") private byte plateColor; @Field(desc = "车辆标识") private String plateNo; } ``` -------------------------------- ### Java: Analyzing JT808 Messages with Elucidator Tool Source: https://github.com/yezhihao/jt808-server/blob/master/README.md This Java code demonstrates how to use the `org.yzh.Elucidator` utility to analyze JT808 protocol messages. It shows the process of decoding a hexadecimal message string into a structured `JTMessage` object and re-encoding it, which is useful for inspecting message attributes and debugging parsing issues. The tool helps in understanding the position and converted values of each attribute within the message. ```Java package org.yzh; public class Elucidator extends JT808Beans { public static final JTMessageAdapter coder = new JTMessageAdapter("org.yzh.protocol"); public static void main(String[] args) { String hex = "020000d40123456789017fff000004000000080006eeb6ad02633df7013800030063200707192359642f000000400101020a0a02010a1e00640001b2070003640e200707192359000100000061646173200827111111010101652f000000410202020a0000000a1e00c8000516150006c81c20070719235900020000000064736d200827111111020202662900000042031e012c00087a23000a2c2a200707192359000300000074706d732008271111110303030067290000004304041e0190000bde31000d90382007071923590004000000006273642008271111110404049d"; JTMessage msg = H2019(T0200JSATL12()); msg = decode(hex); hex = encode(msg); } } ``` -------------------------------- ### Simulating JT808 Device Requests with Hexadecimal Data Source: https://github.com/yezhihao/jt808-server/blob/master/README.md This section provides the hexadecimal message string used to simulate a JT808 device request. It's intended to be sent via a packet tool (e.g., '发包工具.exe') to the server at '127.0.0.1:7100' using TCP Client mode with HEX settings for both sending and receiving. This allows for testing the server's message processing capabilities. ```Hexadecimal 7e0100002e0123456789017fff001f00730000000034000000000000000000000042534a2d47462d30367465737431323301b2e241383838383838157e ``` -------------------------------- ### Java: Processing JT808 Terminal Registration (0x0100) Messages Source: https://github.com/yezhihao/jt808-server/blob/master/README.md This Java code snippet demonstrates how to handle incoming JT808 messages within a Spring-based application. The `JT808Endpoint` class, marked with `@Endpoint`, processes the `0x0100` (Terminal Registration) message. It uses `@Mapping` to associate the method with the message type, registers the device via `DeviceService`, and returns a `T8100` response indicating success or failure, along with a session token. ```Java package org.yzh.web.endpoint; @Endpoint public class JT808Endpoint { @Autowired private DeviceService deviceService; @Mapping(types = 0x0100, desc = "终端注册") public T8100 register(T0100 message, Session session) { T8100 result = new T8100(); result.setResponseSerialNo(message.getSerialNo()); DeviceInfo device = deviceService.register(message); if (device != null) { session.register(message); result.setToken("1234567890A"); result.setResultCode(T8100.Success); } else { result.setResultCode(T8100.NotFoundTerminal); } return result; } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.