cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB05: Can Eddystone UID be updated remotely over GATT

burak_Guzeller
Associate III

 

Hello,

I am using NUCLEO-WB05KN1 development board with the embedded STM32WB05KN MCU.

My goal is to advertise in Eddystone UID frame format.

Currently I generate the advertising packet manually and insert:

  • 10-byte Namespace ID

  • 6-byte Instance ID

Advertising works correctly.


:question_mark:What I Want To Achieve

I want to be able to change:

  • Namespace ID

  • Instance ID

remotely from a mobile phone using nRF Connect (by writing to a custom GATT characteristic).

This is important because we will deploy many devices in the field and updating IDs over BLE would be very useful.


:white_heavy_check_mark:What I Implemented

I created a custom GATT service with two writable characteristics:

 

 
uint16_t my_service_handle = 0;
uint16_t ns_char_handle = 0;
uint16_t inst_char_handle = 0;

uint8_t Namespace_ID[10];
uint8_t Instance_ID[6];
 

 

aci_gatt_srv_attribute_modified_event()

I handle write events using:

 

 
aci_gatt_srv_attribute_modified_event()
 

 

 

When I receive new data:

  • I update Namespace_ID / Instance_ID

  • Then I restart advertising after disconnection

Advertising packet is generated using:

 

 
 
 
Prepare_Eddystone_UID_Adv_Data()

:warning:The Problem

Even though the characteristic write event works and my arrays are updated, the advertising data does NOT seem to change properly after restart.

Questions:

  1. Is it officially supported to dynamically change Eddystone UID fields during runtime?

  2. Do I need to call aci_gap_set_advertising_data() again explicitly after modifying the arrays?

  3. Is there any limitation in STM32WB05 stack regarding advertising data update while connected?

  4. Is stopping advertising → updating data → restarting the correct approach?

  5. Is there any ST example demonstrating dynamic advertising data update?


:wrench:Expected Behavior

After writing new Namespace/Instance ID via GATT:

  • Device disconnects

  • Advertising restarts

  • New advertising packet contains updated UID


Any guidance or reference example would be greatly appreciated.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
grohmano
ST Employee

Hello @burak_Guzeller,

to your questions:
1) Yes, advertising data can be changed dynamically. 

2) Yes, you have to. Updating your local arrays is not sufficient

3) No, there is not, since when the device is connected, it cannot advertise

4) Yes, as it is said in Bluetooth® Low Energy stack v4.x programming guidelines:
The content of the buffer containing the advertising/scan response data is directly accessed by the stack, hence it
should not change when device is advertising.

5) I am not aware of any example where the adv data would change, but you can refer to the programming guidelines above or to Introduction to the STM32WB0 Bluetooth® LE wireless interface 

 

Hope this helps

Best regards

grohmano

View solution in original post

2 REPLIES 2
burak_Guzeller
Associate III

This is urgent, can you please help?  @Tesla DeLorean   @grohmano  @Aziz BRIGUI 

grohmano
ST Employee

Hello @burak_Guzeller,

to your questions:
1) Yes, advertising data can be changed dynamically. 

2) Yes, you have to. Updating your local arrays is not sufficient

3) No, there is not, since when the device is connected, it cannot advertise

4) Yes, as it is said in Bluetooth® Low Energy stack v4.x programming guidelines:
The content of the buffer containing the advertising/scan response data is directly accessed by the stack, hence it
should not change when device is advertising.

5) I am not aware of any example where the adv data would change, but you can refer to the programming guidelines above or to Introduction to the STM32WB0 Bluetooth® LE wireless interface 

 

Hope this helps

Best regards

grohmano