问题
Using BlueZ-5.43, Nordic nRF52832 and Raspberry Pi Raspbian.
I can create an l2cap socket and perform service discovery and attribute read and write operations on characteristics. However, this solution by-passes creating a connection via the HCI and subsequently uses defaults for parameters such as supervision timeout and slave latency.
Going through hci.c using hci_le_create_conn allows me to override these defaults, but I get a handle number 64 with no obvious means to use this handle for service discovery or characteristic interaction. The utility lsof does not indicate an open file with the new connection as it does when I open an l2cap socket directly.
How do you read/write to the handle returned by hci_le_create_conn?
回答1:
The solution is to use ACL packets.
来源:https://stackoverflow.com/questions/44702235/how-do-you-read-write-to-the-handle-returned-by-hci-le-create-conn