Skip to main content
romain2
Associate II
February 16, 2022
Question

STM32WB5M UART HCI lose connection

  • February 16, 2022
  • 3 replies
  • 3549 views

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

This topic has been closed for replies.

3 replies

Remy ISSALYS
ST Technical Moderator
February 21, 2022

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

romain2
romain2Author
Associate II
February 25, 2022

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 Technical Moderator
February 28, 2022

Hello,

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

Best Regards.

Remy