2025-11-27 1:44 AM
I’m using the X-NUCLEO-BNRG2A1 in network coprocessor mode (UART), but I’m stuck trying to run the BLE_Beacon example.
Here is what I have done so far:
I followed the AN5651 guide using a NUCLEO-L433RC-P.
Since BlueNRG-1ST-LINK does not work on Windows 11, I used RF-Flasher Utility to flash the DTM_UART.hex file onto the X-NUCLEO. I took this hex file from the STSW-BLUENRG1-DK package
This part worked correctly, and the X-NUCLEO is now configured as a network coprocessor through UART.
The problem appears on the STM32 side.
The STSW-BLUENRG1-DK package includes several applications such as BLE_Beacon, but they are written for EWARM (IAR) and are not integrated into CubeIDE.
I tried flashing BLE_Beacon_NWK_UART.hex to my NUCLEO STM32 board using CubeProgrammer, but after it configured, the communication with the module doesn't work. I assume this is because the application is configured for the NUCLEO-L476RG, not the L433, so the pins or hardware settings do not match.
As a result, I’m stuck and unable to start a BLE Beacon application using the network coprocessor.
I also looked into X-CUBE-BLE2, but the examples provided with CubeMX/CubeIDE seem to support only the SPI interface. If UART is supported, I haven't been able to find how.
Could you help me set up a working environment between a NUCLEO STM32 and the X-NUCLEO-BNRG2A1 in network coprocessor mode using UART in CubeIDE? Is there an example I can use with the X-NUCLEO and an STM32 as a Beacon?
Solved! Go to Solution.
2025-12-16 4:48 AM
After several attempts, I was finally able to run the BLE_Beacon application correctly. The main issue was related to the UART pin configuration, which is unclear and inconsistent in the official documentation.
I hope this guide can help anyone who encountered similar difficulties. It is also clear that the current ST documentation should be updated.
In the X-NUCLEO-BNRG2A1 documentation, the UART pins are reported as:
DIO4
DIO5
However, if you use the STSW-BLUENRG1-DK package to load the firmware, the actual UART pins without flow control used by the device are:
DIO8 (TX)
DIO11 (RX)
:warning: Warning: for DIO11, you must populate the resistor R76, otherwise the UART communication will not work correctly.
Power the expansion board from the NUCLEO 3V3 supply.
Do not plug the expansion board directly onto the NUCLEO, as this may cause errors.
Instead, create a direct connection using SWD and power supply pins.
Use RF-Flasher Utility to flash the firmware:
DTM_UART.hex
Use STM32CubeProgrammer.
Flash the .hex or .bin file named:
BLE_Beacon_NWK_UART
:warning: This firmware is specifically designed for the NUCLEO-L476RG and cannot be reused as-is on other NUCLEO boards.
Connect the two devices using physical wires.
Make sure to also connect the RSTN pin.
Carefully verify:
Power supply
Common GND
Correct UART lines (DIO8 / DIO11)
Using the nRF Connect application, you should be able to see your BLE device advertising correctly as a beacon.
It is also possible to use X-CUBE-BLE2, with a small software modification:
Modify the hci_tl_interface file, which only manages the communication type.
Create an interrupt to read each byte received from the UART interface.
Store the received bytes into a buffer.
Once the reception is complete, call the function:
hci_tl_lowlevel_isr();
No other changes are required.
:white_heavy_check_mark: Key advantage: unlike the provided BLE_Beacon firmware, X-CUBE-BLE2 can be used with any STM32 NUCLEO board, making it a more flexible and portable solution.
A working example for the NUCLEO-L476RG is provided as an attachment.
2025-12-16 4:48 AM
After several attempts, I was finally able to run the BLE_Beacon application correctly. The main issue was related to the UART pin configuration, which is unclear and inconsistent in the official documentation.
I hope this guide can help anyone who encountered similar difficulties. It is also clear that the current ST documentation should be updated.
In the X-NUCLEO-BNRG2A1 documentation, the UART pins are reported as:
DIO4
DIO5
However, if you use the STSW-BLUENRG1-DK package to load the firmware, the actual UART pins without flow control used by the device are:
DIO8 (TX)
DIO11 (RX)
:warning: Warning: for DIO11, you must populate the resistor R76, otherwise the UART communication will not work correctly.
Power the expansion board from the NUCLEO 3V3 supply.
Do not plug the expansion board directly onto the NUCLEO, as this may cause errors.
Instead, create a direct connection using SWD and power supply pins.
Use RF-Flasher Utility to flash the firmware:
DTM_UART.hex
Use STM32CubeProgrammer.
Flash the .hex or .bin file named:
BLE_Beacon_NWK_UART
:warning: This firmware is specifically designed for the NUCLEO-L476RG and cannot be reused as-is on other NUCLEO boards.
Connect the two devices using physical wires.
Make sure to also connect the RSTN pin.
Carefully verify:
Power supply
Common GND
Correct UART lines (DIO8 / DIO11)
Using the nRF Connect application, you should be able to see your BLE device advertising correctly as a beacon.
It is also possible to use X-CUBE-BLE2, with a small software modification:
Modify the hci_tl_interface file, which only manages the communication type.
Create an interrupt to read each byte received from the UART interface.
Store the received bytes into a buffer.
Once the reception is complete, call the function:
hci_tl_lowlevel_isr();
No other changes are required.
:white_heavy_check_mark: Key advantage: unlike the provided BLE_Beacon firmware, X-CUBE-BLE2 can be used with any STM32 NUCLEO board, making it a more flexible and portable solution.
A working example for the NUCLEO-L476RG is provided as an attachment.