Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 5 static bluetooth MAC address for BLE advertising

Android 5 introduces BLE MAC address rotating for increased privacy. Every time when calling BluetoothLeAdvertiser.startAdvertising(), the MAC-address is changed.

Is it possible to disable address rotating, and just use the same MAC address during the entire lifetime of BluetoothLeAdvertiser?

like image 986
MStone Avatar asked Feb 19 '15 09:02

MStone


People also ask

Do BLE devices have MAC address?

A Bluetooth low energy device is uniquely identified by it's address (in the Android API they call this the MAC address and denote it as colon separated hex values e.g. 11:aa:22:bb:33:cc). But to uniquely identify a BLE address you need to know if it's a public or a private address.

Is MAC address same as Bluetooth address?

So, what is a Bluetooth Address? A Bluetooth address sometimes referred to as a Bluetooth MAC address, is a 48-bit value that uniquely identifies a Bluetooth device. In the Bluetooth specification, it is referred to as BD_ADDR .


1 Answers

The MAC Address is a physical address and does not change. In BLE terminology, it is the Public Device Address or BD_ADDR for BR/EDR. I haven't tried it, but reading it with readAddress() should return the same value each time.

What the Android's BLE framework does is NOT use that address when advertising. It rather enables privacy by using Private Resolvable Addresses which may change every few minutes or so but still allow bonded devices to recognize it using the IRK exchanged at bonding.

For obvious privacy reasons, Android's BLE framework does not allow you to set the Controller to use the public address when advertising. So you cannot disable the "address rotating".

like image 88
Bogdan Alexandru Avatar answered Sep 21 '22 01:09

Bogdan Alexandru