Operating central and peripheral roles concurrently

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

 



Hi,

I see someone has already asked this question not long ago but I am
seeing the same problem.  I have an embedded platform running 4.9
kernel and Bluez 5.50 and the bluetooth device is the BroadCom
BCM4343W which supports bluetooth 4.1.

I can run the btgatt-server and example-gatt-server fine and connect
to it from my phone using nRF and read the relevant attributes.  This
I believe is where my device is in the peripheral role.  If I close
the GATT server down I can use gatttool to query the characteristics
of another GATT server setup on my PC, I think this is then acting as
central role.

But if I can't do both at the same time, once the GATT server is
running and I try and query the other GATT server, I get
root@mach-cw-rnet-ppm-1717:~# gatttool -b 5D:3C:72:B5:23:BE -t random
--characteristics
connect error: Connection refused (111)

I've noticed that if I start bluetoothctl whilst the GATT server is
running it looks as if it has connected to my phone

root@mach-cw-rnet-ppm-1717:~# bluetoothctl
Agent registered
[LG K8 (2017)]#

Maybe this is expected but it does look like it has made a connection
back to the phone and I'm wondering if this is stopping it from acting
in the central role?

Not really knowing much about the bluetooth stack I was wondering if
anyone has any pointers on how to debug this or let me know if I'm
doing something wrong?  I'm quite comfortable putting debug code into
the kernel and/or bluez5 and recompiling to get more information if
required.

Any help would be greatly appreciated,
Martin.



[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