Windows Store蓝牙 [英] Windows Store Bluetooth

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

问题描述

我一直在寻找Windows Store应用程序的MSDN文档,而我发现与蓝牙最接近的唯一东西是Windows.Networking.Proximity.这似乎是一类,仅用于近距离,即3-4厘米以内.我正在开发的应用程序在HTML5/WinJS平台上.

I have been looking through the MSDN docs for Windows Store apps and the only thing I found that was close to Bluetooth was the Windows.Networking.Proximity. This appears to be a class whose use is only for close proximity ie within 3-4 centimeters. The app I am developing is on a HTML5/WinJS platform.

是否有像Android一样的BluetoothSocket类?对于那些实际上不熟悉android上的Bluetooth的商店开发人员,您可以创建Bluetooth Device成员变量,并使用设备信息填充该成员,这是本地Java调用.

Is there a BluetoothSocket class like there is for android? For those store developers who are not familiar with Bluetooth on android essentially you create a Bluetooth Device member variable and populate that member with the device information, which is a native java call.

这将为您提供已配对设备的列表,您只需打开该设备的Bluetooth套接字,然后在入/出流中对其进行标准的套接字操作以进行读/写.

That will give you a list of paired devices, and you just open a Bluetooth socket to that device and then its the standard socket operations on a in/outstream for read/write.

我是否需要做同样的事情并编写C ++/CX版本并将其添加为Windows组件?这里的关键是,我要连接的设备将蓝牙视为COM端口,因此,我需要的是一种稳定,可靠的方式来读写该设备,就像我连接到COM端口一样.

Do I need to do the same thing and write a C++/CX version of this and add it as a Windows Component? The key thing here is that the device I'm connecting to treats the Bluetooth as a COM port, so all I need is a stable, reliable way to read/write to this device as if I were connected to a COM port.

推荐答案

Per this MSDN Forum article, there isn't a generalized Bluetooth stack available for Windows Store applications.

如线程所示,只有一个蓝牙呼叫控制示例

As the thread indicates, there is only a Bluetooth Call Control sample and

如果设备制造商需要使用蓝牙作为其一部分 设备,他们可以提供驱动程序和元数据供Store应用程序使用 它.

If a device manufacturer needs to use Bluetooth as part of their device, they can provide a driver and metadata for a Store app to use it.

此处的信息:

 http://msdn.microsoft.com/en-us/library/windows/apps/hh464909.aspx

这篇关于Windows Store蓝牙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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