简体   繁体   English

预配对蓝牙设备

[英]Pre-pairing bluetooth devices

I would like to be able to pre-pair bluetooth devices, to save the step of user confusion when using the app. 我希望能够预先配对蓝牙设备,以便在使用应用程序时节省用户混淆的步骤。 I have discovered that there is a patent for System, method and apparatus for pre-pairing bluetooth enabled devices . 我发现有用于预配对蓝牙设备的系统,方法和装置的专利。

I am looking at pairing an array of android devices with an array of embedded devices, so when the android device is set up, I can pre-pair it with the devices it needs to communicate with. 我正在寻找将一系列Android设备与一系列嵌入式设备配对,因此当设置Android设备时,我可以预先将它与需要与之通信的设备配对。 I have considered maintaining a list of MAC-addresses that can be downloaded and updated by the app. 我考虑过维护一个可以由应用程序下载和更新的MAC地址列表。

Is there a way to pair two devices without having to bring them into contact? 有没有办法配对两个设备而不必让它们接触?

My memory is not exact, it's a while ago I poked around in the Bluetooth stack, however, I don't think this is possible. 我的记忆并不确切,不久之前我在蓝牙堆栈中探索过,但是,我不认为这是可能的。

Basically there is a white list (text file pretty much) which is kept by the system with devices that may connect to your phone, in order to access that white list outside of the Bluetooth api you need to be platform manufacturer. 基本上有一个白名单(文本文件相当多),由系统保存可能连接到您的手机的设备,以便访问您需要作为平台制造商的蓝牙API之外的白名单。 The Bluetooth Api is strongly guarded (by the specification), if you don't fulfill it you can't say your device supports Bluetooth. 蓝牙Api受到严格保护(按照规范),如果您不满足,则无法说您的设备支持蓝牙。 Pairing is an important part of the Bluetooth security model, I doubt even an oem would be allowed to do this. 配对是蓝牙安全模型的重要组成部分,我怀疑即使是oem也可以这样做。

One thing you could look into are Bluetooth low energy devices, those don't require pairing prior to connection (you should be able to connect if you have the MAC address), only Bluetooth classic requires pairing. 您可以考虑的一件事是蓝牙低功耗设备,那些在连接之前不需要配对(如果您有MAC地址,您应该可以连接),只有蓝牙经典需要配对。

More info: https://developer.android.com/guide/topics/connectivity/bluetooth-le.html 更多信息: https//developer.android.com/guide/topics/connectivity/bluetooth-le.html

No its not possible unless you make changes to the ROM. 除非你对ROM进行更改,否则不可能。

If the use-case supports,you can have ble devices advertising data in a pre-defined format so that the app detect your devices.Once you have recognized your devices,you can internally send a pairing request. 如果用例支持,您可以让设备以预定义的格式宣传数据,以便应用程序检测您的设备。一旦您识别了设备,您就可以在内部发送配对请求。

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

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