Active tag communication protocol

(i) Overview of the agreement

The reader is responsible for receiving the message of the nearby positioning electronic tag and reporting it to the computer client (the customer's own platform software) in time. The client receives the label information reported by each reader, and calculates the actual position of the label according to the distance of the electronic label from each antenna.

After the client registers on the network reader device, the reader will actively report the received tag information to the client, during which the client needs to send heartbeat commands to the reader at regular intervals to keep the registration valid. Specifically, the client needs to send a registration request (CMD_LOGIN_REQ) to the card reader first, and the card reader back to the registration answer (CMD_LOGIN_ACK) for confirmation. After the registration is completed, the client needs to send a heartbeat command to the card reader at regular intervals (10 seconds is recommended), and the card reader confirms the heartbeat back, and if the card reader does not receive the heartbeat message for more than 1 minute, it is considered that the registration is invalid. During the registration validity period, any tag information read by the reader will be instantly reported to the relevant client.

(ii) Description of the agreement

1Network protocols

The UDP protocol from the TCP/IP protocol cluster is used as the base protocol for providing the service.

The UDP protocol server port number is tentatively 4099.

2Network Transmission Sequence

For double-byte, quadruple-byte, or multibyte content, the high byte is sent first followed by the low byte.

When sending a byte content, the high bit is sent first, followed by the low bit.

3Message Format

information unitLength (bytes)note
protocol identifier40x44535246 (ASCII "DSRF")
protocol version number1BIT7-3: Master version number BIT2-0: Sub version number (current version "0.2" 0x02)
Message ID1 
CRC 16-bit checksum216-bit CRC check digit (including content length)
Length of message content2 
Message  
message format

4, Message ID Definition

Message Nameorientations(be) worth
login requestApplication Software->Card Reader1
Login ConfirmationCard Reader->Application Software2
Send electronic label informationCard Reader->Application Software3
Send a heartbeat requestApplication Software->Card Reader4
Heartbeat Request ConfirmationCard Reader->Application Software5
Call tag requestApplication Software->Card Reader6
Call tag confirmationCard Reader->Application Software7
Call tag rejectionCard Reader->Application Software8
Send SMS requestApplication Software->Card Reader9
Send SMS to confirmCard Reader->Application Software10
Send SMS RejectCard Reader->Application Software11
Batch call label requestsApplication Software->Card Reader12
Batch call label confirmationCard Reader->Application Software13
Batch call tag rejectionCard Reader->Application Software14
Message ID Definition

(iii) Message interaction flow

(iv) Description of message content

1The following is a list of all the requests that have been made to the system.

Description:

User application software sends login request to card reader

Message.

Length (bytes)element
16User name (string)
16Password (String)

Note 1:

The default user name of the card reader is "admin" and the default password is "888888".

Note 2:

String is a string of characters with the character '\0' (0x00) as the cutoff character.

Message Example:

44 53 52 46 02 01 82 b6 00 20 61 64 6d 69 6e 00 00 00 00 00 00 00 00 00 00 00 38 38 38 38 38 38 00 00 00 00 00 00 00 00 00 00

message parsing

2Login Confirmation(0x02)

Description:

The card reader confirms the login request from the application software

Message.

Length (bytes)element
2Login result (0 success other values fail)
Message

Message Example:

44 53 52 46 02 02E4 A1 00 02 00 00

Login Confirmation Information

3(0x03)

Description:

Reads the card to send reads the electronic label data to the application software

Message.

Length (bytes)element
1substation address code
4electronic tag card number
1Electronic label attributes
0~7Extended Data Bytes
1Wireless Signal Field Strength (dBm)

The substation address code:1 byte, the code of the network reader itself and the accessed wireless reader. If the tag is read by the network reader itself, the substation number is 0. If the tag is read by the extended wireless reader, the substation number is the address code of the wireless reader +1 (1~16).

Electronic tag card number:4 bytes, the ID code of the read tag.

Tag Attributes

Bit 0 Undervoltage flag. 1: Undervoltage 0: Normal

Bits 1-3 Label Type. 0: Plain Label 1: Acousto-optic Label 6: Label Module

Bit 4 Reserved.

Bits 5-7 Extended data length. If necessary, the tag can upload some extended data (e.g. humidity, moisture, etc. data), the extended data area follows the attribute byte and can be 0-7 bytes in length.

Extended Data Bytes: 0-7 bytes, the length of the extended data is stated in the attribute byte, which can carry some data specific to the tag, such as temperature, temperature, and other data. There can be up to 7 bytes or none.

Wireless signal field strength:1 byte, read the wireless field strength measured when the electronic tag signal, according to the field strength value can be calculated to get the distance of the tag. Range (-128dBm~0dBm)

The greater the value of this byte, the greater the actual wireless signal strength, the closer the tag is to the reader.

Message Example:

Message example: 44 53 52 46 02 03 8E 77 00 07 01 00 1B 81 7A 00 AB

4Handshake request (0x04)

Description:

The application software periodically sends handshake request messages to the reader in order to maintain the login state.

Message: None

Message Example:

44 53 52 46 02 04 b0 01 00 00

5Handshake Acknowledgement (0x05)

Description:

The reader acknowledges the application software's handshake request message

The message body contains the device status of the positioning antenna (substation 0) connected to the network reader itself, and the device status of up to 16 wireless readers (substations 1~16) extended via wireless, which facilitates the management of the devices by the application software.

Message.

Length (bytes)element
1Number of substations (fixed value: 17 [0x11])
1Substation 0 status (equipment itself)
16Substation status 1-16 (extended up to 16 wireless readers)
handshake confirmation message

State Definition:

0: Normal

1: Locate antenna failure 

2: Card reader failure

3: Reader congestion (too many tags to issue in time resulting in data loss)

Message Example:

44 53 52 46 02 05 1E 2A 00 12 11 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02

handshake confirmation

6,call labelRequest (0x06)

Description:

When the application software needs the specified tags to glow audibly, an audible and visual reminder request message needs to be sent.

Message. 

Length (bytes)element
1substation address code
4electronic tag card number
1Effective duration of reminder (seconds)
1Reminder mode
Call tag request information

Reminder effective length:

After sending a reminder command, for how long the reminder operation remains active. (After the reminder operation is deactivated, the tag will still remind autonomously for 10 seconds until the timeout period.)

Reminder Mode:

calling modeclarification
0Green light blinking only
1Green light flashing + buzzer sounding
2Red light blinking only
3Red light flashing + buzzer sounding
4Alternating red and green flashing only
5Red and green alternately flashing + buzzer sounding
255Stop Alert

Message example: 44 53 52 46 02 06 2C F5 00 07 00 00 1D 0E 54 3C 00

7,call labelAcknowledgement (0x07)

Description:

The reader acknowledges the application program's audible alert request message. If the application software sends an Audible Alert Request message but does not receive an Audible Alert Acknowledgement, it needs to resend the request message.

Message.

Length (bytes)element
1substation address code
4electronic tag card number

Message example: 44 53 52 46 02 07 CC 8E 00 05 00 00 1D 0E 54

8Call Label Rejection(0x08)

Description:

The reader is unable to respond to call tag request messages from the application software, such as the substation is not online.

Message.

Length (bytes)element
1substation address code
4electronic tag card number
1Reason for failure value
Label Denial of Information

9Send SMS request(0x09)

Description:

The application sends an SMS message to the specified tag (valid only for SMS tags).

Message. 

Length (bytes)element
1substation address code
4Label ID
2SMS number (0~29999)
1Year (actual year - 2020)
1moon
1date
1hour
1ingredient
1unit of angle or arc equivalent one sixtieth of a degree
1SMS content length (0~110)
110Text message content
SMS Send Message Request

10, send a text message to confirm(0x0A)

Description:

The reader acknowledges receipt of the SMS message from the application.

Message.

Length (bytes)element
1substation address code
4Label ID
Send SMS to confirm

11, Send SMS Reject(0x0B)

Description:

The reader receives SMS messages from the application software, but cannot send them, e.g. the substation is not online.

Message.

Length (bytes)element
1substation address code
4Label ID
1Reason for failure value
Send SMS Reject

12, batch call labeling requests(0x0C)

Description:

When the application software needs to call a batch of tags at the same time, you need to send a batch call tag request message. One message supports calling up to 80 tags.

Message. 

Length (bytes)element
1substation address code
1Effective duration of reminder (seconds)
1Number of labels (1~80)
4Tag 1 card number
1Tab 1 Reminder Mode
4Tag 2 card number
1Tab 2 Reminder Mode
。。。。。。 
4Label N Card Number
1Tagged N Reminder Mode
Batch call labeling

Reminder effective length:

After sending a reminder command, for how long the reminder operation remains active. (After the reminder operation is deactivated, the tag will still remind autonomously for 10 seconds until the timeout period.)

Call Mode:

The general definitions are as follows(definitions of acoustic and visual labels may vary slightly)

calling modeclarification
0Green light blinking only
1Green light flashing + buzzer sounding
2Red light blinking only
3Red light flashing + buzzer sounding
4Alternating red and green flashing only
5Red and green alternately flashing + buzzer sounding
255Stop Alert
calling mode

Message example: 44 53 52 46 02 0C 2B2A 00 12 01 3C 03 00 1D 0E 54 00 00 1D 0E 55 00 00 1D 0E 56 00

13, batch call label confirmation(0x0D)

Description:

The reader acknowledges the bulk call tag request message from the application software. If the application software sends a Bulk Call Tag Request message but does not receive a Bulk Call Tag Acknowledgement, it needs to resend the request message.

Message: Message. 

Length (bytes)element
1substation address code

Message example: 44 53 52 46 02 0D90B1 00 01 01

Bulk Call Confirmation

14, Bulk Call Tag Rejection(0x0E)

Description:

The reader is unable to respond to bulk call tag request messages from the application software, such as the substation is not online.

Message.

Length (bytes)element
1substation address code
1Reason for failure value
Bulk Call Rejection