Skip to main content
WRosé.1
Associate II
October 6, 2022
Question

Is there any way of using ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE event to send data every connection event?

  • October 6, 2022
  • 2 replies
  • 3329 views

I would like to keep updating a char value with every connection event.

Im using a stm32wb15.

every time I get a

ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE with last state 0x02 which correspond to - 0x02: Connection event slave.

As I understand this means a connection event has ended and I can now update the char value again with

aci_gatt_update_char_value(...)

But it seems that ACI_HAL_END_OF_RADIO_ACTIVITY_VSEVT_CODE with last state 0x02 happens more frequently than the connection interval and I get an error from aci_gatt_update_char_value.

Is the last state 0x02 not corresponding to the connection event?

And do you have any suggestions on how to update the char value and send indication every connection event?

Best regards Wallentin

This topic has been closed for replies.

2 replies

Remy ISSALYS
ST Technical Moderator
October 11, 2022

Hello,

Yes, it's right way to update the char value and send indication every connection event, this event is generated when the device completes a radio activity and provide information when a new radio activity will be performed. You can select which radio activity event you want to have using ACI_HAL_SET_RADIO_ACTIVITY_MASK command. Indeed, the last state 0x02 correspond to Connection slave according to STM32WB_BLE_Wireless_Interface.html documentation. You can find more information about event and command in this documentation. What is the status error code that return the aci_gatt_update_char_value command?

Best Regards

WRosé.1
WRosé.1Author
Associate II
October 11, 2022

 Thanks Remy!

To clarify im sending an indication from the peripheral when a button is held, and Im sending right after the 0x02 slave connection event in radio activity callback.

So first time the

 aci_gatt_update_char_value(...)

returns success

But then the next n times (depending on the connection interval, It is around 1 second of errors) returns error 0x46

which maybe is

#define BLE_STATUS_INSUFFICIENT_RESOURCES 0x64U

but with the wrong endian format?

Because I cannot see any error code for 0x46.

So what I was thinking is that the central might not confirm the indication fast enough? But should that correspond to this problem?

Do you have any idea?

Best Regards W

Remy ISSALYS
ST Technical Moderator
October 11, 2022

Hi,

Can you share the characteristic configuration?

Once you are connected and indications are enabled, if you call aci_gatt_update_char_value command with a random value after each end of radio activity event (without managed the update with button), do you have the same error?

If you try to send notification instead of indication, is it working as expected or not? Are you able to perform air traces?

Best Regards

WRosé.2
Visitor II
November 18, 2022

The device is another wb.

Best regards