All Products
Search
Document Center

IoT Platform:JT/T 808 gateways

Last Updated:Aug 29, 2023

JT/T 808 gateways use the JT/T 808-2019 protocol and connect devices to IoT Platform over the Transmission Control Protocol (TCP) or Transport Layer Security (TLS) protocol. We recommend that you use TLS because the TCP-based connection is less secure. When you connect devices to IoT Platform over TLS, you can enable server-side one-way verification, Online Certificate Status Protocol (OCSP) for devices, two-way secure connections between devices and servers, and other features. This topic describes the features of JT/T 808 gateways that are supported by IoT Platform.

Regions and instance type

You can use JT/T 808 gateways to connect devices to IoT Platform only if you use Exclusive Enterprise Edition instances in the China (Shanghai) region.

Features

Gateway features

Feature

Description

Custom port numbers

The default port number in the URL of JT/T 808 gateways is 7999. You can change the port number. Valid values: 1024 to 65535.

One-party verification

The device registration, verification, and deregistration services are provided by Alibaba Cloud IoT Platform.

You must create a gateway that uses one-party verification, and then add multiple devices to the gateway. After the devices are registered and verified on IoT Platform by using the standard JT/T 808 protocol, the devices are connected to IoT Platform.

Third-party verification

Developers determine the device registration, verification, and deregistration services. A developer can authorize IoT Platform to call the functions in Function Compute. When the developer creates a gateway, the developer must select the Function Compute function that provides device registration, verification, and deregistration services.

You must create a Function Compute service and function to perform device registration, verification, and deregistration, create a gateway that uses third-party verification, and then authorize IoT Platform to call the Function Compute service and function. This way, IoT Platform can use the device registration and verification services provided by Function Compute to automatically create and connect to a device in the IoT Platform console.

Transmission protocol

JT/T 808 gateways can connect devices to IoT Platform over TCP or TLS.

If you use TCP to connect a device to IoT Platform, we recommend that you do not connect the device over the Internet. To ensure security, we recommend that you establish a connection over a leased line.

X.509-based device verification

Gateways provide server-side one-way verification and two-way verification between devices and servers to verify device identities.

OCSP

Gateways allow you to enable OCSP for device certificates and server certificates.

Device connection and communication over JT/T 808

Messages between devices and IoT Platform that communicate over the JT/T 808 protocol must meet the data format requirements of the protocol.

By default, the timeout period for a connection between a device and IoT Platform is 180s. If no data is submitted or no heartbeats are detected in 180s, the device is disconnected from IoT Platform.

IoT Platform supports the JT/T 808-2019 protocol. The following table describes the supported messages and message IDs. For more information, see JT/T 808-2019.

Message

Message ID

Terminal universal reply

0x0001

Platform Universal response

0x8001

Terminal heart

0x0002

Terminal registration

0x0100

Terminal registration reply

0x8100

Terminal logout

0x0003

Terminal authentication

0x0102

Data is transmitted through downlink

0x8900

Data is transparently transmitted upstream

0x0900

Location information reporting

0x0200

Upload location data in batches

0x0704

Preparations for device connection and communication

One-party verification

  1. Create a JT/T 808 gateway: When you create a gateway, set the Authentication Type parameter to One-party Verification and configure other parameters based on your business scenario.

  2. Add devices to a JT/T 808 gateway product: Import information about multiple devices, including the values of the Manufacturer ID, Terminal Model, and Terminal ID parameters to add the devices to the gateway.

    IoT Platform concatenates the values of the Manufacturer ID, Terminal Model, and Terminal ID parameters. The concatenated result is the device name in the IoT Platform console. The name uses the following format: ${Manufacturer ID}_${Terminal Model}_${Terminal ID}.

  3. Specify the endpoint of the JT/T 808 gateway for the device to connect the device to IoT Platform. You can perform the following operations based on your business requirements:

    • If an endpoint is specified for a device, you must configure a CNAME record to change the endpoint to the gateway URL. For information about how to resolve domain names, see Alibaba Cloud DNS.

    • If no endpoint is specified for a device, you must specify the gateway URL as the endpoint of the device.

  4. Optional. Configure the rules engine to subscribe to or forward messages about device registration, deregistration, and data submission to your server.

Third-party verification

  1. Create a Function Compute service and create a Function Compute function: The service and function are used to perform third-party verification on the device.

    The request that you want to send to implement the verification function and the response parameters must comply with the definition of the function. You can specify a custom name for the function. For more information about the request parameters and response parameters for device registration, device verification, and device deregistration in the device verification function, see Create an MQTT gateway.

  2. Create a JT/T 808 gateway: When you create a gateway, set the Authentication Type parameter to Third-party Certification, set the Device-verified FC Service parameter to an existing service, set the Device-verified FC Function parameter to an existing function, and then configure other parameters based on your business scenario.

  3. Connect the device to IoT Platform. After the gateway is created and the first time the device attempts to connect to IoT Platform, IoT Platform automatically creates the device in the IoT Platform console and then performs device verification and connection. IoT Platform concatenates the values of the manufacturer, deviceModel, and deviceId request parameters that you specified when you registered the device in the Function Compute verification function. The concatenated result is the device name in the IoT Platform console. The name uses the following format: ${manufacturer}_${deviceModel}_${deviceId}.

  4. Optional. Configure the rules engine to subscribe to or forward messages about device registration, deregistration, and data submission to your server.

Processes of device connection and communication

The following figures show the processes of using a gateway to connect a device to IoT Platform and enable communication between the device and IoT Platform. For more information about the communication between the server and the device, see the "Messaging" section of this topic.

One-party verification

一方认证接流程

Third-party verification

三方认证接入

Messaging

Gateways allow IoT Platform to communicate with devices based on the JT/T 808-2019 protocol. For more information, see the "Device connection and communication over JT/T 808" section in this topic.

Upstream communication: devices to IoT Platform

You can use the data forwarding feature of the rules engine in IoT Platform to forward messages about device registration, deregistration, and data submission to your server. You can use the Advanced Message Queuing Protocol (AMQP) server-side subscription feature of the rules engine in IoT Platform to send device data to IoT Platform.

For more information, see Messaging.

Downstream communication: IoT Platform to devices

The server can call the RRpc operation to send a message to the specified device and return a response at the same time.