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
  • Hi, 

    Please take a look at <nRF5_SDK_14.2.0_17b948a>\components\libraries\bootloader\ble_dfu\nrf_ble_dfu.c: 

    #define ADVERTISING_LED_PIN_NO              BSP_LED_0                                               /**< Is on when device is advertising. */
    #define CONNECTED_LED_PIN_NO                BSP_LED_1                                               /**< Is on when device has connected. */

    and trace ADVERTISING_LED_PIN_NO and CONNECTED_LED_PIN_NO variables.

    -Amanda H.

  • Hi Amanda ,

           Thanks for the reply.

    NEXT DOUBT 

    • After OTA-DFU there is bootloader hex application hex  and softdevice hex in our nRF52832 soc.If we turn OFF the DK and turn ON what will the order of execution of  those hex file
    • i.e which hex file will execute first which one second .
  • 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.

  • Amanda ,

     I downloaded a new SDK and trying to implement buttonless dfu service to the "ble_app_hids_mouse"  .

    • The hardware we are using for test is only the development kit.(not our custom board).
    • we decided implement  the buttonless dfu service first on DK.
    • ble example using  to add buttonless secure dfu service is "ble_app_hids_mouse"  

    (C:\nordic_semi\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_hids_mouse\pca10040\s132\ses).

    PROBLEMS

    1. First i tryed to implement the power management module and i included to but its showing some warning .I will give its screen short below . please help me to overcome that warning.

    changes i made in code screen short are below

    I following the step by step procedures in the document given by you .if there is any error or warning getting during procedures i will inform you like these .Is it fine for you?

  • Hi NANDHU, 

    Add #include "nrf_pwr_mgmt.h"  at the top of main.c

    (Updated)

    To initial services, you can start by copying the code from services_init() in the ble_app_buttonless_dfu to the services_init() function in ble_app_hids_mouse. Make sure you add the files in the nRF_DFU folder, i.e. ble_dfu.c, ble_dfu_bonded.c and ble_dfu_unbonded.c to the ble_app_hids_mouse example. Make sure that you change NRF_SDH_BLE_VS_UUID_COUNT to 2 in sdk_config.h as well as increase the RAM allocated to the SoftDevice. 

    -Amanda H.

  • Thanks a lot . If there is any issue ,i will text you.

Reply Children
Related