.Net 中的低功耗蓝牙 (C#) [英] Bluetooth Low Energy in .Net (C#)

查看:81
本文介绍了.Net 中的低功耗蓝牙 (C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在控制台应用程序中通过 .Net (C#) 使用低功耗蓝牙 (ble)?例如在 uwp 应用程序中使用 windows.devices.bluetooth.

is it possible to use bluetooth low energy (ble) with .Net (C#) in an console app? For Example like with windows.devices.bluetooth in uwp apps.

我只想在 uwp 中完成,但我需要专为 .Net 设计的 vJoy 和 MbientLab Metawear C 硬件作为带 ble 的传感器.

I would just do it in uwp, but I need vJoy which is designed for .Net and the MbientLab Metawear C hardware as sensor with ble.

推荐答案

您可以在 C# 桌面应用程序中使用 C# API!我在 GitHub 中有一个 示例.

You can use C# APIs in C# Desktop applications! I have a sample here in GitHub.

通常,要访问 C# APIS,请向您的项目添加两个引用:

In general, to get access to the C# APIS, add two references to your project:

  1. C:Program Files (x86)Windows Kits10UnionMetadataWindows.winmd
  2. C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETCorev4.5System.Runtime.WindowsRuntime.dll

请注意,#2 版本取决于您使用的 .Net 版本.

Note that the #2 version depends on the version of .Net that you're using.

不支持后台任务,但所有其他蓝牙 C#功能应该在那里.

Background tasks will not be supported, but all other Bluetooth C# features should be there.

这篇关于.Net 中的低功耗蓝牙 (C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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