Skip to main content

Tag Protocol

This tutorial is aimed at developers who do tag-based navigation, such as robots, drones, terminal navigation devices, etc. Through this interface, you can obtain information such as label UID, coordinates, accuracy index, etc., and the communication format is hexadecimal, and the interface includes UART, IIC, etc.

Get Location Result

User can get location result through UART、IIC and other interface.

UART Interface

In UART interface,when the tag parses its current position,it actively outputs positioning information at the set positioning frequency. The positioning information is output in the form of a data frame that includes MSG_Location_Result.

For details, please refer to uBeacon_Tag_UART_Protocol.pdf.

IIC Interface

In IIC Interface, the tag acts as a slave and requires the master to actively read the positioning information. The register address for Location_Result is 0x44.

For details, please refer to uBeacon_Tag_IIC_Protocol.pdf.

SPI Interface

Coming Soon.

Data Analysis

Location Result

Tag data is output in little-endian format.

Location Result read by any interface can be represented using the following structure.

struct LocationResult {
uint64_t local_time; //tag local time, unit:us
float pos[3]; //3 axis position (x,y,z), unit:m
int16_t vel[3]; //3 axis velocity (x,y,z), scaling factor 100, unit:m/s
uint8_t pos_noise[3]; //3 axis position noise (x,y,z), scaling factor 100, unit:m
uint8_t vel_noise[3]; //3 axis velocity noise (x,y,z), scaling factor 100, unit:m/s
};

Analysis Example

The data obtained through the UART and IIC interfaces is stored in hexadecimal format. To convert it into a more intuitive decimal representation, you can refer to the example below.

HEX Data: B5 23 0B 02 00 00 00 00 DD 51 b1 41 EB 58 57 41 AA E7 9A 3F FA FF 04 00 00 00 07 07 04 08 08 04

local_time:

The Hex value 0x00000000020B23B5 converts to decimal as 34284469,local time is 34284469us since tag power on.

pos:

x-axis HEX value 0x41b151DD converts to decimal as 22.164972, x-axis coordinate is 22.164972m

y-axis HEX value 0x415758EB converts to decimal as 13.459208, y-axis coordinate is 13.459208m

z-axis HEX value 0x3F9AE7AA converts to decimal as 1.210195, z-axis coordinate is 1.210195m

vel:

x-axis HEX value 0xFFFA converts to decimal as -6,divide by a scaling factor of 100. x-axis velocity is -0.06m/s

y-axis HEX value 0x0004 converts to decimal as 4,divide by a scaling factor of 100. y-axis velocity is 0.04m/s

z-axis HEX value 0x0000 converts to decimal as 0,divide by a scaling factor of 100. z-axis velocity is 0m/s

pos_noise:

x-axis HEX value 0x07 converts to decimal as 7,divide by a scaling factor of 100. x-axis position noise is 0.07m

y-axis HEX value 0x07 converts to decimal as 7,divide by a scaling factor of 100. y-axis position noise is 0.07m

z-axis HEX value 0x04 converts to decimal as 4,divide by a scaling factor of 100. z-axis position noise is 0.04m

vel_noise:

x-axis HEX value 0x08 converts to decimal as 8,divide by a scaling factor of 100. x-axis velocity noise is 0.08m/s

y-axis HEX value 0x08 converts to decimal as 8,divide by a scaling factor of 100. y-axis velocity noise is 0.08m/s

z-axis HEX value 0x04 converts to decimal as 4,divide by a scaling factor of 100. z-axis velocity noise is 0.04m/s

Parameters Config

Users can also configure parameters through the interface to achieve the desired positioning effect.

For details, please refer to uBeacon_Tag_UART_Protocol.pdf.