【问题标题】:How to connect the WiiMote internally in a C# app?如何在 C# 应用程序内部连接 ​​WiiMote?
【发布时间】:2012-01-19 18:07:06
【问题描述】:

我想使用 WiiMoteLib 将单个 wiiMote 连接到我的应用程序,但我希望在内部完成连接,即。用户只需运行应用程序(并且不需要将wiiMote 与Windows 向导或bluesoleil 连接)。该应用程序采用 C# 语言,无法更改语言。 谢谢!

【问题讨论】:

  • 如果你想在没有 Windows 向导的情况下进行设置,你将需要某种用于 C# 的蓝牙库
  • 好的,但是.. 有吗?谢谢

标签: c# bluetooth wiimote


【解决方案1】:

32feet.NET 能胜任这项工作吗?

BluetoothAddress addr = ... address from discovery or known address...
var dev = new BluetoothDeviceInfo(addr);
dev.SetServiceState(BluetoothService.HumanInterfaceDevice, true); // this line!

可能还需要处理配对,可能使用 BluetoothWin32Authentication 并处理其回调,请参阅 http://32feet.codeplex.com/wikipage?title=Bluetooth%20Securityhttp://32feet.codeplex.com/wikipage?title=BluetoothWin32Authentication

【讨论】:

    【解决方案2】:

    这里有一个如何使用 Microsoft 蓝牙 API 和 HID API 的示例:

    http://www.richlynch.com/code/wiipair

    效果很好。

    它在 C++ 中,但很容易转换为 C#。

    【讨论】:

      猜你喜欢
      • 2018-07-20
      • 1970-01-01
      • 2018-07-14
      • 1970-01-01
      • 1970-01-01
      • 2019-03-05
      • 1970-01-01
      • 2017-10-24
      • 1970-01-01
      相关资源
      最近更新 更多