Bluetooth: hci_nokia: select BT_BCM for btbcm_set_bdaddr()
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: hci_nokia: select BT_BCM for btbcm_set_bdaddr()
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via BT_BCM config option.
--- drivers/bluetooth/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +1 -0
@@ -98,6 +98,7 @@ config BT_HCIUART_NOKIA depends on BT_HCIUART_SERDEV depends on PM select BT_HCIUART_H4 + select BT_BCM help Nokia H4+ is serial protocol for communication between Bluetooth device and host. This protocol is required for Bluetooth devices
Signature · 1 line
2.13.3
Hi,
Quoted 6 lines · Marcel Holtmann
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>
-- Sebastian
Quoted 23 lines
--- drivers/bluetooth/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/bluetooth/Kconfig +1
-0@@ -98,6 +98,7 @@ config BT_HCIUART_NOKIA depends on BT_HCIUART_SERDEV depends on PM select BT_HCIUART_H4 + select BT_BCM help Nokia H4+ is serial protocol for communication between Bluetooth device and host. This protocol is required for Bluetooth devicesSignature · 6 lines
2.13.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Marcel Holtmann
maintainerHi Sebastian,
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>
btw. we need to also provide the set_bdaddr for TI chips.
Regards
Marcel
Hi,
Quoted 10 lines · Marcel Holtmann
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.
The TI based chip in Nokia N950 has a proper address configured, so it works without set_bdaddr (it would still be nice of course). It also seems to be missing for hci_ll, though. So the required command is completly unknown?
-- Sebastian
Marcel Holtmann
maintainerHi Sebastian,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?
are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
Where do we have the firmware files for the Nokia devices? Don't they contain a command for setting the BD_ADDR. Also the original Nokia driver had code to re-write that command inline while loading the firmware.
Regards
Marcel
Marcel Holtmann
maintainerHi Sebastian,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?
actually a bunch of the TI HCI vendor command documents are public. We just need to figure out which one does the job. For the WiLink it is HCI_VS_Write_BD_Addr (0xFC06) which just takes the BD_ADDR as parameter.
Regards
Marcel
Hi,
Quoted 11 lines · Marcel Holtmann
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.
Quoted 8 lines
Quoted 4 lines
The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
I can check this later.
Quoted 1 line
Where do we have the firmware files for the Nokia devices?
For N950 I extracted it out of the following rpm:
Quoted 1 line
Don't they contain a command for setting the
BD_ADDR.
I did not check, since the firmware file is not device specific as far as I know.
Quoted 2 lines
Also the original Nokia driver had code to re-write that command inline while loading the firmware.
The address injection happens in hardware specific code (stock driver supports TI, Broadcom & CSR). In opposit to Broadcom and CSR the TI specific one does not change the address:
-- Sebastian
Hi,
Quoted 17 lines · Sebastian Reichel
Quoted 16 lines · Marcel Holtmann
Quoted 15 lines
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?
Quoted 5 lines
Quoted 3 lines
are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
I can check this later.
The BD address on my N950 starts with B4:EE:D4, which belongs to TI as far as I can see. Note, that N950 is a developer only device.
-- Sebastian
Marcel Holtmann
maintainerHi Sebastian,
Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.Quoted 8 lines
Quoted 4 lines
The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
I can check this later.
Quoted 1 line
Where do we have the firmware files for the Nokia devices?
Quoted 8 lines
For N950 I extracted it out of the following rpm:
Quoted 1 line
Don't they contain a command for setting the
BD_ADDR.I did not check, since the firmware file is not device specific as far as I know.
doen't matter since the old Nokia written driver hacked it from a sysfs file and the address came from the secure flash area.
Quoted 8 lines
Quoted 2 lines
Also the original Nokia driver had code to re-write that command inline while loading the firmware.
The address injection happens in hardware specific code (stock driver supports TI, Broadcom & CSR). In opposit to Broadcom and CSR the TI specific one does not change the address:
As far as I know they rewrite the Write BD_ADDR command of each vendor at the time before they send to the hardware.
Regards
Marcel
Marcel Holtmann
maintainerHi Sebastian,
Quoted 20 lines
Quoted 20 lines
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
Quoted 5 lines
Quoted 1 line
I can check this later.
The BD address on my N950 starts with B4:EE:D4, which belongs to TI as far as I can see. Note, that N950 is a developer only device.
as long as not every N950 now has the same address. But I think if Nokia would have shipped the device then it would have had to be a Nokia address.
Regards
Marcel
Hi,
Quoted 28 lines · Marcel Holtmann
Quoted 28 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>btw. we need to also provide the
set_bdaddrfor TI chips.Quoted 8 lines
Quoted 4 lines
The TI based chip in Nokia N950 has a proper address configured, so it works without
set_bdaddr(it would still be nice of course). It also seems to be missing forhci_ll, though. So the required command is completly unknown?are these a TI address or a Nokia address? I doubt Nokia would have actually shipped any hardware using an IEEE assigned address to TI.
I can check this later.
Quoted 1 line
Where do we have the firmware files for the Nokia devices?
For N950 I extracted it out of the following rpm:
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Don't they contain a command for setting the
BD_ADDR.I did not check, since the firmware file is not device specific as far as I know.
doen't matter since the old Nokia written driver hacked it from a sysfs file and the address came from the secure flash area.
The sysfs "just" puts the address into platform_data for their h4p driver. It does not take care of applying it to the hardware. That is the job of their h4p driver. Here is the code for the sysfs file:
Quoted 11 lines
Quoted 8 lines
Quoted 2 lines
Also the original Nokia driver had code to re-write that command inline while loading the firmware.
The address injection happens in hardware specific code (stock driver supports TI, Broadcom & CSR). In opposit to Broadcom and CSR the TI specific one does not change the address:
As far as I know they rewrite the Write
BD_ADDRcommand of each vendor at the time before they send to the hardware.
You can clearly see that they modify the address in the hardware specific firmware files for Broadcom and CSR:
https://github.com/nemomobile/kernel-adaptation-n950-n9/blob/master/drivers/bluetooth/hci_h4p/fw-bcm.c
https://github.com/nemomobile/kernel-adaptation-n950-n9/blob/master/drivers/bluetooth/hci_h4p/fw-csr.c
But there is no such code for TI (except for a comment):
/* Check if this is bd_address packet */
I think they just forgot to implement it and since the comment has no XXX/TODO/FIXME prefix nobody noticed it.
-- Sebastian
Johan Hedberg
AppliedHi Marcel,
Quoted 9 lines · Marcel Holtmann
The Nokia devices require the setup of its Public Bluetooth Device Address and for that it is required to depend on vendor specific commands. For Broadcom based Nokia devices, that is part of btbcm module and can be selected via
BT_BCMconfig option.Signed-off-by Marcel Holtmann <[email protected]>--- drivers/bluetooth/Kconfig | 1 + 1 file changed, 1 insertion(+)
Applied to bluetooth-next. Thanks.
Johan