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, 

    This Master boot record and bootloader section elaborated more detail. 

    The SoftDevice supports the use of a bootloader. A bootloader may be used to update the firmware on the SoC.

    -Amanda H.

  • Hi ,

           I think when we turn OFF the device and turn ON  first the execution goes through the bootloader part and then goes through the application part. 

    • I done the OTA-DFU update successfully using the bootloder with button                                       (ieC:\nordic_semi\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\dfu\bootloader_secure_ble\pca10040_debug\ses).
    • And also done the OTA -DFU on our custom board (ie our mouse) with the above bootloader code .But i changed the LED PINS and BOOTLODER BUTTON which is feasible to our custom board.The OTA-DFU done successfully using nRF Toolbox mobile app and with our custom board.If we hold the bootloader button while turning ON our custom board its going to the DFU mode too.

    NOW I WANT TO DO THE  BUTTONLESS OTA -DFU  AND IMPLEMENT IT INTO OUR CUSTOM BOARD. 

    • I gone through your documentation about Buttonless  DFU  Template Application and i done the buttonless OTA-DFU successfully on development kit .

    I WILL EXPLAIN THE PROCEDURES I DID FOR BUTTONLESS OTA -DFU.

    • First i flashed the softdevice hex to the nRF52832 soc in the DK (....\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\dfu\secure_dfu_test_images\ble\nrf52832\softdevice_s132.hex).
    • Then i flashed the bootloader hex to the DK.(....\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\dfu\secure_dfu_test_images\ble\nrf52832\bootloader_secure_ble_debug_without_bonds_s132.hex).

    NOW THE DEVICE (DK) WILL ADVERTISE AS "DfuTest"

    • Then using nRFConnect desktop app i connected to "DfuTest" and update the ble_app_buttonless_dfu application hex over the air sucessfully. (....\nRF5_SDK_14.2.0_17b948a\nRF5_SDK_14.2.0_17b948a\examples\dfu\secure_dfu_test_images\ble\nrf52832\ble_app_buttonless_dfu_with_bonds_s132_with_setting_page.hex).

    NOW IT WILL ADVERTISE AS "Nordic_Buttonless"

    • Then using nRFConnect desktop app i connected to "Nordic_Buttonless" and update the  same application hex again and its also done sucessfully.

    MY DOUBTS

    1. Where is the buttonless bootloader code in  sdk. ( ie these "bootloader_secure_ble_debug_without_bonds_s132.hex "file code ).
    2. I want to change our application code to buttonless DFU-OTA supporting application how can i did these .
    3. If you find difficult with our application please just tell me how to change the "ble_app_hids_mouse" application to a buttonless DFU -OTA  supporting  application.

    please answer to my doubts 1 2 and 3.

  • SORRY ONE CORRECTION I UPLOADED THE ZIP FILE OF APPLICATION USING nRF Connect NOT  hex FILE

Reply Children
Related