hi,
I am trying to integrate buttonless switch to boot loader as explained in the documentation and the hrs experimental example.
I am working on SDK7.2.0 and using the nrf51DK so far - later on I will port everything to my own hardware, but the DK is convenient for now.
Here is what I did:
I have compiled the boot loader project in the SDK7.2 with Keil, and programmed it to my nrf51dk together with the soft device. Then I also compiled the experimental hrs example, generated a zip file to flash with the nrf toolbox from my iphone, and that all worked fine. Also was able to flash my own application when switching to boot loader via the button+reset. So far so good.
Then, i integrated the dfu service as described in the documentation of the experimental example:
- Add DFU related files to BLE example project: bootloader_util_arm.c,ble_dfu.c,dfu_app_handler.c
- Implement the reset_prepare() function
- Initialize the DFU Service
- Propagate SoftDevice BLE events to the DFU Service.
Now, when my own application is running, I can see the DFU service, and can make the application switch to boot loader by enabling notifications and writing 0x0104 to the control point, or at least I have the impression it switched to boot loader, as LED1 and LED3 are lit, just like when I switch to boot loader. When I then go to nRF Toolbox > DFU, I can select my device, can select my file and so on, and tap 'Upload', and then nothing seems to happen: progress bar appears but stays at 0.
One thing I need to note: I commented out the content of du_app_set_peer_data, as it uses a function from the device_manager, but I do not use any security, so I do not use the device manager. Could this cause the behavior I am seeing? Or is there something else that could cause this?
Update: added the device_manager and all necessary files, and that does not make any difference.
Can the fact that I compiled the boot loader with Keil and my application with GCC be the cause? I checked everything else again, and do not really see any difference between how I integrated it and how it was done in the example.