cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB5M UART HCI lose connection

romain2
Associate III

Hello everyone,

We are currently trying to experiment with the STM32WB5M for it to be integrated in our project as a radio co-processor module.

We have ported nimble stack (https://github.com/apache/mynewt-nimble) on our application MCU to act as an host stack using HCI over UART. The port has been validated with a nrf53 has a controller.

We are now trying to experiment using the STM32WB5M in "Transparent Mode" with HCI over UART (we are using the STM32WB5M development kit with LPUART1 as transport).

We end up in a situation where we are able to correctly advertise, connect to the radio (the CONNECTION_COMPLETE event is send by the STM32WB and received by the host stack and applicative layer). But the connection drops after ~3seconds, and the STM32WB doesn't send any event to notify the host stack).

The issue can be replicated using the unmodified "BLE_TransparentMode" project from cubeMX on the STM32WB5M development kit. And connect it to the STM32CubeMonitor-RF application.

The following "Scripts" to be played by STM32CubeMonitor will replicated the behavior we are experiencing :

# Script recording starts on 16/02/2022 11:40:05

Send(HCI_RESET)

Send(HCI_READ_LOCAL_VERSION_INFORMATION)

Send(HCI_READ_LOCAL_SUPPORTED_FEATURES)

Send(HCI_SET_EVENT_MASK;0x2000800002008090)

Send(HCI_LE_SET_EVENT_MASK;0x00000000000FFE7F)

Send(HCI_LE_READ_BUFFER_SIZE)

Send(HCI_READ_LOCAL_SUPPORTED_FEATURES)

Send(HCI_READ_BD_ADDR)

Send(HCI_LE_SET_ADDRESS_RESOLUTION_ENABLE;0x00)

Send(HCI_LE_CLEAR_RESOLVING_LIST)

Send(HCI_LE_SET_ADDRESS_RESOLUTION_ENABLE;0x01)

Send(HCI_LE_SET_ADVERTISE_ENABLE;0x00)

Send(HCI_LE_RAND)

Send(HCI_LE_SET_RANDOM_ADDRESS;0xDEE0005E586D)

Send(HCI_LE_SET_ADVERTISING_DATA;0x03;0x20003B0000000000635F7465675F6D65735F6C706E5F656C62203D20060102)

Send(HCI_LE_SET_SCAN_RESPONSE_DATA;0x08;0x20003B0000000000635F7465675F6D65735F6C706E5F657477656E794D0907)

Send(HCI_LE_SET_ADVERTISING_PARAMETERS;0x0030;0x0060;0x00;0x01;0x00;0x000000000000;0x07;0x00)

Send(HCI_LE_SET_ADVERTISE_ENABLE;0x01)

# Script recording ends on 16/02/2022 11:49:34

The STM32WB will advertise with the name "MYNEWT" and the connection will be dropped a few second after being established without the host stack being notified.

With the same configuration with an nrf52/nrf53, the connection is done and we are able to discover services and exchange data.

Do you have ideas on why the STM32WB has this behavior ?

Thank you,

Regards,

Romain

3 REPLIES 3
Remy ISSALYS
ST Employee

Hello,

Indeed, if any services are discovered by the STM32WB, it will disconnect few second after the connection. In your script, there is no service created, so a disconnection occurs. You should at least initialize GATT layer with the following command:

Send(ACI_GATT_INIT)

Best Regards

Hello Remy,

Thank you for your answer,

Is this a STM32WB special requirement ? I haven't seen in the Bluetooth SIG specification the fact that no services present should lead to a disconnection.

Regards,

Romain

Remy ISSALYS
ST Employee

Hello,

No, it's inside smartphone application, if no services are discovered, the smartphone operate a disconnection.

Best Regards.

Remy