GB/T 32960 gateways run based on the GB/T 32960 protocol that specifies the technical specifications of remote services and management systems for electric vehicles. You can connect GB/T 32960 vehicle-mounted devices to IoT Platform over TCP or Transport Layer Security (TLS). We recommend that you do not use TCP because TCP does not provide strong security. If 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 GB/T 32960 gateways that are supported by IoT Platform.
Regions and instances
You can connect GB/T 32960 gateway vehicle-mounted devices to IoT Platform only by using Exclusive Enterprise Edition instances that reside in the China (Shanghai) region.
Features
Gateway features
Feature | Description |
Custom port numbers | The default port number of a GB/T 32960 gateway is 8999. You can specify a custom port number that ranges from 1024 to 65535. |
One-party verification | Device registration and device 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 product at a time. After the devices are registered and verified on IoT Platform by using the standard GB/T 32960 protocol, the devices are connected to IoT Platform. |
Third-party verification | The device registration and deregistration services are managed by developers. A developer can authorize IoT Platform to call the functions in Function Compute. When a developer creates a gateway, the developer must select the Function Compute function that provides device registration and deregistration services. You must create a Function Compute service and function to perform device registration 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 protocols | TCP and TLS are supported. 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. OCSP is an Internet protocol that is used by a certificate authority (CA) to check the revocation status of a certificate. |
Device connection and communication over GB/T 32960
If you connect devices to IoT Platform over GB/T 32960 and enable messaging, messages between the devices and IoT Platform must meet the data format requirements of GB/T 32960.
By default, the timeout period for a connection between a device and IoT Platform is 180 seconds. If no data is submitted or no heartbeats are detected in 180 seconds, the device is disconnected from IoT Platform.
IoT Platform supports GB/T 32960-2016. The following list describes GB/T 32960 features that are supported:
Vehicle registration
Vehicle deregistration
Heartbeats
Real-time data report
Supplement data report
Parameter queries
Parameter configuration
On-board terminal control
For more information about GB/T 32960, see GB/T 32960-2016 Part 1: General rules, GB/T 32960-2016 Part 2: On-board terminal, and GB/T 32960-2016 Part 3: Communication protocol and data format.
Preparations for device connection and communication
One-party verification
Create a GB/T 32960 gateway: When you create a gateway, set the Authentication Type parameter to One-party Verification and configure other parameters based on your business scenario.
Create a GB/T 32960 gateway device: Import information about multiple devices, including the value of the VIN parameter, to add the devices to the gateway product.
After the information is imported, IoT Platform creates the devices. The value of the VIN parameter is used as the DeviceNames of the devices.
Specify the endpoint of the GB/T 32960 gateway for a device to connect the device to IoT Platform. Then, perform one of the following operations based on your business scenario:
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.
Optional. Configure a data forwarding rule to subscribe to or forward device logon, device deregistration, and device data submission messages to a user-managed server.
Third-party verification
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 and response parameters for registration, verification, and deregistration in the function, see Create a GB/T 32960 gateway.
Create a GB/T 32960 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.
Connect the device to IoT Platform. After the gateway is created, the first time the device attempts to connect to IoT Platform, IoT Platform automatically creates the device in the console and then performs device verification and connection. IoT Platform uses the value of the VIN parameter that you configured when you registered the device in the Function Compute verification function as the DeviceName of the device.
Optional. Configure a data forwarding rule to subscribe to or forward device logon, device deregistration, and device data submission messages to a user-managed 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
Messaging can be implemented between IoT Platform and gateway devices over GB/T 32960. For more information, see GB/T 32960-2016 Part 3: Communication protocol and data format.
Upstream communication: devices to IoT Platform
You can forward the messages of devices to a user-managed server by using the data forwarding feature. The messages include device logon messages, device deregistration messages, and device data submission messages. You can use the Advanced Message Queuing Protocol (AMQP) server-side subscription feature of IoT Platform to send device data to IoT Platform.
For more information, see Messaging.
Downstream communication: IoT Platform to devices
IoT Platform can call the AsyncRRpc operation to send messages to a specified device.