cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect a STM32WB55 board to a Windows PC via BLE?

jwoerle
Associate III

Hi all,

I'm on a P-NUCLEO-WB55 Nucleo Board (MB1355C) and I'm trying to connect an example to a Windows (Win10) PC via BLE.

I'm using the latest firmware version STM32Cube_FW_WB_V1.13.2 and flashed the Copro Wireless binary stm32wb5x_BLE_Stack_full_fw.bin to the board.

Actually I want to connect the BLE_DataThroughput example. I configured #define CFG_BLE_CENTRAL 0 and CFG_SERVER_ONLY 1 (in app_conf.h) to use one board (as it's described in the readme.txt).

There are no problems connecting this example to my smartphone. I can use the apps from ST, but I can also use other apps (like Bluetooth LE Scanner on Android) which produces this Debug Output of the STM32WB board in a console:

Wireless Firmware version 1.11.1<\n>
Wireless Firmware build 1<\n>
FUS version 1.2.0<\n>
<\n>
SHCI_SUB_EVT_CODE_READY - WIRELESS_FW_RUNNING <\n>
DBGMCU_GetRevisionID= 2001 <\n>
<\n>
Wireless Firmware version 1.11.1<\n>
Wireless Firmware build 1<\n>
FUS version 1.2.0<\n>
<\n>
SHCI_SUB_EVT_NVM_START_WRITE : NumberOfWords = 1<\n>
Wireless Firmware version 1.11.1<\n>
Wireless Firmware build 1<\n>
FUS version 1.2.0<\n>
<\n>
SHCI_SUB_EVT_NVM_END_WRITE<\n><\r><\n>
<\r>** DATA THROUGHPUT PROJECT **  <\n><\r><\n>
<\r>** START ADVERTISING **  <\r><\n>
<\r>  <\r><\n>
** NAME : DT SERVER **  <\r><\n>
<\r>CONNECTION COMPLETED - SLAVE <\n>
**INTERVAL = 45.00 ms <\n>
**LATENCY = 0x0 <\n>
**SUPERVISION_TIMEOUT = 5000.00 ms <\n>
<\r><\n>
<\r>set data length <\n>
change ATT MTU size <\n>
**MTU_size = 251 <\n>
<\r><\n>
<\r>CONNECTION UPDATE COMPLETE<\n>
**INTERVAL = 7.50 ms <\n>
**LATENCY = 0x0 <\n>
**SUPERVISION_TIMEOUT = 5000.00 ms <\n>
<\r><\n>
<\r>CONNECTION UPDATE COMPLETE<\n>
**INTERVAL = 45.00 ms <\n>
**LATENCY = 0x0 <\n>
**SUPERVISION_TIMEOUT = 5000.00 ms <\n>
<\r><\n>

And a "DISCONNECTION COMPLETE" if I disconnect it from the app.

Now I tried different apps on my Win10 PC to connect this example. For example I used "Bluetooth LE Lab" or "Bluetooth LE Explorer" to connect my board.

For example with "Bluetooth LE Explorer" it comes in the Debug Output above till line 30 (change ATT MTU size) then there is a "DISCONNECTION COMPLETE" event and then it stats again from line 19 (DATA THROUGHPUT PROJECT) and goes to line 30 and disconnection again. This repeats till I stop. In Bluetooth LE Explorer it also toggles "Device Connected:" between True/False

I tried a more rudimentary app under windows to connect the board (BLEConsole from sensboston under GitHub) which is a console application to interact wit Bluetooth LE devices. But if I want to open the the connection there, I get the message

> Device DT_SERVER is disconnected.

> Connecting to DT_SERVER.

> Device #00 is unreachable.

And I see the same "CONNECTION COMPLETE / DISCONNECTION COMPLETE" output in the log.

---

I then expected, that somehow the handshake of the MTU-Size is not working, so I tried different examples like BLE_p2pServer but same results there.

---

I found this webpage: https://visualgdb.com/tutorials/arm/stm32/stm32wb/peripheral/

They also used the "Bluetooth LE Explorer" there to connect the STM32WB with the example BLE_HeartRate. So I also tried this example but it's not working with "Bluetooth LE Explorer". Same problems as described above. The output of the "Bluetooth LE Explorer" looks a little bit different, then on the webpage. I attached my output Bluetooth_LE_Explorer__BLE_HeartRate.jpg

---

I also checked my PCs BLE driver in the Device-Manager which says, it's on the firmware version LMP 8.256

LMP 8 is Bluetooth Core-Specification 4.2 which in my eyes should be working with this examples.

---

One last idea I have, is to use the P-NUCLEO-WB55 USB dongle with the BLE_TransparentMode and check the output of the STM32CubeMonitor-RF. But currently my dongle is broken and I'm waiting for my recently ordered one which should arrive in the next couple of days.

---

Can anybody give me hints on how to connect the BLE examples of the STM32WB Nucleo board to my PC?

Thanks and best regards

Julian

4 REPLIES 4
jwoerle
Associate III

I just updated the Wireless firmware version (stm32wb5x_BLE_Stack_full_fw.bin) on the device from 1.11.1 to 1.13.2 but it didn't change anything...

KKIM.6
Senior

Is there any progress to connect PC?

I also want to do it but there is few example...

Remy ISSALYS
ST Employee

Hello,

In order to connect your board to your PC via BLE with Bluetooth LE Explorer, you should click on device picture, see the red arrow on the following image:

0693W00000NpNJjQAN.pngI tried with BLE_HeartRate application and there is no disconnection. If you click on "Pair" button, the PC connect to the board and request pairing but if your board doesn't require secure connection the device rejects the request and a disconnection happens. In your screenshot "BT 4.2 Secure Connection:" field is equal to True, so I think you have click on "Pair" button.

Best Regards

Atronil
Associate II

i have also project with P-NUCLEO-WB55, if it's possible to use only windows drivers in my C# program, to connect to the board, i want to connect this board to light sensor with SPI and transfer data to pc with Bluetooth connection.