SWRA772 august 2023 CC2564C
The SetDiscoverabilityMode command is responsible for setting the Discoverability Mode of the local device. This command returns zero on successful execution and a negative value on all errors. The Discoverability Mode in LE is only applicable when advertising. If a device is not advertising, then the device is not discoverable. The value set by this command is used as a parameter in the command AdvertiseLE.
This command requires only one parameter which is an integer value that represents a Discoverability Mode. This value must be specified as 0 (for Non-Discoverable Mode), 1 (forLimited Discoverable Mode), or 2 (for General Discoverable Mode).