paypal / gatt

Gatt is a Go package for building Bluetooth Low Energy peripherals
BSD 3-Clause "New" or "Revised" License
1.14k stars 285 forks source link

Why GATT need full control of HCI device and how about BLE work before HCI_USER_CHANNEL #83

Open Yushenbo opened 7 years ago

Yushenbo commented 7 years ago

As you mentioned: We must need patch the HCI_USER_CHANNEL relevant commits, but how do kernel version before 3.13 support BLE?

roylee17 commented 7 years ago

You can use HCI_RAW_CHANNEL instead, but then you'll have two stacks manage the controller at the same time.

Kernel has link manager to manage links/connections. But BLE has been a moving target. Spec is evolving, and hardware vendors try to add new features/functions which was not standardized in spec. To keep up with the changes, BT stack in kernel is also evolving. Depends on which revision you're running, sometimes you have different behavior or different feature supported.

HCI_USER_CHANNEL allows us to have full and "exclusive" control of the controller in user space.