cancel
Showing results for 
Search instead for 
Did you mean: 

i cant read and send data between UART2 of a STM32L476rc (PA2 and PA3) and the BlueNRG-2N UART(DIO8 and DIO11), i want to read the hw and fw version of the blueNRG .

ZEya.1
Associate II

I designed a PCB with an STM32L476rc and a BlueNRG-2N, the buenrg is conected with usart3 and i want to read the bluenrg version and send it to usart2 to show it with docklight 

please can someone give me a hand in the source code ,

3 REPLIES 3
Sebastien DENOUAL
ST Employee

HI @ZEya.1​ ,

To discuss with BlueNRG-2N , you need to use predefined HCI/ACI commands.

ACI documentation for BlueNRG-2N is available in html format in STSW-BNRG2N-V320 package.

To get BeluNRG-2N version, you may use HCI_READ_LOCAL_VERSION_INFORMATION and ACI_HAL_GET_FIRMWARE_DETAILS.

Now, if you just started your project with BlueNRG-2N, I would strongly advise to use SPI link between BleuNRG-2N and STM32L476rc instead of UART.

Using SPI, a code example (similar to what you are doing) is already available : X-CUBE-BLE2

Regards,

Sebastien.

ZEya.1
Associate II

where i have to write the commands ! in the virtual terminal i put them ,, them then i get the version ? sorry i did not understand how i have to order my code

Hi @ZEya.1​ ,

BlueNRG-2N is a network processor - already preflashed (including BLE certified BLE stack).

Supported commands (ACI/HCI) are described in html doc I pointed.

How to send command ? Here, outside BlueNRG-2N datasheet, there is also UM2805 : ACI command data format. Those documents explained what is BlueNRG-2N and how to send ACI/HCI commands to BlueNRG-2N over UART (or over SPI)

Now, as said in previous answer, if you have possibility to use SPI between your STM32L476 and BleuNRG-2N . I would strongly advise to start from  X-CUBE-BLE2 package (only SPI supported). Code examples are for STM32L476 which is your target.

In terms of HW, it can be executed on NUCLOE-L476 + X-NUCLEO-BNRG2A1 expansion board (yhis expansion board emulate BleuNRG-2N )

Regards,

Sebastien.