apache / apache/mynewt-nimble

Service Change Indication

Open
#1,456 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
893
Forks
512
Avg merge
13d 31m
Merged PRs (30d)
7

Description

Hello,

I have troubles with Android phones and bonded ESP32 when adding/removing characteristics between 2 firmware releases (incorrect data reads, no answer on some characteristics ...)
It seems a common issue, and I found a lot of users with the same troubles.
I tried everything on the "client side" (Android cache refresh hack ... since it's not a public API), but it still doesn't work.

I found that BLE seems to already include "a flag" to indicate the client it needs to refresh his cache... the "Service Change Indication".

It doesn't seems NimBLEServer::serviceChanged() does the same thing (and it's not in the public API).
https://github.com/h2zero/NimBLE-Arduino/blob/release/1.4/src/NimBLEServer.cpp#L168

Espressif seems to offer the API on bluedroid :
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/bluetooth/esp_gatts.html#_CPPv444esp_ble_gatts_send_service_change_indication13esp_gatt_if_t13esp_bd_addr_t

it seems related to the 0x2A05 characteristic

Could it be possible to offer an API for this in NimBLE please ?

More info here :
https://stackoverflow.com/questions/62155016/bluez-and-service-characteristics-cache-issue-with-android

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked NimBLEServer.cpp at line 168 and compare its serviceChanged() behavior with Espressif's esp_ble_gatts_send_service_change_indication API. Read the references to the 0x2A05 characteristic and determine how an equivalent public API fits this repository. Done means callers can request a BLE Service Change Indication when services change.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.