Skip to content

Commit f396fcd

Browse files
chmorganh2zero
authored andcommitted
Usage_tips.md - 'Device Local Name' information to help guide setting the GATT Device Name or Advertising name.
1 parent 6d7e723 commit f396fcd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/Usage_tips.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,30 @@ CCCDs values results in those bonds being lost.
4343
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
4444
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}).
4545

46+
## Device 'Local Name'
47+
48+
'Local name' refers to how the device is seen and displayed.
49+
50+
A devices 'Local name' can be thought of as coming from two places, the <i>Advertising "Local name"</i> and the <i>the GATT Device Name</i>.
51+
52+
### Advertising "Local name"
53+
54+
Field found in the advertising data payload. Value is set via NimBLEAdvertising::setName().
55+
56+
### GATT Device Name
57+
58+
Characteristic UUID 0x2A00 in the Generic Access service. Set via NimBLEDevice::init() or NimBLEDevice::setDeviceName().
59+
60+
This characteristic is read <b>after</b> connecting to the device.
61+
62+
### Important considerations
63+
64+
* OSes cache the <i>'GATT Device Name'</i>.
65+
* OSes update the device name based on the <i>'GATT Device Name'</i> after connecting to a device. This means that if you set the <i>Advertising 'Local name'</i> to "ABCD" but the <i>'GATT Device Name'</i> to "12345", the device will be seen as "ABCD" until connecting to the device, at which time the devices name will change to "12345".
66+
* If no <i>'Advertising "Local name"'</i> is set, OSes, such as iOS, may display the devices name as 'Unnamed' until the device is connected to, at which time the <i>'GATT Device Name'</i> is read and used instead.
67+
68+
It is recommended that both <i>'Advertising "Local name"'</i> <b>and</b> <i>'GATT Device Name'</i> be set appropriately, after considering the above described behavior.
69+
4670
## There will be bugs - please report them
4771

4872
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.

0 commit comments

Comments
 (0)