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

DOUBT IN OTA -DFU WITH BUTTON AND BUTTONLESS

HI

  •  We are developing a 2d-3d  mouse .
  •  We are trying to implement OTA-DFU into our  custom board .
  •  We first tried it on development kit and its working fine too . I can able to update the "ble_app_hids_mouse" into our DK using nRF Toolbox mobile app.
  •  We are using    "nRF5_SDK_14.2.0_17b948a".

I WILL EXPLAIN THE PROCEDURES I DID FOR IMPLEMENTING THE OTA -DFU

  • First i flashed the softdevice hex file to the DK.(s132_nrf52_5.0.0_softdevice.hex).
  • Then i flashed the bootloader hex with needed modification into the DK. (secure_dfu_ble_s132_pca10040_debug.hex).
  • Then LED1 and LED3  in DK will light up the device will enter into DFU mode by advertising as "DfuTrag".
  • Then using my android phone i uploaded the zip package containing the  application (ble_app_hids_mouse) hex file ,during  upload the LED2 and LED3 in the DK will turn on.
  • After successful upload the DK can use as a mouse by pressing the buttons.

MY DOUBTS

  1. When DK in DFU mode LED1 and LED3  will turn on, I checked the bootloader code but i didn't saw any function  to turn on the LED1 can you help to find in which c file or function LED1 was turning on . I saw the function to turn on the LED3 (inside leds_init())but i didn't findout the function to turn on LED1.
  2. Similarly during the upload is takeing place LED2 AND LED3 will turn on ,but i didn't saw any function  to turn on the LED2 please help to find in which c file or function LED2 was turning on .

 THIS IS BOOTLOADER CODE WE ARE USEING

nRF5_SDK_14.2.0_17b948a->nRF5_SDK_14.2.0_17b948a->examples->dfu->bootloader_secure_ble->pca10040_debug->ses.

PLEASE ANSWER TO MY 1 AND 2. IF YOU CAN POSSIBLE MAKE SCREENSHOT WHERE ITS TURNING ON  LED1 AND LED2 AND SEND TO ME. 

Parents Reply Children
  • Amanda ,

          In "ble_app_hids_mouse"  i didn't find the functions calling for configure to use the power management module.

    1. "power_management_init()" is not used  in "ble_app_hids_mouse"
    2. And also not used  this"nrf_pwr_mgmt_run();" in "ble_app_hids_mouse".Then how you conform that all the power management module is configured in "ble_app_hids_mouse".
  • Hi, 

    Yes, you are right. Please let me correct that:

    According to the sdk_config.h of "ble_app_hids_mouse", the POWER_ENABLED is 0. 

    To use nrf_pwr_mgmt_init() in the power_management_init, you have to enable the module as 

    // <e> NRF_PWR_MGMT_ENABLED - nrf_pwr_mgmt - Power management module
    //==========================================================
    #ifndef NRF_PWR_MGMT_ENABLED
    #define NRF_PWR_MGMT_ENABLED 1
    #endif

    You also need to check nrf_pwr_mgmt.c is in the Libaries. 

    <nRF5_SDK_14.2.0>\components\libraries\pwr_mgmt\nrf_pwr_mgmt.c

    -Amanda H. 

  • hi Amanda,

     I added all requested changes to add the buttonless dfu service to "ble_app_hids_mouse".

    But my code was execution was breaking ,when entering to the below function in services_init()

    • nrf_dfu_set_adv_name_init();  inside ble_dfu_buttonless_async_svci_init(void).

    please help me to solve these issue,

    Actually what is these "nrf_dfu_set_adv_name_init();" function doing

  • Hi, 

    NANDHU said:
    But my code was execution was breaking ,when entering to the below function in services_init()

    What error message does nrf_dfu_set_adv_name_init() returen? 

    This post and this post might help you. 

    NANDHU said:
    what is these "nrf_dfu_set_adv_name_init();" function doing

     It is answered in this post

     

    -Amanda H.

  • Actually there is no error is showing  .I just flashed the modified "ble_app_hids_mouse" which support buttonless dfu to the our board but its not advertising . so i debugged it using JLink then i noticed that when code execution is entering to " "nrf_dfu_set_adv_name_init();" but its not leaving from these function . 

    i don't known why .

    note:- i didn't flashed the bootloader hex to our board.

Related