Bluetooth: Shell: Remove usage of auto name in AD
The advertiser options to automatically add the name in the scan response and the advertising data will be deprecated. Update the Bluetooth shell and its documentation to not use those options anymore. The option of the legacy advertiser run with `bt advertise` and the behavior hasn't changed. The code has been updated to no longer use the advertiser option but the original behavior has been reproduced. The option of the extended advertiser have been updated to be more explicit. The options `name` and `name-ad` have been removed from the `bt adv-create` and `bt adv-param`. The option `name` and `dev-name` have been added to the `bt adv-data` command. - `name <str>` will advertise the given name. - `dev-name` will advertise the device name. Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
7bc63985af
commit
6c9010be9f
2 changed files with 103 additions and 31 deletions
|
@ -166,19 +166,20 @@ For example, if you want to create a connectable and scannable advertiser and st
|
|||
Advertiser[0] 0x200022f0 set started
|
||||
|
||||
You may notice that with this, the custom advertiser does not advertise the device name; you need to
|
||||
enable it. Continuing from the previous example:
|
||||
add it. Continuing from the previous example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
uart:~$ bt adv-stop
|
||||
Advertiser set stopped
|
||||
uart:~$ bt adv-param conn-scan name
|
||||
uart:~$ bt adv-data dev-name
|
||||
uart:~$ bt adv-start
|
||||
Advertiser[0] 0x200022f0 set started
|
||||
|
||||
You should now see the name of the device in the advertising data. You can also set the advertising
|
||||
data manually by using the :code:`bt adv-data` command. The following example shows how to set the
|
||||
advertiser name with it:
|
||||
You should now see the name of the device in the advertising data. You can also set a custom name by
|
||||
using :code:`name <custom name>` instead of :code:`dev-name`. It is also possible to set the
|
||||
advertising data manually with the :code:`bt adv-data` command. The following example shows how
|
||||
to set the advertiser name with it using raw advertising data:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue