How do you read/write to the handle returned by hci_le_create_conn?

♀尐吖头ヾ 提交于 2019-12-25 08:37:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!