cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation of STM32WB Bluetooth® Low Energy (BLE) wireless interface

MZahn.1
Associate II

I'm trying to find a proper documentation for the ACI commands of the bluetooth stack included in the STM32CubeWB MCU Firmware Package. We're running the stm32wb5x_BLE_Stack_full_fw on one CPU of a WB55 and our application on the other. Our application uses the STM32_WPAN middleware (e.g. functions from ble_gap_aci) to control the stack. I miss a proper documentation of these functions. What values can `aci_gap_remove_bonded_device` possibly return?

So far I had a look at The BlueNRG-MS Bluetooth® LE stack application command interface (ACI), the STM32WB Bluetooth® Low Energy (BLE) wireless interface and of course the Building wireless applications with STM32WB Series microcontrollers. None of these documents contained a description of the individual return values.

6 REPLIES 6
Remi QUINTIN
ST Employee

Please have a look at AN5270.

MZahn.1
Associate II

Thanks for your reply. As mentioned in my comment, I already consulted AN5270 (STM32WB Bluetooth® Low Energy (BLE) wireless interface). The document is not that insightful as it does not list the concrete return codes for the individual ACI functions. UM1865 (The BlueNRG-MS Bluetooth® LE stack application command interface (ACI)) goes more into my direction, as it lists the individual return codes that for each ACI function. My remaining questions are:

  1. How are UM1865 and AN5270 related? Do they refer to the same stack?
  2. Is there any further description of the ACI API, except the two documents mentioned above?
Remi QUINTIN
ST Employee

Sorry I did not recognized AN5270 from its title.

Unfortunately UM1865 refers to another stack than the one used on the STM32WB.

Both stacks are close but not exactly the same.

If you are mainly interested in the values returned by the ACI functions, I will check whether we have a more detailed document.

Can you give some examples of functions for which such information is missing as I see some ACI functions with detailed status code?

I assume you are not only referring to the status error code but also to some parameters.

MZahn.1
Associate II

All good! Well, the functions that I currently deal with are `aci_gap_get_bonded_devices`, `aci_gap_remove_bonded_device` or `aci_gatt_update_char_value`. The description of `aci_gatt_update_char_value` in AN5270 is not that bad and describes at least BLE_STATUS_INSUFFICIENT_RESOURCES. Having a look at UM1865 reveals some other error codes as well, and while not the exact same stack I'd bed the implementation of `aci_gatt_update_char_value` is identical in both.

I'm mostly interested in the return values, so that we know what error cases our application will need to handle.

Another possibility would be, of course, to have a look in the source code. But if I remember correctly the source code stm32wb5x_BLE_Stack_full_fw is not publicly available?

Remi QUINTIN
ST Employee

OK now I understand your focus.

I will ask people from the stack a more complete description of those functions.

Remy ISSALYS
ST Employee

Hello,

Here the return values for each command mentioned in you previous comment:

  • aci_gap_remove_bonded_device
    • BLE_STATUS_INVALID_PARAMS
    • BLE_STATUS_DEV_NOT_FOUND
    • BLE_STATUS_SUCCESS
    • BLE_STATUS_TIMEOUT

  • aci_gap_get_bonded_devices
    • BLE_STATUS_INSUFFICIENT_RESOURCES (if there is too many bonded devices in comparison with max size of ACI answer)
    • BLE_STATUS_SUCCESS
    • BLE_STATUS_TIMEOUT

  • aci_gatt_update_char_value
    • BLE_STATUS_ERROR (GATT not initialize)
    • BLE_STATUS_INVALID_HANDLE
    • BLE_STATUS_INVALID_PARAMS
    • BLE_STATUS_SEC_PERMISSION_ERROR
    • BLE_STATUS_INSUFFICIENT_RESOURCES (Indication or notification to send)
    • BLE_STATUS_BUSY (Indication or notification already on going)
    • HCI_COMMAND_DISALLOWED_ERR_CODE (Indication to send but waiting for previous indication confirmation)
    • BLE_STATUS_SUCCESS
    • BLE_STATUS_TIMEOUT

Best Regards