Is it possible with bluez under Linux to connect to multiple classic and low energy devices at the same time? The bluez site isn't very helpful providing information like this.
相关问题
- what is the difference between bounded and unbound
- Exchange data between google-glass and a android d
- Sending and Receiving an Invitation with Multipeer
- CoreBluetooth - Can connectPeripheral be called mu
- How can I establish an AVRCP connection from Windo
相关文章
- Android 4.4: Bluetooth Low Energy; Connect without
- Why the address of my BluetoothDevice changes ever
- Detect or Approximate Bluetooth Latency on Android
- Android Bluetooth - Paired vs Connected, what'
- bluetoothctl No default controller available
- Bluetooth LE Scanning Sometimes Doesn't Find D
- Can we wakeup the Android app via bluetooth or BLE
- UWP BLE device pairing
Yes, I've managed to connect to 7 low energy devices at the same time. The maximum varies depending on the hardware you're using. You can also connect to multiple classic devices as well.
Here's some pseudo/snippet of C I used for connecting via L2CAP:
My code is a mix of C and Python so I tried to restructure it so it's just the C parts. Everything was taken from reading the Bluez source code, specifically the
gatttool
.UPDATE: There's a bug in the linux kernel's bluez code in versions 3.4 and prior when dealing with L2CAP sockets. Essentially, if you have more than one connection, it will mix them up so you get all your data on the last connection made. So, the code I gave will only work on kernels 3.4 and prior if you only make one L2CAP connection.