mbox series

[BlueZ,0/1] Added random address in mesh HCI initialization to prevent error 0x12 when enabling/disabling LE scans

Message ID 20200819082822.64903-1-daan@dptechnics.com (mailing list archive)
Headers show
Series Added random address in mesh HCI initialization to prevent error 0x12 when enabling/disabling LE scans | expand

Message

Daan Pape Aug. 19, 2020, 8:28 a.m. UTC
I had compiled bluez for OpenWRT and was running the bluetooth-meshd
daemon with a Fanstel BT680T module which implement the Bluetooth 5.0
core specification.

The daemon did not properly start and failed with error:

LE Scan enable failed (0x12)

This error is described on page 2496 of the Bluetooth Core Specification
Version 5.2 and is caused by the fact that no random address was
initialized. After the valuable input of Brian Gix on my first patch, I
have now prepared this patch.

I have now added a random address intialization after the HCI was reset
in the configure_hci function. The HCI layer is now correctly initialized
and no 0x12 errors are thrown.

This is the first time that I contribute to Bluez so please forgive me
if I made any styling mistake in the patch format. I also did not include
my details in the 'AUTHORS' file just yet as I first wanted to wait
for your reaction. In case the patch is accepted my name can be added
to the 'AUTHORS' file as:

Daan Pape <daan@dptechnics.com>

Please do not hesitate to ask any further questions if neccesary.

Kind regards,
Daan Pape

Daan Pape (1):
  Added random address in mesh HCI initialization to prevent error 0x12
    when enabling/disabling LE scans

 mesh/mesh-io-generic.c | 9 +++++++++
 1 file changed, 9 insertions(+)