2019-03-05 10:54:26

by Martin Townsend

[permalink] [raw]
Subject: Operating central and peripheral roles concurrently

Hi,

I sent an email November last year about Operating central and
peripheral roles concurrently
https://www.spinics.net/lists/linux-bluetooth/msg77673.html

And although we had the dual roles working thanks to the suggested
patch the dev team has reported that if the device (central) connects
to the board (peripheral) first, and then having the board (central)
connecting to a sensor (peripheral), dual roles work fine.

But the other way around, board (central) connects to a sensor (peripheral),
advertisements stop being sent and no other device can no longer connect to
the board (peripheral).

Here's the hcidump trace after running 'hciconfig hci0 leadv 1':

HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
0000: 01
HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x00

Then within a second we get the following in hcidump which shows it
being disabled

HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
0000: 00
HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x00

I would really appreciate it if someone could point me to the relevant
place in the Kernel code where this could be occurring so I can start
to debug this or even suggest a patch I could try. The kernel version
is v4.9.

Many Thanks,

Martin.