Hi, I'm trying to create a PC Python script that upload an application on NRF52 via BLE.
I flashed the NRF52 with this S132/DFU/Application: nRF5_SDK_11.0.0_89a8197/examples/ble_peripheral/ble_app_hrs/pca10040/s132_with_dfu. (Application with DFU service)
I created a zip file that contains my application (a simple blink)app_blink_package1.zip
I tried the zip file using the Android App NRFToolbox and it works.
Now I want to upload the hex file nrf52832_xxaa_s132_blinky_500.hex (the same of the zip file) with the PC and BlueZ gatttool using this python script dfu_debug.py
But I can't switch to DFU mode using Gatttool.
I'm following this guide: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk52.v0.9.2%2Fbledfu_appswitching.html but I don't understand what is the command for this operation: "Next, you must write the value 01-XX (where XX is the code for the type of image, see DFU Control Point) to the DFU Control Point to start a DFU procedure" In the Android App NRFToolBox I saw this message on the logcat: (Sending Start DFU command (Op Code = 1, Upload Mode = 4) but I can't recreate it with gatttool.
I'm using this command to enable cccd: char-write-req 0x11 0100 but it replies fail
I tried also nRF5_SDK_11.0.0_89a8197/examples/dfu/bootloader/pca10040/dual_bank_ble_s132/armgcc that is only the DFU. In this way gatttool (via dfu_debug.py above) returns OK for each command, except for the last commands after sending the image file, and at the end of the procedure the application doesn't work. Here the log: log_blink.txt
Where is my mistake? Thanks.