在Windows上访问蓝牙虚拟COM口无需手动配对 [英] Accessing Bluetooth virtual COM port on Windows without manual pairing

查看:952
本文介绍了在Windows上访问蓝牙虚拟COM口无需手动配对的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过在Windows中创建虚拟COM端口连接到蓝牙设备。这很容易当端口已手动配对过程中已经创建成功了。不过,我想我的应用程序从设备的手动配对缓解的用户。我想present范围内的所有设备,允许用户选择一个,然后创建与所选设备连接的虚拟COM端口。我没有试图避免配对过程本身,而是我想我的应用程序来调用它。

I need to connect to a Bluetooth device through virtual COM port created in Windows. It's easy when the port has been already created during manual pairing procedure. But I would like my application to relieve an user from the manual pairing of a device. I would like to present all devices in the range, allow user to chose one, and then create virtual COM port connected with the selected device. I'm not trying to avoid the pairing procedure itself, but rather I would like to invoke it by my application.

我开始熟悉微软蓝牙API 。然后有些疑惑起来。我一直在想怎样就怎样,如果有些用户将使用不同的(比微软的)蓝牙堆栈?是微软的API真正的蓝牙API,它已经被其他蓝牙堆栈供应商来实现?或者更确切地说,每个供应商都有自己的API和微软的只是许多其他的吗?

I started getting familiar with Microsoft Bluetooth API. And then some doubts arose. I've been wondering what happen if some user would use different (than Microsoft's) Bluetooth stack? Is the Microsoft's API the real Bluetooth API, which have to be implemented by any other Bluetooth stack provider? Or rather each provider has its own API, and the Microsoft's is only one of many other?

推荐答案

谢谢大家对宝贵意见。我想总结一下我到目前为止发现的。微软蓝牙API不是操作系统的API。书面反对它的应用程序将不与任何其他蓝牙堆栈的正常合作。看来这是打算与多个堆栈合作应用程序需要对所有them.The其他溶液的提供一些堆栈的抽象层,和堆栈具体code为以允许用户为蓝牙设备的手动配对,并最终创建在操作系统中的一些虚拟设备(如COM端口)。然后应用程序可以使用这种设备的标准接口。

Thanks everyone for valuable input. I'd like to summarize what I've found so far. The Microsoft Bluetooth API is not operating system API. Application written against it will not cooperate correctly with any other Bluetooth stack. It seems that applications which are intended to cooperate with multiple stacks need to provide some stack abstraction layer, and stack specific code for all of them.The other solution is to allow user for manual pairing of the Bluetooth device, which eventually create some virtual device in the operating system (e.g., COM port). Then the application can use standard interface of such a device.

这篇关于在Windows上访问蓝牙虚拟COM口无需手动配对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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