cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure and test BlueNRG 2 as a network coprocessor ?

IGhao
Associate II

Hello all ,

I would like to use BlueNRG-2 in my project to communicate in BLE with mobile phone .

My application is build with Atollic TrueStudio on STM32L0.

I'am using BlueNRG-2 on STEVAL-IDB008V2 to test demo applications .

I downloaded BlueNRG-1.2 DK software package and BlueNRG GUI V3.1.0.

So far I understand that I need to flash DTM binary file: DTM UART.hex with BleuNRG-2 navigator to configure BleuNRG-2 as a network coprocessor

I connected my STM32 uC UART interface with UART_RX (IO11) and UART_TX (IO8) of the BlueNRG 2 on the STEVAL-IDB008V2. .

My questions are :

1- Is there any HW configuration to do on STEVAL-IDB008V2 to use UART interface.

2- which software library i need to implement in my uC or BlueNRG 2 to communicate with my mobile phone ?

3- In which case i need the DTM Updater ?

4- how can i test DTM firmware ?

Thank you .

1 ACCEPTED SOLUTION

Accepted Solutions
Winfred LU
ST Employee

Hi Imen,

The DTM application can run on BlueNRG-2 only, and the host processor (STM32L0 in your case) needs to invoke HCI over UART (or maybe over SPI according to your BlueNRG-2 DTM application settings).

If you need to test with BlueNRG GUI, the host processor needs to be programmed with a specific application to pass through the UART or SPI communication.

Regarding to the source code, please contact your local FAE or distributor for supporting.

Regarding to the address, it is customized with aci_hal_write_config_data() to to offset CONFIG_DATA_PUBADDR_OFFSET.

Thank you.

Best Regards,

Winfred

View solution in original post

6 REPLIES 6
Winfred LU
ST Employee

Hi Imen,

1.

Please refer to DT0121 - How to configure the BlueNRG-1 and BlueNRG-2 devices in network coprocessor mode

https://www.st.com/resource/en/design_tip/dm00547290.pdf

The guidelines would be for cases when you develop a custom PCB.

If you're using STEVAL-IDB008V2, the UART interface is connected to STM32L on board, which will act as a USB to serial gateway.

Please connect the EVB to a laptop with USB, run BlueNRG GUI and open the corresponding virtual COM port.

2.

The standard UART HCI interface is needed. ACIs are the vendor specific commands over the standard HCI.

3.

DTM Updater is optional. It is needed when you need to update new DTM binaries directly using BlueNRG GUI, Tools, or BlueNRG Updater utility.

4.

The BlueNRG GUI can be used to interact and evaluate DTM for BlueNRG-2 on STEVAL-IDB008V2.

Best Regards,

WInfred

IGhao
Associate II

@Winfred LU

Hi WInfred,

Thank you for your response and explanation .

Please confirm if i understand correctly .So the DTM application must be running on both BlueNRG 2 and the Stlm32l0 of my PCB ? like described in the The guidelines " If the developer selects a different microcontroller, this application needs to be ported over the different host processor architecture. "

1- But how can i ported the application and the source code are not published ? as i munched before that my application on stm32L0 is build with atollic trueStudio ??

2- i'am trying to make a connection between my phone through BLE scanner application and the STEVAL-IDB008V2 programmed with DTM firmware. where i can find the address of BlueNRG device ?

3- when i try to do the scanning with the BlueNRG GUI i get the error "HCI command error " status = 0x01"

Any help about this ?

Thank you

Winfred LU
ST Employee

Hi Imen,

The DTM application can run on BlueNRG-2 only, and the host processor (STM32L0 in your case) needs to invoke HCI over UART (or maybe over SPI according to your BlueNRG-2 DTM application settings).

If you need to test with BlueNRG GUI, the host processor needs to be programmed with a specific application to pass through the UART or SPI communication.

Regarding to the source code, please contact your local FAE or distributor for supporting.

Regarding to the address, it is customized with aci_hal_write_config_data() to to offset CONFIG_DATA_PUBADDR_OFFSET.

Thank you.

Best Regards,

Winfred

IGhao
Associate II

Hi @Winfred LU​ ,

thank you for your help last time .

So i figure out that i can't use my custom board to test the BlueNRG-2 of STEVAL-IDB008V2 through UART.

i decided to use the nucleo-L053R8 as the host processor and passing through SPI communication to interface with BlueNRG-2,STEVAL-IDB008V2 platform .

I'am confused about the HW modifications must be done on the BlueNRG-2, STEVAL-IDB008V2 platform in order to use it as Network coprocessor via SPI mode.

  1. Should I remove the resistors R52 ,R59, R60, R61, R62 as it's munched in the document STM32_SPI_protocol_example.html or keep them as described in SPI_protocol_specification.html document ?
  2. is the SPI interface of the blueNRG-2 configured as SPI master or slave ?

Thank you .

Best Regards ,

Hi Imen,

> So i figure out that i can't use my custom board to test the BlueNRG-2 of STEVAL-IDB008V2 through UART.

You can actually. You can still test with HCI/ACI (over UART) commands, without needing to use BlueNRG GUI.

The thing you can't do is to test BlueNRG GUI.

To do that, the host processor needs to be programmed with a specific application to pass through the UART or SPI communication, like what is done for the STM32L051 soldered on STEVAL-IDB008V2. The firmware source code for the on-board STM32L is not released officially.

Regarding to the questions,

1.

They should be removed, as described in STM32_SPI_protocol_example.html. It is to prevent the SPI bus influenced by the on-board STM32L0.

SPI_protocol_specification.html document describes the usage of BlueNRG GUI, which BlueNRG-2 interacts with the on-board MCU instead of external one, so the resistors needs to kept connected.

2.

SPI slave.

Please check DK for DTM project, transport_layer.c, line 206, it calls SPI_Slave_Configuration() to initialize those pins to a SPI slave.

Best Regards,

Winfred

Thank you Winfred. Thigns are much clearer now .