在不配对的情况下在android中指定链接键 [英] Specifying a link key in android without pairing

查看:19
本文介绍了在不配对的情况下在android中指定链接键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定 android 中是否有一种方法可以将特定的链接密钥与现有的远程蓝牙设备实例相关联.

I am trying to determine if there is a way in android to associate a specific link key with an already existing remote bluetooth device instance.

基本上我想要做的是与不可发现的蓝牙设备建立连接,而无需经过配对或重新配对过程.

Essentially what I want to do is create a connection with a non-discoverable bluetooth device without going through the pairing or re-pairing procedure.

我无法在标准配对程序中与设备建立链接密钥,因为我使用的是自定义专有配对机制.我更愿意在不使用本机代码的情况下完成这项任务,但如果我必须这样做,我会这样做.

I am not able to establish the link key with the device in a standard pairing procedure because I am working with a custom proprietary pairing mechanism. I would prefer to accomplish this task without using native code, but if I have to then I will.

推荐答案

没有公共 api 机制来将链接密钥与设备相关联,而无需经过配对过程.

there is no public api mechanism to associate a link key with a device without going through the pairing process.

配对后,一旦设备绑定,此关联将自动创建(也称为绑定),然后进一步的连接将重新使用之前生成的链接密钥.

After pairing this association is automatically created (aka bonding) once devices are bonded then further connection will re-use the link key that was generated previously.

即使设备不可发现,如果您知道设备蓝牙地址,您仍然应该能够与它连接绑定/配对.

even if device is non-discoverable you should still be able to connect bond / pair with it, if you know the device bluetooth address.

通过更改底层android bluez 代码的内部/私有机制,并连接以提供预先生成的链接密钥等在理论上是可能的,这将是一个困难的项目和自定义解决方案.那是假设你有链接键来馈送/关联.注意 - 链接键是两个设备的设备地址以及设备时钟等的函数.蓝牙

internal / private mechanism by changing the underlying android bluez code, and hooking up to feed a pre-generated link key etc is theoretically possible and it will be a difficult project and a custom solution. that is assuming that you have the link keys to feed / associate. note - link key is a function of the device address of both devices in addition to device clock etc. bluetooth

这篇关于在不配对的情况下在android中指定链接键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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