简体   繁体   English

寻找蓝牙低功耗 API 用于 windows 7

[英]Looking for Bluetooth Low Energy API for windows 7

I just finished developing a Bluetooth Low Energy application on two ESP32 boards in which I used the GATT protocol.我刚刚在两个使用 GATT 协议的 ESP32 板上完成了蓝牙低功耗应用程序的开发。 Now I need to write an application for my personal computer in order to communicate with my ESP32 devices.现在我需要为我的个人计算机编写一个应用程序,以便与我的 ESP32 设备进行通信。 I'm new to this and need advice on how to get started.我是新手,需要有关如何开始的建议。

The computer will act as a server.计算机将充当服务器。 I want to write an application in Java (but if this is not possible, I can also use C).我想在 Java 中写一个应用程序(但如果这不可能,我也可以使用 C)。 The operating system on the computer is Windows 7. The question is: where can I get the API for writing a program.电脑上的操作系统是Windows 7.问题是:哪里可以得到写程序的API。 It does not have to be a high-level library, maybe low-level access is enough for me (with examples of use).它不一定是高级库,也许低级访问对我来说就足够了(带有使用示例)。 My bluetooth adapter: Mpow BH456F (Supports bluetooth 5 and windows 7).我的蓝牙适配器:Mpow BH456F(支持蓝牙 5 和 windows 7)。

If there is no API directly from Windows, maybe there is a possibility in some other way to establish communication from my computer to the ESP32 boards?如果没有直接来自 Windows 的 API,也许有可能以其他方式建立从我的计算机到 ESP32 板的通信? An android emulator? android 仿真器?

I found several libraries (TinyB, SmartGattLib, that organize ble links. Will any of them work with my OS?我发现了几个库(TinyB、SmartGattLib,它们组织了 ble 链接。它们中的任何一个都可以与我的操作系统一起使用吗?

Windows 7 does not have any built-in BLE support. Windows 7 没有任何内置的 BLE 支持。 Assuming your Bluetooth device is connected to your PC over USB, you have some options:假设您的蓝牙设备通过 USB 连接到您的 PC,您有一些选择:

  1. Use some alternative USB driver that can redirect all HCI packets to a user-mode application.使用可以将所有 HCI 数据包重定向到用户模式应用程序的一些替代 USB 驱动程序。 Then run any Bluetooth host stack using this HCI interface that supports BLE of your choice.然后使用支持您选择的 BLE 的 HCI 接口运行任何蓝牙主机堆栈。

  2. Use VirtualBox to get a Linux machine where BLE is supported, and run your BLE program inside that.使用 VirtualBox 获取支持 BLE 的 Linux 机器,并在其中运行您的 BLE 程序。 Attach the USB Bluetooth device to the VM instead of to Windows in the menu in VirtualBox.将 USB 蓝牙设备连接到 VM,而不是 VirtualBox 菜单中的 Windows。

  3. Upgrade to Windows 10?升级到 Windows 10?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM