cancel
Showing results for 
Search instead for 
Did you mean: 

Using BlueNRG-SM White List with Android random generated MAC address

RBret.1
Associate

Hi,

I am working on a ST eval board (IDB006V1M with BlueNRG-MS), using BlueNRG GUI v4.1.0, for evaluating the use of the product, and I am struggling with using the White List for Android devices.

Here are my manipulations and results :

  • Advertising on the BlueNRG device with Filter Policy = 0x00 (Allow Scan Request from Any, Allow Connect Request from Any), I can detect and connect all BLE devices that I'm testing on (Windows laptop, another BlueNRG-MS, and 3 different Android devices). - Result OK
  • Adding all the devices' public MAC address to the White List, then advertising with Filter Policy = 0x02 (Allow Scan Request from Any, Allow Connect Request from White List), only the Windows and other BlueNRG-MS device can actually connect to my advertising device, but not the Android devices. - Result NOK

I can add that when connecting the Android phone to my BlueNRG device (during 1st test), one of the HCI_LE_META_EVENTs indicates the peer_address and it is different from the device public MAC address (I read elsewhere that it is actually random generated for security reasons). This random MAC address can be added to the White List, and allows my Android phone to be connected in the 2nd test configuration. However, some 10 minutes later, a new random MAC address is generated, and it is no longer possible to connect it again.

Thus the question : Is it possible to configure the BlueNRG device in order to add the public MAC address of an Android phone (or tablet) to the White List so it can connect using Filter Policy = 0x02 ?

5 REPLIES 5
allard
Senior

Bump,

I got the same problem with the blueNRG1

allard
Senior
RBret.1
Associate

Hi allard,

I got a reply from ST Support, and here was their answer :

Hello

The Android devices are not using public address but private resolvable address. In order to use white list mechanism with such addresses , privacy needs to be enabled. The privacy is not supported over BlueNRG-MS (part of IDB006VM). Here a transistion to BlueNRG-M2 module would be required.

According to them, it is necessary to use a BlueNRG-M2 module, so I ordered a couple of these modules to try it out (still waiting for delivery), and indeed your link seems to refer to BlueNRG-2 devices, so hopefully this corrects the problem.

BlueNRG-MS was developed with some old Bluetooth spec, where , the use of the whitelist is not possible when private addresses are used.

Quoted from Bluetooth Core spec:

"Use of the private address for reconnection is limited to use cases where filtering of devices is disabled."

To use BlueNRG-2 would be a proper way for your application.

There are two modes of privacy: device privacy mode and network privacy mode.

A device in device privacy mode is only concerned about the privacy of the device and will accept advertising packets from peer devices that contain

their identity address as well as ones that contain a private address, even if the peer device has distributed its IRK in the past. In network privacy mode, a

device will only accept advertising packets from peer devices that contain private addresses. By default, network privacy mode is used when private addresses are resolved and generated by the Controller.

There is a command to change privacy mode: hci_le_set_privacy_mode

You will need to change to device privacy mode manually.