Hi Marcel, On Fri, May 7, 2021 at 1:26 AM Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote: > > Hi Luiz, > > >> Unable to add the IRK in btmgmt when need to be updated. The option is > >> enabled now. > >> > >> Signed-off-by: Sathish Narasimman <sathish.narasimman@xxxxxxxxx> > >> --- > >> tools/btmgmt.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/tools/btmgmt.c b/tools/btmgmt.c > >> index 02fec1dca184..bf3b460d0f04 100644 > >> --- a/tools/btmgmt.c > >> +++ b/tools/btmgmt.c > >> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = { > >> cmd_advertising, "Toggle LE advertising", }, > >> { "bredr", "<on/off>", > >> cmd_bredr, "Toggle BR/EDR support", }, > >> - { "privacy", "<on/off>", > >> + { "privacy", "<on/off> [irk]", > >> cmd_privacy, "Toggle privacy support" }, > > > > I wonder why you didn't incorporate in the first parameter though > > given that things like privacy off [irk] makes no send, or perhaps > > have a dedicated command for setting the irk so it would persist > > between privacy on/off. > > that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided. Just to be clear I was suggesting to use a dedicated command for setting an irk: > irk <value> That way it is persisted, that way the tool remembers what was the last set irk in case privacy needs to be toggled for some reason. -- Luiz Augusto von Dentz