cancel
Showing results for 
Search instead for 
Did you mean: 

How to use BlueNRG Undirected Connectable Mode with security on?

charles23
Associate III
Posted on March 04, 2015 at 18:14

I have successfully configured my BlueNRG peripheral so it bonds with a Central (iPad running Lightblue) using Just Works association method (the Central asks permission to pair with the Perpheral). I can power off either or both device and when the Peripheral becomes discoverable again the Central can find it and connect to it (without asking permission to pair). 

I believe that I should be able to use Undirected Connectable mode rather than General Discoverable mode, but I am unsuccessful.  I have done this:

1) after bonding with the Central I use BLUEHCI_GAP_CONFIGURE_WHITELIST which I expect will populate my whitelist with Central addresses in my security database.

2) When I next want to connect to the Central I call BLUEHCI_GAP_SET_UNDIRECTED with parameters WHITE_LIST_FOR_ALL and PUBLIC_ADDR.

3) the Peripheral appears in the device list of Lightblue on the Central.

4) I try to connect to the Peripheral on the Central but this does not succeed. There are no events triggered on the Peripheral, and the Lightblue app fails after 15s with ''Timeout interrogating the peripheral''.

Please provide the correct instructions for using Undirected Connectable Mode, perferably with sample code.

#bluenrg-undirected-connectable
5 REPLIES 5
charles23
Associate III
Posted on March 04, 2015 at 19:51

I find that I get the same unsuccessful result if I capture the Central's board address from the EVT_LE_CONN_COMPLETE event and then add it to the white list using HCI_LE_ADD_TO_WHITE_LIST.

iOS uses random addresses, but I believe this is taken care of by the BLE design, using an Identity Resolving Key exchanged during the pairing/bonding process. Is that correct? And is it therefore correct if I store the iPad's (random) address in my Peripheral's white list?

The functionality I describe is mandated by the BLE Glucose Profile, which (a) insists that devices are bonded and (b) requires the Peripheral to use Undirected Connectable Mode once bonded. I see that ST support the Glucose profile, and UM1770 implies this is implemented when it says this for GL_Advertize(): ''If the useWhiteList is set to TRUE, the device is configured to use the whitelist which is configured with bonded devices at the time of initialization, otherwise the device enters limited discoverable mode to connect to any of the available devices.''  So the source code for GL_Advertise() would probably answer my questions. Please.

Posted on March 17, 2015 at 15:17

Hi Charles,

iOS uses resolvable private addresses, when using this kind of addresses the whitelist cannot be used.

Regards,

graziella

charles23
Associate III
Posted on March 17, 2015 at 20:28

Could you please tell me what I SHOULD do to connect after I have bonded? Or alternatively, provide the code for your Glucose Profile, which requires this operation. The BLE Glucose Profile document says this:

5.1.2 Connection Procedure for Bonded Devices

A Glucose Sensor shall enter the GAP Undirected Connectable Mode either when commanded by the user to initiate a connection to a Collector or when a Glucose Sensor has one or more stored records to send to a previously connected Collector.

The Glucose Sensor should write the address of the target Collector in its White List and set its controller advertising filter policy to ‘process scan and connection requests only from devices in the White List’.

The Blood Pressure Profile has the same requirement.

How do you do this with a BlueNRG? Example please.

Regards - Charles

Posted on April 08, 2015 at 16:15

Hi,

on the server device (Sensor), after the pairing complete with success, you have to send the command:  ACI_GAP_CONFIGURE_WHITELIST to add the bonded device into white list.

After that, it's possible to put the Sensor device in GAP Undirected Connectable Mode sending the command:

- ACI_GAP_SET_UNDIRECTED_CONNECTABLE(Adv_Filter_Policy=0x03, Own_Address_Type=0x00)

Regards,

Graziella

Could you please tell me what I SHOULD do to connect after I have bonded? Or alternatively, provide the code for your Glucose Profile, which requires this operation. The BLE Glucose Profile document says this:

5.1.2 Connection Procedure for Bonded Devices

A Glucose Sensor shall enter the GAP Undirected Connectable Mode either when commanded by the user to initiate a connection to a Collector or when a Glucose Sensor has one or more stored records to send to a previously connected Collector.

The Glucose Sensor should write the address of the target Collector in its White List and set its controller advertising filter policy to ‘process scan and connection requests only from devices in the White List’.

The Blood Pressure Profile has the same requirement.

How do you do this with a BlueNRG? Example please.

Regards - Charles

Posted on August 19, 2015 at 20:10

Was this ever resolved?

I am trying to do the same thing but am unable to connect to my device after trying to use the white list.  I am able to bond with the device the first time. On the EVT_BLUE_GAP_PAIRING_CMPLT event I call:

 aci_gap_configure_whitelist()

 I then call:

 aci_gap_set_undirected_connectable(PUBLIC_ADDR,WHITE_LIST_FOR_ALL);

Unfortunately after making this call, if I disconnect I am unable to reconnect to my device.  Are there any examples of using the bluenrg code to bond with a single central device and then using the white list to only allow connection with a previously bonded device?