Hi guys,
When changing the BDADDR why must I down/up the device after doing so?
is it not possible/sensible to change it whilst remaining up?
Could it be possible to allow the BDADDR to be written whilst the device
is down, and inject it when it comes up? Would a patch to do this be
acceptable?
Otherwise, the sequence for programming the BDADDR looks a bit naff;
hciconfig hci0 up
bdaddr -i hci0 <foo>
hciconfig hci0 down
hciconfig hci0 up
To me, it would make more sense if I could do:
hciconfig hci0 down
bdaddr -i hci0 <foo>
hciconfig hci0 up
-Ian
On 08/07/17 08:54, Marcel Holtmann wrote:
> there is a btmgmt public-addr command that does this correctly if the hdev->set_bdaddr is supported by the hardware. Using the bdaddr tool is a hack.
Oh, great - missed that, thanks.
I'll implement that in the driver.
-Ian
Hi Ian,
> When changing the BDADDR why must I down/up the device after doing so?
> is it not possible/sensible to change it whilst remaining up?
>
> Could it be possible to allow the BDADDR to be written whilst the device
> is down, and inject it when it comes up? Would a patch to do this be
> acceptable?
>
> Otherwise, the sequence for programming the BDADDR looks a bit naff;
>
> hciconfig hci0 up
> bdaddr -i hci0 <foo>
> hciconfig hci0 down
> hciconfig hci0 up
>
> To me, it would make more sense if I could do:
>
> hciconfig hci0 down
> bdaddr -i hci0 <foo>
> hciconfig hci0 up
there is a btmgmt public-addr command that does this correctly if the hdev->set_bdaddr is supported by the hardware. Using the bdaddr tool is a hack.
Regards
Marcel