BT address Android and linux


#1

Hi,

How to set the BT address in linux and android? The bt address always shows 00:00:00:00:5A:AD

regards,
vinaysimha


#2

Hi Vinaysimha,

In the mainline based kernel I did implemented support for setting the “public address”, so you can use:
btmgmt public-addr 01:02:03:04:05:06

In the Android based systems, this is not yet used, so I believe there should be something called btnvtool or hci_qcomm_init, that should do a similar thing. Unfortunately I don’t know how to use these.

Regards,
Bjorn


#3

bjorn,

i’m using 15.09 release, 4.2.0 kernel, ubuntu 15.04 , by default btmgmt is not available in the bluez version 4.101

so i had downloaded, compiled and installed the bluez
git://git.kernel.org/pub/scm/bluetooth/bluez.git
checked out the released branch 5.37

root@linaro-alip:/home/linaro/bluez/tools# ./btmgmt
[mgmt]# public-addr 58:fc:db:40:05:b1
Set Public Address for hci0 failed with status 0x0c (Not Supported)
[mgmt]#

Do i need to use some specific kernel version where public-addr is supported?

Regards,
vinaysimha


#4

It seems the 4.2 Linaro release uses the user space driven HCI driver;
which does not implement the public-addr operation.

Unfortunately I’m not familiar with the tools available before this; do
you have hci_qcomm_init? Can you execute it?

I can confirm that the in-kernel driver is in the 4.4 based Linaro
release. I’m currently revisiting this patch, and it’s dependencies,
with the goal of getting it merged into mainline.

Regards,
Bjorn


#5

Hi,

Trying to change BT address on Android (5.1), anyone knows how yet?
I have tried btnvtool -b , the value gets stored but address doesn’t change.

Thanks!