简体   繁体   English

Android:在没有定制 GATT 服务器的情况下使用 BLE

[英]Android: Using BLE without a bespoke GATT Server

I want to use the BLE Current Time Service (0x1805) in conjunction with a BLE enabled device.我想将 BLE 当前时间服务 (0x1805) 与启用 BLE 的设备结合使用。 My question is: Do I "need" to create an App to manage BLE connectivity and return results for the Current Time Service to my device, or does Android somehow implement a generic GATT server?我的问题是:我是否“需要”创建一个应用程序来管理 BLE 连接并将当前时间服务的结果返回到我的设备,或者 Android 是否以某种方式实现了通用 GATT 服务器?

If so, how do I enable that?如果是这样,我如何启用它?

So far, my BLE pairing attempts have simply errored out on the device side.到目前为止,我的 BLE 配对尝试只是在设备端出错。

I'm not aware of a generic GATT Server on Android, but there are apps that can do the job for you.我不知道 Android 上有通用的 GATT 服务器,但有些应用程序可以为您完成这项工作。 I would suggest starting with the nRF Connect app which is able to start a GATT server with a pre defined current time service.我建议从nRF Connect应用程序开始,它能够使用预定义的当前时间服务启动 GATT 服务器。

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

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