diff --git a/docs/Usage_tips.md b/docs/Usage_tips.md index 49e3372..a594628 100644 --- a/docs/Usage_tips.md +++ b/docs/Usage_tips.md @@ -43,6 +43,30 @@ CCCDs values results in those bonds being lost. Fix: Increase CONFIG_BT_NIMBLE_MAX_CCCDS. These take approximately 40 bytes in NVS, 2 bytes for the CCCD value and the NVS metadata overhead. The value of CONFIG_BT_NIMBLE_MAX_CCCDS should conservatively be no less than (CONFIG_BT_NIMBLE_MAX_BONDS * {maximum number of characteristics that can be subscribed to}). +## Device 'Local Name' + +'Local name' refers to how the device is seen and displayed. + +A devices 'Local name' can be thought of as coming from two places, the Advertising "Local name" and the the GATT Device Name. + +### Advertising "Local name" + +Field found in the advertising data payload. Value is set via NimBLEAdvertising::setName(). + +### GATT Device Name + +Characteristic UUID 0x2A00 in the Generic Access service. Set via NimBLEDevice::init() or NimBLEDevice::setDeviceName(). + +This characteristic is read after connecting to the device. + +### Important considerations + +* OSes cache the 'GATT Device Name'. +* OSes update the device name based on the 'GATT Device Name' after connecting to a device. This means that if you set the Advertising 'Local name' to "ABCD" but the 'GATT Device Name' to "12345", the device will be seen as "ABCD" until connecting to the device, at which time the devices name will change to "12345". +* If no 'Advertising "Local name"' is set, OSes, such as iOS, may display the devices name as 'Unnamed' until the device is connected to, at which time the 'GATT Device Name' is read and used instead. + +It is recommended that both 'Advertising "Local name"' and 'GATT Device Name' be set appropriately, after considering the above described behavior. + ## There will be bugs - please report them No code is bug free and unit testing will not find them all on it's own. If you encounter a bug, please report it along with any logs and decoded backtrace if applicable.