Bluetooth Mesh Authorization and Testing

Last Updated on : 2024-05-21 06:57:00download

This topic describes how to flash firmware and license to Bluetooth mesh devices using either Tuya’s production tool or the chip vendor’s tool.

Tuya’s production tool

For more information, see Authorize Bluetooth Series Modules and Production Testing.

Chip vendor’s tool

TLSR825x

Wire connection

Connect the SWM pin on the programmer to the SWS pin on the module.

Host software

Use Telink Burning and Debugging Tool (BDT). For more information, see Burning and Debugging Tools for all Series.

Bluetooth Mesh Authorization and Testing

PHY6222

Wire connection

The firmware is flashed to the chip through the UART pins, as shown in the table below. The GPIO pin number refers to the one defined by the chip vendor, not by TuyaOS.

UART Feature Pin
UART0 TX GPIO_P09
UART0 RX GPIO_P10

Host software

Use Phyplus’s tool PhyPlusKit_v2.5.2a.exe located in vendor\phy6222_smesh\toolchain for flashing.

  1. The device enters the flashing mode.

    Bluetooth Mesh Authorization and Testing
  2. Select the firmware file and proceed with writing.

    Bluetooth Mesh Authorization and Testing
  3. Flashing is completed.

    Bluetooth Mesh Authorization and Testing

BG24

Host software

Use Silicon Labs’s tool Simplicity Commander located in vendor\bg24_smesh\toolchain for flashing. The following figure shows the interface of Simplicity Commander. For more information, see Silicon Labs IDE documentation.

Bluetooth Mesh Authorization and Testing

Authorization

Set authorization information

OPERATE_RET tal_device_auth_infor_set(UINT8_T *uuid, UINT8_T *auth_key, UINT8_T *mac);

Write the license you obtained from the Developer Platform to the SDK. Ensure that the request parameters are formatted correctly, as shown below.

UINT8_T uuid[17] = "uuid123456789012";
UINT8_T auth_key[33] = "123456789abcdefghABCDEFGH1234567";
UINT8_T mac[13] = "DC234C112233";

tal_device_auth_infor_set(uuid, auth_key, mac);

The values provided in the example are for reference only. Be sure to replace them with your own values.

Query authorization information

OPERATE_RET tal_device_auth_infor_get(UINT8_T *uuid, UINT8_T *auth_key, UINT8_T *mac);

Request the authorization information for a device.