改变UUID后,Android的蓝牙未发现特征 [英] Android Bluetooth not discovering the characteristic after changing UUID

查看:267
本文介绍了改变UUID后,Android的蓝牙未发现特征的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Android 5.0.1棒棒糖和开发蓝牙低功耗服务器 - 客户端通信。我有三星Galaxy S4。我有我的定制服务三个特征。我做的特征的财产只写和加密的写入之一。然后,我把它改成非加密写入。针对这一特点写操作没有工作了。我知道我必须从设置和取消配对设备重新启动蓝牙适配器,但它根本不工作了。然后,我改变了特性的UUID。它发现与旧UUID的特点。我不明白这一点。我怎样才能把蓝牙适配器与一个特定设备的所有蓝牙数据?

I am using Android 5.0.1 Lollipop and developing Bluetooth Low Energy server-client communication. I have Samsung Galaxy s4. I have three characteristic in my Custom Service. I made one of the characteristic's property as write-only and encrypted write. Then I changed it to non-encrypted write. The write operation didnt work for this characteristic anymore. I knew I have to restart Bluetooth adapter from settings and unpair the device but it doesn't work anymore at all. Then I changed the UUID of the characteristic. It discovers the characteristic with the old UUID. I dont get it. How can I remove all Bluetooth data related to one particular device from the Bluetooth adapter?

编辑:我一倍和iPhone设备检查它。 iPhone发现与新的UUID的特点而Android发现这旧的。

I doubled checked it with and iPhone device. iPhone discovers the characteristic with the new UUID while Android discovers it the old one.

推荐答案

好吧,就设置(三星S4棒棒糖5.01)更多的研究后,我发现清除蓝牙高速缓存的方法:
设置 - >更多 - >应用程序管理器 - >全部 - >蓝牙 - >清除缓存

Ok, After more research on settings (Samsung s4 Lollipop 5.01), I found out a way of clearing the Bluetooth cache: Settings -> More -> Application Manager -> All -> Bluetooth -> Clear Cache

如果你想这样做编程遵循这个主题:<一href=\"http://stackoverflow.com/questions/22596951/how-to-programmatically-force-bluetooth-low-energy-service-discovery-on-android\">How以编程方式迫使Android的蓝牙低功耗服务发现不使用缓存

If you want to do it programmatically follow this thread: How to programmatically force bluetooth low energy service discovery on Android without using cache

这篇关于改变UUID后,Android的蓝牙未发现特征的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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