cancel
Showing results for 
Search instead for 
Did you mean: 

Some questions about the BlueNRG

vizavi
Associate
Posted on August 31, 2014 at 17:26

   Hello! We would like to ask you some questions about the processor BlueNRG.

1. How can I check the board STEVAL-IDB003V1 with the methodology of applying BLUENRG_GUL described in the document DM00099259?

 I do the following:

- connect STEVAL-IDB003V1 to USB of the PC;

-  chose the appeared port, push the button �OPEN�;

- chose the command in the column ACI command;

- send the command with the button SEND.

Thus I realize the algorithm of the handheld translating  of commands  accordingly DM00099259:

5.3.1 Initialization

-  BLUEHCI_GATT_INIT

-  BLUEHCI_GAP_INIT (Role=0x01)

5.3.2 Add  service and characteristics

-  BLUEHCI_GATT_ADD_SERVICE (Service_UUID_Type=0x01,

   Service_UUID_16=0xA001, Service_Type=0x01, Max_Attributes_Records=0x06)

� BLUEHCI_GATT_ADD_CHAR (Service_Handle=0x0010,

   Char_UUID_Type=0x01, Char_UUID_16=0xA002, Char_Value_Length=10,

   Char_Properties=0x1A, Security_Permissions=0x00, GATT_Evt_Mask=0x01,

   Enc_Key_Size=0x07, Is_Variable=0x01)

5.3.3 Set security requirements

� BLUEHCI_GAP_SET_AUTH_REQUIREMENT(MITM_Mode=0x01,

   OOB_Enable=0, OOB_Data=0, Min_Encryption_Key_Size=7,

   Max_Encryption_Key_Size=16, Use_Fixed_Pin=0, Fixed_Pin=123456,

   Bonding_Mode=1)

5.3.4 Enter connectable mode

� BLUEHCI_GAP_SET_DISCOVERABLE (Advertising_Type=0x00,

  Advertising_Interval_Min=0x800, Advertising_Interval_Max=0x900,

  Own_Address_Type=0x00, Advertising_Filter_Policy=0x00,

  Local_Name_Length=0x08, Local_Name='\x08BlueNRG',

  Service_UUID_Length=0x00, Service_UUID_List=0x00,

  Slave_Connection_Interval_Min=0x0000,

  Slave_Connection_Interval_Max=0x0000)

Then I control the process according to the confirming  5.3.5:

 Connection with central device:

�Once BlueNRG is put in a discoverable mode, it can be seen by a central device in  

scanning. Any Bluetooth smart and smart-ready device can connect to BlueNRG, such as a

smartphone. LightBlue is one of the applications in the Apple store for iPhone�

4S/5  and  later versions of Apple�s iPhone�.

 

 

I search of the devices on the isolated PC which is not connected with STEVAL-IDB003V1. Open Bluetooth and look for the devices in the zone of the Bluetooth net. As checking and searching device we apply ASUS USB-BT400 adapter with the supporting of Bluetooth 4.0.

But the device STEVAL-IDB003V1 is not found after doing actions 5.3.1-5.3.4.

Why is it happened? What is done incorrectly?  

Besides that the experiment was doing by other way: into the board NUCLEO-L152RE the firmware BlueNRG_VCOM_1_3_Nucleo.hex was loaded, and into the board STEVAL-IDB00

3V1 the firmware BlueNRG_VCOM_1_3.hex was loaded, then the commands were done into

BLUENRG_GUI for the 1-st and 2-nd devices separately, but nothing was found between the boards and the device ASUS USB-BT400 adapter - has found nothing either.

 Where can be a problem? Do I carry out the algorithm of actions correctly?

 0690X00000602dsQAA.jpg

2.  In the BLUENRG_GUI there are commands HCI TEST and their description is done in Bluetooth core specification 4.0, Volume 2, Part E,  Chapter 7.

But how can I use them for testing in BLUENRG_GUI?

What is the order of actions?

Need I connect in the Com Terminal?

What information must appear if the test is done successfully?

What firmware must be in the Server-device and Slave-device in order to carry out the HCI TEST on  the Bluetooth connection?    

 

3. Which way should I use the program code BLE_Chat?

The text for the client and server is identical.

How should I find Master and Slave?

In the document DM00099259:

 

6.2.1 Initialization there are the directives  on the putting of the commands:

BLUEHCI_GATT_INIT

� BLE Chat, �Server� role:

� BLUEHCI_GAP_INIT(Role=0x01): peripheral.

BLE Chat, �Client role:

� BLUEHCI_GAP_INIT(Role=0x03): central.

 

Does it mean that I must open 1-st and 2-nd devices in the BLUENRG_GUI and put these commands  if I want to use code BLE_Chat?

Need I in BLUENRG_GUI put any commands 6.2.2-6.2.5?

Should I understand that commands 6.2.2-6.2.5 are absolutely realized in the firmware and these items are done just for information but not for using in BLUENRG_GUI? 

If I choose in BLUENRG_GUI the appeared port, push the button �Open� and send the commands then the Com port for the connection with the device is busy.

How then can I watch data on the using of firmware BLE_Chat  in the program  Com Terminal? Because Com Terminal can not open the same port if it is already opened in BLUENRG_GUI? 

#low-power-rf-solutions
1 REPLY 1
Posted on November 20, 2014 at 10:46

Hi Vladislav,

I will try to respond to your questions:

1) To put a BlueNRG in discovery mode, you have to send the following commands:

- Reset HW (click on the related button in the GUI);

- BLUEHCI_HAL_WRITE_CONFIG_DATA(0,6, 0x123456789ABC)  -> set a public address

- BLUEHCI_GATT_INIT;

- BLUEHCI_GAP_INIT (Role=0x01)  -> Peripheral Role;

- BLUEHCI_GAP_SET_DISCOVERABLE ->you can also use the default parameters;

Now the BlueNRG is in discoverable mode.

You could configure the other device as Central and perform a scanning in order to understand if you can see the peripheral, in this case you have to send the following commands:

- Reset HW (click on the related button in the GUI);

- BLUEHCI_GATT_INIT;

- BLUEHCI_GAP_INIT (Role=0x03)  -> Central Role;

-  BLUEHCI_GAP_START_GEN_DISC_PROC->you can also use the default parameters;

The central should receive the event EVT_BLUE_GAP_DEVICE_FOUND containig the address of the peripheral (little endian).

Anyway, you can find the iOS and Android apps to drive BlueNRG  at the link:

 

http://www.st.com/web/catalog/sense_power/FM1968/CL1976/SC1898

You shoud see the BlueNRG device in adverting also using the ASUS USB-BT400 adapter.

2)Please see the Application Note  AN4494 that you download at the following link:

http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/application_note/DM00116738.pdf

In the BlueNRG device you have to load the firmware  BlueNRG_VCOM_1_3.hex .

3) Installing the BlueNRG DK 1.5.0, under the folder ..\BlueNRG DK 1.5.0\Firmware you can find the firmware of chat master and client side (see files BLE_Chat_Client.hex and  BLE_Chat_Server.hex)

It means that you have to put the devices in DFU mode and load in one device the BLE_Chat_Client.hex and in the other the firmware  BLE_Chat_Server.hex. The paragraph 6.2.2-6.2.5 explain the main steps to realize a chat.

Regards,

Graziella