您如何读写hci_le_create_conn返回的句柄? [英] How do you read/write to the handle returned by hci_le_create_conn?

查看:157
本文介绍了您如何读写hci_le_create_conn返回的句柄?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用BlueZ-5.43,北欧nRF52832和Raspberry Pi Raspbian.

Using BlueZ-5.43, Nordic nRF52832 and Raspberry Pi Raspbian.

我可以创建一个l2cap套接字,并执行服务发现以及对特征进行属性读取和写入操作.但是,该解决方案绕过了通过HCI创建连接的过程,随后将默认值用于诸如监督超时和从属延迟之类的参数.

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.

使用hci_le_create_conn遍历hci.c可使我覆盖这些默认值,但是我得到的句柄号为64,但没有明显的方式使用此句柄进行服务发现或特性交互.实用程序lsof不会像我直接打开l2cap套接字时那样显示具有新连接的打开文件.

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.

您如何读写hci_le_create_conn返回的句柄?

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

推荐答案

解决方案是使用ACL数据包.

The solution is to use ACL packets.

这篇关于您如何读写hci_le_create_conn返回的句柄?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆