⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
point85
Offline
Last seen:10 months 2 weeks ago
加入:2018-06-29 15:31
Hiding a BLE service

Hi,

I am trying to hide a BLE service once a command has run. I have read through the forums and I am using the following:

ble_gatts_disable_service(svc->start_h);
ble_service_remove(svc);
ble_service_cleanup(svc);

The service UUID changes and the attributes still show on android. The read/write functions are available but fail if they're tried.

I'm not sure why the UUID changes.

Is there any way to hide the service from the android device completely?

Thanks

Device:
PM_Dialog
Offline
Last seen:2 days 18 hours ago
Staff
加入:2018-02-08 11:03
Hi point85,

Hi point85,

是的,你是对的,that’s the procedure you should follow. Could you please clarify the “hide the service from the android device completely”? Do you mean to remove it from the attribute data base?

Thanks, PM_Dialog

point85
Offline
Last seen:10 months 2 weeks ago
加入:2018-06-29 15:31
Thanks for the reply,

Thanks for the reply,

Using nRF Connect app on Android to sniff the Bluetooth, when I run the above command the Service ID changes
from 00000000-1111-2222-222-333333333000
to 000000b0-0000-1000-8000-00805f9b34fb

The service continues to show in the list of services in nRF Connect. But reading or writing to them is ignored by the processor as expected.

I was looking to hide the service altogether.

Thanks.