C#中的蓝牙,哪个堆栈,哪个SDK? [英] Bluetooth in C#, Which stack, Which SDK?

查看:18
本文介绍了C#中的蓝牙,哪个堆栈,哪个SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序需要能够使用蓝牙来满足以下要求:

We've got an application which needs to be able to use bluetooth for the following requirements:

  1. 从蓝牙设备接收文件(最多可同时接收 2 台设备)
  2. 显示范围内的所有蓝牙设备
  3. 将文件发送到蓝牙设备
  4. 同时扫描蓝牙设备和传输文件

我们在 Windows XP 上运行.

We're running on Windows XP.

我环顾四周,似乎有 3 个主要堆栈:

I've done some looking around and there seems to be 3 main stacks:

蓝太阳

在 BlueSoleil 网站上,在他们的 SDK 部分,似乎提到只支持 1 个连接,这显然不好.

On the BlueSoleil website, in their SDK section, it seems to mention only 1 connection is supported, which is obviously no good.

Windows

似乎只支持 1 个蓝牙加密狗,这可能意味着我们无法满足所有要求.

Only seems to support 1 bluetooth dongle, which will probably mean we can't meet all our requirements.

Widcomm

昂贵且可能矫枉过正?更复杂的API?想法?

Expensive and potentially overkill? More complex API? Thoughts?

关于C#的SDK,正在看Franson Bluetools,有人用过这个API吗?

In terms of SDK for C#, was looking at Franson Bluetools, anyone used this API?

谢谢

推荐答案

首先声明,我是 32feet.NET 库的维护者.:-)

Firstly the disclaimer, I'm the maintainer of the 32feet.NET library. :-)

我刚刚检查过,在使用 Microsoft 堆栈(使用一个加密狗)的 XP 上,我可以同时接收两个 OBEX PUT 并发现设备.这是使用 32feet.NET 的 ObexListener 类和 BluetoothClient.DiscoverDevices 方法.要发送 OBEX PUT,可以使用其 ObexWebRequest 类.为了使用 ObexListener 进行多个并行连接,我只有多个线程调用其 GetContext() 方法.

I've just checked, and on XP with the Microsoft stack (using one dongle) I can concurrently be receiving two OBEX PUTs and also discovering devices. That's using 32feet.NET's ObexListener class and the BluetoothClient.DiscoverDevices method. To send the OBEX PUTs one can use its ObexWebRequest class. To do multiple parallel connections with ObexListener I just had multiple threads calling its GetContext() method.

所以这可能比我们想象的要简单...

So that's maybe simpler than we thought...

我还使用他的 Brecham.Obex 库在 Andy Hume 的 OBEX 服务器上对其进行了测试,并发接收在那里也能正常工作.它可以从 http://32feet.net/files/folders/objectexchange/entry6511.aspx<获得/a>.

I've also tested it with Andy Hume's OBEX Server using his Brecham.Obex library and the concurrent receive works fine there too. Its available from http://32feet.net/files/folders/objectexchange/entry6511.aspx.

关于我们的 Widcomm 支持.希望它在客户端看起来不会太不完整"......查询(设备发现)和连接都有效.服务器端仍然需要做一些工作,但是 Widcomm API 根本不支持一些东西,例如.(程序化身份验证处理).

On our Widcomm support. Hopefully it doesn't seem too "incomplete" on the client side... Inquiry (device discovery) and connections all work. The server-side still needs a little work however and there are some things the Widcomm API simply doesn't support eg. (programmatic authentication handling).

样品有什么问题?编译时还是运行时?在 MSFT 堆栈或 Widcomm 上?如果您愿意,请访问 http://32feet.net/forums/37.aspx 进行跟进.

What was the issue with the samples? Compile-time or run-time? On MSFT stack or Widcomm? Follow-up at http://32feet.net/forums/37.aspx if you prefer.

这篇关于C#中的蓝牙,哪个堆栈,哪个SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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