Hello,
I am working on a project using nRF52832 with Zephyr RTOS (NCS v2.7.0) and MCUboot. I have implemented BLE passkey-based security (BT_SECURITY_L3) on the device. I use BLE security level: BT_SECURITY_L3 (authenticated pairing with encryption, passkey entry)
The behavior I observe:
1. Device has unencrypted (no BLE security) firmware flashed via J-Link → works fine
2. I flash encrypted (BT_SECURITY_L3) firmware via DFU over BLE → succeeds
3. I flash another encrypted firmware on top via DFU → succeeds
4. I try to flash unencrypted (no BLE security) firmware via DFU → FAILS, DFU is rejected
My question: Is this behavior caused by BT_SECURITY_L3 blocking the DFU transport because the unencrypted firmware DFU package is sent without pairing? Or is this related to MCUboot downgrade protection rejecting the lower version image? If it is the security level blocking the DFU, is CONFIG_MCUMGR_TRANSPORT_BT_PERM_RW_AUTHEN the relevant config here? And if so, is there a recommended way to allow flashing an unencrypted firmware via DFU while still keeping BT_SECURITY_L3 for normal BLE communication?
Any guidance would be appreciated.
Thank you.