Re: Setting bd address in the device-tree era

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/12/2018 05:48 PM, Marcel Holtmann wrote:
When using newer upstream Linux kernels on Raspberry Pi 3+ that have the brcm,bcm43438-bt serial slave device-tree entries, all devices get the same BD address 43:45:C0:00:1F:AC.

What is the recommend way of fixing that up nowadays?

The vendor's standard start-up script makes up a BD address derived from SoC serial number, and pass that as parameter to hciattach.
But that doesn't work when the kernel is managing the hci connection instead.
And cannot find any device-tree parameter to pass address either.
is it actually loading the Bluetooth firmware for the RPi since once that is loaded the address should be configured correctly. Or is the RPi 3+ different in this regard?

Yes. It loads the firmware file in /lib/firmware/brcm fine.

==
Aug 12 15:06:46 raspberrypi kernel: [    7.172969] Bluetooth: hci0: BCM: chip id 107 Aug 12 15:06:46 raspberrypi kernel: [    7.175092] Bluetooth: hci0: BCM: features 0x2f Aug 12 15:06:46 raspberrypi kernel: [    7.198320] Bluetooth: hci0: BCM4345C0 Aug 12 15:06:46 raspberrypi kernel: [    7.198343] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
==

And apart from the BD address, it works fine.

If this is really always the same address with the correct firmware loaded, then the driver needs to set the QUIRK_INVALID_BDADDR to indicate that the device is missing the address configuration.

Apparently, newer versions of the bluetooth firmware are known broken to not read the correct MAC from OTP.

https://github.com/raspberrypi/firmware/issues/860

And they now just workaround that in the startup script that launches hciattach.


Wonder if there shouldn't be a device-tree property offered to specify the BD address, so the boot firmware could set the address. They already seem to do something similar for the Ethernet MAC address ( https://github.com/raspberrypi/firmware/issues/613 ).


Yours sincerely,

Floris Bos




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux