简体   繁体   English

在不使用应用程序的情况下将 Android 设备与 BLE 外设连接

[英]Connecting an Android Device with a BLE Peripheral without using an App

I am new to Android programming and was wondering if it was possible to connect an Android device with a BLE Peripheral, without needing an App.我是 Android 编程的新手,想知道是否可以在不需要应用程序的情况下将 Android 设备与 BLE 外设连接起来。

I am experimenting with the Node.js package "bleno" for the peripheral and connecting using an app and even a webapp are working just fine, but connecting using the standard android settings functions dont work.我正在尝试使用 Node.js package“bleno”作为外围设备,使用应用程序甚至 webapp 连接都可以正常工作,但使用标准 android 设置功能连接不起作用。 The device does find my peripheral after scanning but when I try to connect with it it always returns that I need an app.该设备在扫描后确实找到了我的外围设备,但是当我尝试与其连接时,它总是返回我需要一个应用程序。

Is this a problem of bleno or does this not work that way in generell?这是bleno的问题还是在generell中不起作用?

If the peripheral has for example a HID GATT service exposed, then you can pair and connect to it through the system settings.例如,如果外围设备暴露了 HID GATT 服务,那么您可以通过系统设置配对并连接到它。 This means BLE keyboards and mice can be used without any app.这意味着无需任何应用程序即可使用 BLE 键盘和鼠标。

If your peripheral only has custom services or only services the OS knows nothing about, then you will need some app to connect to it.如果您的外围设备只有自定义服务或只有操作系统一无所知的服务,那么您将需要一些应用程序来连接它。

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

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