When root folder for adapter doesn't exist we will get this runtime error: src/adapter.c:generate_and_write_irk() Unable set contents for /var/lib/bluetooth/00:00:00:00:00:00/identity: (Failed to create file “/var/lib/bluetooth/00:00:00:00:00:00/identity.EKQ581”: No such file or directory) --- src/adapter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/adapter.c b/src/adapter.c index 2679d4302..fda26fb93 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -4148,6 +4148,7 @@ static int generate_and_write_irk(uint8_t *irk, GKeyFile *key_file, g_key_file_set_string(key_file, "General", "IdentityResolvingKey", str_irk_out); + create_file(filename, S_IRUSR | S_IWUSR); str = g_key_file_to_data(key_file, &length, NULL); if (!g_file_set_contents(filename, str, length, &gerr)) { error("Unable set contents for %s: (%s)", filename, -- 2.34.1