BU03-Kit Development Board (Hardware Section 2)

——AndyL

3. Functional Effectiveness Testing

1. Quick Start Test

UART 1

1. Connect a Type-C data cable to your PC, open a serial terminal tool, and press the reset button. If the terminal prints the expected boot messages, the reset button works properly.

USB

The USB port is the TypeC connector labeled USB on the BU03Kit, used for printing distance measurements and other info. It uses the STM MCU’s builtin USB driver. Windows and macOS usually won’t auto-install this driver, so you must manually install it.

 

UART2

Testing UART2 requires a USBtoTTL adapter. UART2 will output ranging data (covered in later sections).

Wiring for USB to TTL adapter:

BU03Kit Pin

Adapter Pin

3V3

3V3

GND

GND

PA2 (TX)

RX

PA3 (RX)

TX

 

LED Flow Test

Connect to the TTL port and send:

AT+TESTLED=X

Parameter

Description

X = 1

Start LED flow test

X = 0

Stop LED flow test

Response:

Example:

 

2. UWB Function Tests

Distance Only (Zeropoint) & 1D Positioning

With one anchor and multiple tags, you get realtime distance measurements (no direction). Adding a second anchor lets you compute onedimensional positions along a line.

 

2D Positioning (3 Anchors)

Three anchors plus tags yield basic 2D positioning. If one anchor is blocked or interfered, loss of redundancy hurts accuracy. Ensure clear lineofsight between anchors and tags.

You only need any one module (anchor or tag) to stream positioning data via USB/UART/WiFi/Ethernet to a PC; other anchors just need power and will forward data wirelessly.

 

Improved 2D (4 Anchors)

Four anchors add redundancy: if one is blocked, the extra data preserves accuracy. Same lineofsight requirement and streaming setup applies.

 

3D Positioning (6+ Anchors)

Six or more anchors support largearea 2D or full 3D positioning, with robust redundancy under blockage. Same streaming and power requirements.

 

Common AT Commands

Command

Description

Response

Example

AT+SETUWBMODE=X

Select algorithm (must save after): 0 = TWR, 1 = PDOA

OK/ERR

Send AT+SETUWBMODE=0 → OK

AT+GETUWBMODE

Query current algorithm

OK/ERR

Send AT+GETUWBMODE → twr_pdoa_mode: 0 OK

AT+SAVE

Save current configuration

OK/ERR

Send AT+SAVE → OK

AT+SETCFG=X1,X2,X3,1

Set config (then save):- X1 = Device ID (0–10)- X2 = Role (0=Tag, 1=Anchor)- X3 = Channel (0=ch9, 1=ch5)- Rate fixed at 6.8 Mbps

OK/ERR

Send AT+SETCFG=0,1,0,1 → setcfg ID:0, Role:1, CH:0, Rate:1 OK

AT+RESTORE

Restore factory defaults

OK/ERR

Send AT+RESTORE → OK

 

TWR Algorithm: Ranging & Positioning

Setup

 

Ranging Steps

AT+SETUWBMODE=0

AT+SETCFG=0,1,1,1

AT+SAVE

AT+SETUWBMODE=0

AT+SETCFG=0,0,1,1

AT+SAVE

 

Anchor’s OLED shows distance to Tag.

 

Observed without calibration: ±20 cm fluctuation.

 

2D Positioning

 

 

PDOA Algorithm: Ranging & Angle

Method A: PC Software (non-persistent)

1. Configure Anchor (A) and Tag (B):

AT+SETUWBMODE=1

AT+SETCFG=0,1,1,1

AT+SAVE

 

AT+SETUWBMODE=1

AT+SETCFG=0,0,1,1

AT+SAVE

 

Method B: ATbased Binding (persistent)

1. Same config as above.

AT+ADDTAG=267F1313,8834,1,64,0

AT+SAVE

 

 

Mobile Device Tracking (e.g., AirTag)

By combining BU03 UWB, Nordic nRF52832 BLE, and PDOA, the kit can interact with UWBequipped smartphones.

Brand

Models with UWB Chip

Apple

iPhone 11 and later (current: iPhone 16)

Samsung

Galaxy S22+ series and above (Ultra/+ models); Fold W23–W25, Z Fold6 (highend only)

Google

Pixel 6 Pro and later (Pro only; current: Pixel 9 Pro)

Huawei

Mate XT Master, Mate 70 RS Master (2024); Mate 60 Pro (2023)

Xiaomi

Mi Mix 4 (2021) only

Meizu

20 Pro, 20 INFINITY

NIO

NIO Phone (all 3 versions)

Manual / Development SDK

 

Power Consumption Test

Under factory firmware (TWR mode):

 

4. Distance-Precision Calibration & Serial Data Formats

TWR UART Data Parsing (USB)

 

Field

Size

Description

head

6 B

Fixed "CmdM:4"

len

1 B

Length of <timer-Pos_TagZ>

Timer

4 B

Tag timestamp

Tagid

2 B

Tag address

Ancid

2 B

Anchor address

Seq

1 B

Sequence number

Mask

1 B

Validbits mask

Rawrange0–7

32 B

Raw distance data for tags 0–7

Kalman_enable

1 B

Filter on/off flag

Kalman0–7

32 B

Filtered distances for tags 0–7

Pos_enable

1 B

Hardware positioning on/off (costly)

Pos_dimen

1 B

Dimension: 1=2D, 2=3D

Pos_Ancmask

1 B

Active anchors mask

Pos_Tag_Res

1 B

Position result flag

Pos_TagX/Y/Z

4 B each

Position coordinates (x,y,z)

Check

1 B

XOR checksum

Foot

1 B

Fixed \r\n

TWR UART2 Frame

Field

Size

Notes

Head

1 B

0xAA

Len

1 B

From version to tail

Version

1 B

Protocol version

Data

32 B

Filtered distances for anchors 0–7

Checksum

1 B

Sum from Head → end mod 256

Tail

1 B

0x55

PDOA Serial Formats

JSON Mode
JS006C{"TWR":{

  "a16":"4096",

  "R":115,

  "T":0,

  "D":76,

  "P":-123,

  "Xcm":-57,

  "Ycm":50,

  "O":408,

  "V":49152,

  "X":0,

  "Y":0,

  "Z":0

}}

Key fields: Xcm, Ycm → angle = arctan(Xcm/Ycm) × 180/π ≈ 23.62°

Addr

2 B

Tag address

Angle

4 B

Angle

Distance

4 B

Distance

usercmd

2 B

Custom flags (battery, alarm)

F_Path_Power_Level

4 B

Firstpath signal strength

RX_Level

4 B

Received signal strength

Acc_X/Y/Z

2 B×3

Accelerometer (x,y,z)

Check

1 B

XOR checksum

Foot

1 B

0x23

Example: Distance 0x38 → 56 cm; Angle 0xEFFFFFFF → –17°.

 

 

Calibration Procedure

AT+SETDEV=10,16336,1,0.018,0.642,0.9924,-317.68,0,0

AT+SAVE

 

5. User Experience & Optimizations

Recommended Improvements: