2025-11-26 7:51 AM - edited 2025-11-26 7:51 AM
Hello community,
I am currently considering capturing and analyzing BLE packets by using BLE sniffer, but for that I need the LTK used for decryption.BLE Secure Connection pairing does not directly exchange LTK, so I do not know where to find it exactly in BLE Stack.
Could you please tell me how to output an LTK log by modifying the user source code?
-------------------------------------------------------------------------------------------------------------------
[Srouce]
Solved! Go to Solution.
2025-11-27 1:31 AM
Hello,
You can use debug keys that are known by sniffer tools. For that, you can add at the end of Ble_Hci_Gap_Gatt_Init() function:
uint8_t a_sc_key_type[1];
a_sc_key_type[0] = 1;
aci_hal_write_config_data(CONFIG_DATA_SC_KEY_TYPE_OFFSET,1,a_sc_key_type);Best Regards,
Corentin
2025-11-27 1:31 AM
Hello,
You can use debug keys that are known by sniffer tools. For that, you can add at the end of Ble_Hci_Gap_Gatt_Init() function:
uint8_t a_sc_key_type[1];
a_sc_key_type[0] = 1;
aci_hal_write_config_data(CONFIG_DATA_SC_KEY_TYPE_OFFSET,1,a_sc_key_type);Best Regards,
Corentin