简体   繁体   English

Android低功耗蓝牙低功耗外设-绑定后连接丢失

[英]Android Bluetooth Low Energy peripheral - Connection loss after bonding

I am implementing Bluetooth Low Energy's HID over GATT (HOGP) profile on Android Lollipop. 我正在Android Lollipop上实现Bluetooth Low Energy的GATT上的HID(HOGP)配置文件。 My target is to use the phone as a keyboard/mouse, which can just plug and play with the default BLE (HID) drivers in Windows 8.1 laptop. 我的目标是将手机用作键盘/鼠标,它可以随Windows 8.1笔记本电脑中的默认BLE(HID)驱动程序即插即用。 The Android phone is supposed to act as BLE peripheral and the laptop should be in BLE central role. Android手机应该充当BLE外围设备,而笔记本电脑应充当BLE的核心角色。

Currently, I am able to establish a very short connection with the laptop. 目前,我能够与笔记本电脑建立非常短的连接。 But just right after I enter the passkeys, and bonded successfully with the laptop, the BLE connection will be lost. 但是就在我输入密码并成功与笔记本电脑绑定后,BLE连接将丢失。 Have anyone faced this kind of problems before? 有人遇到过此类问题吗? Or have any solutions on it? 或对此有任何解决方案?

Also, I failed to add generic access service to the gatt server in Android. 另外,我无法向Android中的gatt服务器添加通用访问服务。 I am curious if GAP service is included in Android BLE communication by nature? 我很好奇Android BLE通信中是否自然包含GAP服务? The reason I want to include this service is for defining the "device name", "appearance", and the "peripheral connection parameter update" characteristics. 我之所以要包含此服务,是为了定义“设备名称”,“外观”和“外围连接参数更新”特征。 How I can do so? 我该怎么做?

您的系统是否固定好,我看到类似的东西,在绑定后,我的设备将进入配对列表,然后大约20秒后,蓝牙开/关按钮将自动切换到关闭位置,等待10秒,然后回到原位,我的设备不见了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM