This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

S130'DFU example of SDK9.0.0 can't work

Hi, I use the SDK9.0.0 S130'DFU project in the parth of pca10028\dual_bank_ble_s130\arm5_no_packs\ for testing.I found S130'DFU code is different compare to the S110 of SDK6.0.0. I read the"How to generate the INIT file for the DFU" PDF file,and found that the old file format isn't support, "hex" file isn't support anymore . I can't find the link of the " Master Control Panel 3.8.0"program and "nrf" tool,where to download? The way of creating "DISTRIBUTION PACKETS (ZIP) " is too complex, I use the SDK11's of DFU tests ZIP file for DFU transport test,because the file format is right .Unfortunately,the NRF Master Controller transport file stop when going to the step of "writting Initialize DFU Parameters".The Nrf master controller write data"0x02-00" to characteristic of '1531",and Notification received from 1531 is "0x10-02-06".I debug the code in the S130'DFU project,and find the error fix at : `case OP_CODE_RECEIVE_INIT: ble_dfu_evt.ble_dfu_evt_type = BLE_DFU_RECEIVE_INIT_DATA;

        if (p_ble_write_evt->len < PKT_INIT_DFU_PARAM_LEN)
        {
            return ble_dfu_response_send(p_dfu,
                                         (ble_dfu_procedure_t) p_ble_write_evt->data[0],
                                         BLE_DFU_RESP_VAL_OPER_FAILED);
        }
        
        ble_dfu_evt.evt.ble_dfu_pkt_write.len    = 1;
        ble_dfu_evt.evt.ble_dfu_pkt_write.p_data = &(p_ble_write_evt->data[1]);

        p_dfu->evt_handler(p_dfu, &ble_dfu_evt);
        break;`

the p_ble_write_evt->len is 0x00,what happen?Is the app bug? Can you tell me how to use the S130 DFU project to update my app fireware?I have try some methode,But it can't work correctly.

Besides,` if (dfu_start || (!bootloader_app_is_valid(DFU_BANK_0_REGION_START))) { // nrf_gpio_pin_clear(UPDATE_IN_PROGRESS_LED);

    // Initiate an update of the firmware.
    err_code = bootloader_dfu_start();
    APP_ERROR_CHECK(err_code);

// nrf_gpio_pin_set(UPDATE_IN_PROGRESS_LED); }err_code always is 0x0003D99B,evenbootloader_dfu_start()returnsNRF_SUCCESS.I use key word to declare the variable of volatile static uint32_t err_code;`,but it does't work.

  • You can use SDK v10 or SDK v9 if you like), S110 is still supported in that SDK version. Please make sure you use the correct version of the tool (nRF Master Control Panel, nrfutil) you use. I think the latest version of Master Control Panel v3.10.0 works fine with DFU in SDK v9 and v10 Please try to test with unmodified DFU bootloader, and any application example in the SDK and let me know what kind of issue you have. Please state step by step how you test.

  • I had tried to read the SDK12 DFU solution,but now I give up,because it have been changed too much,the .dat and .jason file format are different with the old Master Control Panel v3.10.0 make ,and I have no time to wast.I want to get you Exactly answer,If I use SDK9 S130 softdevice(which version should I select,V1.0.0 or V2.0.1 ? ) for DFU,could I use the Master Control Panel v3.10.0 to create a DFU .zip file? Could you sent me a successful project for testing?I have no ideal. thank you!

  • @Songplus: Have you tried ? It would only take no more than 5 minutes to test and I already said that it should work.

    Please try with unmodified bootloader in \examples\dfu\bootloader\pca10028\dual_bank_ble_s130 . If you use SDK v9.0 you should use S130 v1.0 If you use SDK v11.0 you should use S130 v2.0 Both work fine with MCP v3.10.0. You can find SDK version compatibility matrix here.

    Make sure, when you test, you select the .hex file and let the MCP generate the init data for you. After you test and find that it works, you can generate your .zip file and continue testing.

  • I have tried,but I don't know how to use the MCP ,When I open it,it can't work.It seems to need connect other board.image descriptionWhat does the program use for? I have try hardly,but I can't find a easier way to solute the problem.Could you show me the detail of operation step.I use the android MCP -> nrf master control panel to update ,It doesn't work like you say.When I choose hex file ,the MCP doesn't auto init the hex file format for S130 duf ,and disconnect .As the picture shows image description Besides ,how to generate a .zip file?

  • I already answered how you generate .zip file: "Note that included in MCP (in Program File(x86) folder) you can find nrfutil tool that can be used to generate the DFU .zip file (the init packet and the binary image in a zip file) so you dont have to generate on your own."

    To use MCP you need a nRF51 dongle or a nRF51 DK and click File -> Flash Programming to flash the board with the firmware needed.

    If you want to use with nRF Connect (nRFMCP) on Android you can generate the .zip file from your PC and then copy to your phone and do DFU.

Related