Android-低功耗蓝牙远程键盘和鼠 [英] Android - Bluetooth Low Energy Remote Keyboard & Mouse

查看:68
本文介绍了Android-低功耗蓝牙远程键盘和鼠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

计划开发一个Android应用程序,该应用程序允许用户通过蓝牙远程控制其键盘和鼠标.我看过一些利用用户家庭网络的应用程序,但想学习一些蓝牙结构.这也将是我在Android中的第一个项目之一,它将帮助我学习使用Android-SDK.

Planning to develop an Android app that allows users to remotely control their keyboard and mouse via bluetooth. I have seen a few apps that utilize the user's home network but would like to learn some bluetooth structure. This is also going to be one of my first projects in Android and will help me learn to use the Android-SDK.

使用蓝牙低功耗连接(BLE)是否合理?我不太了解 将影响按键和鼠标事件的跟踪和通信.

Would it be reasonable to use a Bluetooth LowEnergy connection (BLE)? I dont really understand how the differences of data payload throughput will impact the tracking and communicating of key-presses and mouse events.

有什么建议吗?

推荐答案

当心BLE中的不同角色.在普通的BLE键盘或鼠标中,该设备将称为外围设备,而PC将成为中央设备.一个Central可以连接到一个外围设备,但是一个Peripheral不能直接与另一个外围设备或Central到Central进行连接.但是,对于设备上GATT服务器中包含的数据,PC也将是GATT客户端.您可以在BLE 此处.

Beware of the different roles in BLE. In a regular BLE keyboard or mouse, the device would be what's called a Peripheral, and the PC would be a Central. A Central can connect to a Peripheral, but a Peripheral can not connect directly with another Peripheral, or Central to Central. However, the PC would also be a GATT Client, to the data contained in the GATT Server on the device. You can read more about roles and data transfer in BLE here and here.

但是,最重要的一点是,Android当前仅将API公开为Central,因此PC不可能连接到此类设备.这意味着将无法使用低功耗蓝牙来实现您的应用程序.

However, the most important point is that Android currently only exposes APIs to be a Central, and it is hence impossible for a PC to connect to such device. This means that it will not be possible to implement your application using Bluetooth low energy.

这篇关于Android-低功耗蓝牙远程键盘和鼠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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