窗户蓝牙autopairing或禁用认证 [英] Windows bluetooth autopairing or disable authentication

查看:1000
本文介绍了窗户蓝牙autopairing或禁用认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要窗口与蓝牙设备配对自动。我不希望用户必须点击Windows端什么。服务器将实际位于什么地方,用户无法得到。其配对用户侧的罚款。 Windows只是需要接受进来无需用户输入的任何请求。

我怎样才能做到这一点?注册表黑客?更换一个dll?硬件更改(autopairing加密狗或东西)?

有没有给我的工具照顾这任何SDK?

目前我使用bluecove在Windows机器上微软堆栈的顶部。我试过了Widcomm堆栈还没有运气。

这设备将用于连接的主要协议是RFCOMM。

编辑:
使用接受的答案下面我想出了这个code,即自动对

 使用系统;
使用System.Collections.Generic;
使用System.Linq的;
使用System.Text;
使用InTheHand.Net.Bluetooth;
使用的System.Threading;BT空间
{
    类BluetoothAutoSSP
    {
        公共静态无效的主要()
        {
            BluetoothAutoSSP C =新BluetoothAutoSSP();            事件处理< BluetoothWin32AuthenticationEventArgs>处理器=新的EventHandler< BluetoothWin32AuthenticationEventArgs>(c.handleRequests);
            BluetoothWin32Authentication认证=新BluetoothWin32Authentication(处理);            而(真)
            {
                Thread.sleep代码(10);
            }
        }        公共无效handleRequests(对象的事情,BluetoothWin32AuthenticationEventArgs参数)
        {
            args.Confirm = TRUE;
        }
    }
}


解决方案

有关Microsoft蓝牙堆栈:同时支持传统蓝牙配对以及2.1的安全简易配对使用 BluetoothRegisterForAuthenticationEx 功能,在回调函数响应通过调用 BluetoothSendAuthenticationResponseEx

更多信息请访问 BluetoothWin32Authentication 32feet.NET文档描述的方式处理,在32feet.NET蓝牙库.NET,我的文档的蓝牙在Windows 7 和MSDN如: BluetoothRegisterForAuthenticationEx 等。

BTW的Widcomm做的的有一个程序化的方式来响应配对(它确实有开始配对的方法)。 BlueSoleil的确实有一个明显的API

I need windows to automatically pair with bluetooth devices. I don't want the user to have to click anything on the windows side. The server will be physically located somewhere the user cannot get to. Having to pair on the user side is fine. Windows just needs to accept any requests that come in without user input.

How can I accomplish this? Registry hacks? Replace a dll? A Hardware change (autopairing dongle or something)?

Is there any SDK that will give me the tools take care of this?

Currently I am using bluecove on the windows machine on top of Microsoft stack. I tried the Widcomm stack also with no luck.

The primary protocol that devices will use to connect is RFCOMM.

EDIT: using the accepted answer below I came up with this code, that auto-pairs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InTheHand.Net.Bluetooth;
using System.Threading;

namespace BT
{
    class BluetoothAutoSSP
    {
        public static void Main()
        {
            BluetoothAutoSSP c = new BluetoothAutoSSP();

            EventHandler<BluetoothWin32AuthenticationEventArgs> handler = new         EventHandler<BluetoothWin32AuthenticationEventArgs>(c.handleRequests);
            BluetoothWin32Authentication authenticator = new BluetoothWin32Authentication(handler);

            while (true)
            {
                Thread.Sleep(10);
            }    
        }

        public void handleRequests(Object thing, BluetoothWin32AuthenticationEventArgs args)
        {
            args.Confirm = true;
        }


    }
}

解决方案

For the Microsoft Bluetooth stack: To support both traditional Bluetooth pairing as well as v2.1's Secure Simple Pairing use the BluetoothRegisterForAuthenticationEx function and in your callback function respond by calling BluetoothSendAuthenticationResponseEx.

See more at BluetoothWin32Authentication 32feet.NET docs which describes the way to handle that in the 32feet.NET Bluetooth library for .NET, my doc Bluetooth in Windows 7, and MSDN e.g. BluetoothRegisterForAuthenticationEx etc.

BTW Widcomm does not have a programatic way to respond to pairing (it does have a method to initiate pairing). BlueSoleil does have an API apparently.

这篇关于窗户蓝牙autopairing或禁用认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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