Windows/.Net 中的蓝牙 API?

编程入门 行业动态 更新时间:2024-10-27 02:30:54
本文介绍了Windows/.Net 中的蓝牙 API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在编写一个蓝牙扫描仪,用于定位和识别本地附近的移动设备.这是我可以使用 C# 完成的事情,还是我需要深入到 C/C++ API 中?我的应用程序面向 Windows XP 和 Vista.指针表示赞赏.

I am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are appreciated.

谢谢!

推荐答案

PC 上蓝牙的一个问题是有多个 BT 堆栈在使用,您永远无法完全知道在给定机器上可用哪个堆栈.最常见的是 Widcomm(现在是 Broadcom)和 Microsoft(出现在 XP 中,可能是其中的一个服务包).但是,一些 BT 硬件供应商封装了 BlueSoleil,一些使用 Toshiba.大多数加密狗都适用于 MS 堆栈,因此我见过的 .NET 库倾向于使用它.

One problem with Bluetooth on the PC is that there are several BT stacks in use and you can never quite know which one is available on a given machine. The most common ones are Widcomm (now Broadcom) and Microsoft (appeared in XP, maybe one of the service packs). However, some BT hardware vendors package BlueSoleil and some use Toshiba. Most dongles will work with the MS stack so the .NET libs I've seen tend to use that.

每个堆栈都有完全不同的方式来执行发现部分,您可以在其中浏览附近的设备并查询它们的服务.

Each of the stacks has a totally different way of doing the discovery part where you browse for nearby devices and inquire their services.

如果我今天必须选择一种方法,我可能会用 C++ 进行发现并为 .NET 添加一个接口.

If I had to pick one approach today I'd probably do the discovery in C++ and add an interface for .NET.

当我尝试使用 32feet 时,它运行得很好,但不支持 Widcomm 堆栈.

The 32feet stuff worked pretty well when I tried it but didn't support the Widcomm stack.

更多推荐

Windows/.Net 中的蓝牙 API?

本文发布于:2023-05-27 02:25:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/275511.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:蓝牙   Windows   Net   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!