什么时候的android显示配对对话框使用不安全的RFCOMM蓝牙插座是什么时候? [英] When does android show a pairing dialog when using insecure RFCOMM bluetooth sockets?

查看:148
本文介绍了什么时候的android显示配对对话框使用不安全的RFCOMM蓝牙插座是什么时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过蓝牙连接的P2P网络的目的2配对的Andr​​oid设备。不需要MITM保护。 Android已经在 createInsecureRfcommSocketToServiceRecord listenUsingInsecureRfcommWithServiceRecord 这个(因为API等级10),它完美的作品对现代设备。然而,在银河王牌(安卓2.3.3 = API级别10,与Galaxy Nexus的连接),它创建了一个配对对话框。发生这种情况无论在传入和传出连接。 (更新:更新银河王牌到Android 2.3.6似乎解决了这个问题有没有一个具体的Andr​​oid版本,始终/从不做到这一点。?)

I am trying to connect two unpaired android devices via Bluetooth for P2P networking purposes. MitM protection is not required. Android has the createInsecureRfcommSocketToServiceRecord and listenUsingInsecureRfcommWithServiceRecord for this (since API level 10), which works perfectly on modern devices. However, on a Galaxy Ace (Android 2.3.3 = API level 10, connecting with a Galaxy Nexus), it creates a pairing dialog. This happens both on incoming and outgoing connections. (Update: Updating the Galaxy Ace to Android 2.3.6 apparently fixes the problem. Is there a specific Android version that always/never does this?)

在配对被接受,连接工作。出于这个原因,我认为这是不相关的问题40101:createInsecureRfcommSocketToServiceRecord导致的配对对话框安卓4.2 应该只有在服务记录不存在发生。

After the pairing is accepted, the connection works. For this reason, I think this is not related to Issue 40101: createInsecureRfcommSocketToServiceRecord causes pairing dialog on Android 4.2 which should only happen if the service record does not exist.

我认为是无法避免的设备此对话框,在其中谈到了(如果可以,解释如何做,这是一个有效的答案)。出于这个原因,我想知道什么时候被带到这样的对话了。我没有找到在Android Java源东西(它去当地pretty的快)。我怀疑它有什么用蓝牙版本,因为王牌拥有蓝牙2.1这是为了支持所需只是工作连接。

I assume this dialog cannot be avoided on devices where it comes up (if it can, explaining how to do this is a valid answer). For this reason, I would like to know when such a dialog is brought up. I did not find anything in the Android Java source (it goes native pretty quickly). I doubt it has anything to do with the Bluetooth version, since the Ace has Bluetooth 2.1 which is supposed to support the required "just works" connections.

如果有什么事情,让我来检测设备是否支持无连接,弹出对话框,或者如果它显然是固定在一定的Andr​​oid版本,这将极大地帮助我。

If there is anything that would allow me to detect whether a device will support connections without popping the dialog, or if it was clearly fixed to a certain android version, that would immensely help me.

另外,我正在寻找一种方式来轻松地<一href="http://stackoverflow.com/questions/16381416/is-there-a-way-to-set-app-compatibility-per-android-version-not-api-level-in-t">exclude这种设备。

Also, I am looking for a way to easily exclude such devices.

推荐答案

目前我有同样的问题,因为你。我已经开发了一个应用程序,以BT终端之间交换信息,我测试它在不同的手机(我有S3,S2,S加,Nexus One的和Galaxy Y),以analize的行为。手机有这个功能:

Currently I have the same problem as you. I've developed an application to exchange messages between BT terminals and I'm testing it on different phones ( I have S3, S2, S plus, Nexus One and Galaxy Y) to analize the behaviour. Phones have this specs:

  • 三星S2:自定义ROM(Android的V4.2.1) - 根植
  • 三星S3:股票ROM(Android的V4.1.2)
  • 三星S +:自定义ROM(Android的V4.1.2) - 根植
  • 三星GY:自定义ROM(安卓v2.3.6) - 根植
  • 的Nexus One:股票ROM(安卓v2.3.6) - 根植

据我可以告诉你,从我的经验,S2和S3一段时间后开始出现,即使它们已经配对配对对话和交换数据。这一切发生的时候,我有我的测试平台这两款手机中的一个,其他人都做工精细,从不要求配对(expecially的Nexus One,有一个完美的行为)。

As far i can tell you from my experience, S2 and S3 after some time start to show the pairing dialog even if they are already paired and exchanging data. This happens all the time I include one of this two phones in my testbed, others are working fine and never ask for pairing ( expecially Nexus One that has a flawless behaviour).

我做了长时间运行测试(4-6小时),我仍然想不通为什么有时候3小时后,该电话询问配对。有时10分钟后。

I have made long running tests (from 4 to 6 hours) and I still can't figure out why this phones ask for pairing sometimes after 3 hours.. sometimes after 10 minutes.

这是我想在这里你出去的唯一的事情是,即使u的使用不安全的连接,你仍然可以要求进行配对人机交互。给看看那个(从 http://en.wikipedia.org/wiki/Bluetooth 拍摄):

The only thing that i would like to point you out is that even if u are using insecure connection you could still be asked for human interaction for pairing. Give a look at that (taken from http://en.wikipedia.org/wiki/Bluetooth) :

只是工作:作为顾名思义,这种方法很好用。没有用户   相互作用是必需的;然而,的设备可能会提示用户   确认配对过程。此方法通常用于通过耳机   具有非常有限的IO能力,并且比所述固定更安全   其通常用于遗留配对通过这套销机构   有限的设备。这种方法在中间不提供人(MITM)   保护。

Just works: As implied by the name, this method just works. No user interaction is required; however, a device may prompt the user to confirm the pairing process. This method is typically used by headsets with very limited IO capabilities, and is more secure than the fixed PIN mechanism which is typically used for legacy pairing by this set of limited devices. This method provides no man in the middle (MITM) protection.

这篇关于什么时候的android显示配对对话框使用不安全的RFCOMM蓝牙插座是什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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