I have an application with a custom service, based on the ble_app_template example. I want to add DFU functionality. I flashed the DFU secure bootloader and can discover the DfuTarg and transfer my own peripheral code over DFU.
I would like my peripheral code to have a DFU service so I can update the code without having to touch the peripheral.
After adding the DFU service from the ble_app_buttonless_dfu to my app, the peripheral boots and starts advertising. The moment I connect to the peripheral using the nRF Connect android app, I get a GATT ERROR 133 in the app. When I try connecting with a nRF52 central, it connects and immediately disconnects before discovering the services.
On the peripheral, the BLE_GAP_EVT_CONNECTED is called when connecting. When the central disconnects, the peripheral does not disconnect but is stuck somewhere. No idea where so it is hard to debug.
Using the Nordic Sniffer 2.0, I get the following trace when connecting using the android app:
As you can see on the traces, the central sends a CONNECT_REQ and then LL_FEATURE_REQ's are sent but no reply is received. no more communication is received after this trace.
Can someone give me some pointers on how to debug this as I have no idea where the peripheral is getting stuck?
Thanks!