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

DFU for HRS application in nRF5_SDK_16.0.0_98a08e2

Hello All,

I am now planning to add DFU service to my HRS application (examples\ble_peripheral\ble_app_hrs\pca10040\s132\ses

I am using SDK nRF5_SDK_16.0.0_98a08e2. 

But I haven't found any DFU integrated project for HRS in this SDK. 

Where can I start? Any pointers can help. 

Regards

Lakshmikanth. 

Parents
  • Hello,

    I would recommend that you use Buttonless DFU Template Application example as a reference and start by including the DFU dependencies and settings it uses to your HRS project. That is the main step to integrate buttonless DFU into any app.

    Required source files (these can be inserted directly into the *.emProject file instead of adding them manually in SES):

        <folder Name="nRF_DFU">
          <file file_name="../../../../../../components/ble/ble_services/ble_dfu/ble_dfu.c" />
          <file file_name="../../../../../../components/ble/ble_services/ble_dfu/ble_dfu_unbonded.c" />
        </folder>
        <folder Name="nRF_SVC">
          <file file_name="../../../../../../components/libraries/bootloader/dfu/nrf_dfu_svci.c" />
        </folder>

    And preprocessor definitions:

     - BL_SETTINGS_ACCESS_ONLY

     - NRF_DFU_SVCI_ENABLED

     - NRF_DFU_TRANSPORT_BLE=1

    Regards,

    Vidar

  • Hi Vidar,

    I took the project from  nRF\examples\ble_peripheral\ble_app_bps\ble_app_buttonless_dfu\pca10040\s132\ses

    However when I try to build it produces build errors and not finding the source. I had to modify the below relative path for all the source files listed in .emproject file. 

    file file_name="../../../../../../components/libraries/log/src/nrf_log_default_backends.c"   It seems all these entries are one directory behind for actual location. I have to add a ../ for each entry listed in this project file. 

    Is there any other way I can modify the relative path to update .emproject file in oneshot? 

    Regards

    Lakshmi

  • Hi Lakshmi,

    sd_ble_uuid_vs_add() returns no memory when the Softdevice does not have a free slot left for the new 128-bit base UUID you're trying to add (uuid for the buttonless DFU characteristic in this case). The solution for this is to increase the NRF_SDH_BLE_VS_UUID_COUNT setting in sdk_config.h. But note that after this change, you may get an error message in the debug log saying that the Softdevice does not have enough memory for the current configuration. To fix that you need to use the new proposed RAM settings from the debug log.

    Regards,

    Vidar

  • Hi Vidar,

    My NRF_SDH_BLE_VS_UUID_COUNT value is set to 0 in sdk_config.h. I made it 1. 

    Now sd_ble_enable () in ble_stack_init() API even before services_init() throwing NRF_ERROR_NO_MEM. 

    Are there any guidelines or documentaion available on how to add vendor specific service ? 

    I have one more query, slightly off the topic but regarding same application. 

    Does HRS example contain softdevice + application? or only application? 

    If I would like to encrypt this app with my private key, is it enough to generate only application or anything else needed? 

    Regards

    Lakshmi

  • Another thing, I am not having UART on my board. where can I check debug log?

  • Hi Vidar, I changed RAM_START  from  0x20002bd0 to 0x2000ffdc as per sd_ble_enable() suggestion. But the below build error is showing up. What else can I change?  

    -Lakshmi

  • Hi Lakshmi,

    You also need to adjust RAM_SIZE to not overflow RAM. If you use a Segger Jlink debugger you may try to enable logging over Segger RTT (uses debug interface)

    Settings in sdk_configh.h to enable logging over RTT:

    Once you have enabled RTT you should be able to view log messages in the debug terminal during debug sessions. Like this:

    And these are the RAM settings to update with the suggested values from the log:


    Lakshmikanth Satyavolu said:
    Does HRS example contain softdevice + application? or only application? 

    It only contains the application. But SES loads the Softdevice hex file along with the application when programming, so you don't have to program it separately.

    Lakshmikanth Satyavolu said:
    If I would like to encrypt this app with my private key, is it enough to generate only application or anything else needed? 

     Encryption is not implemented in our DFU solution, only Signature Verification.

Reply
  • Hi Lakshmi,

    You also need to adjust RAM_SIZE to not overflow RAM. If you use a Segger Jlink debugger you may try to enable logging over Segger RTT (uses debug interface)

    Settings in sdk_configh.h to enable logging over RTT:

    Once you have enabled RTT you should be able to view log messages in the debug terminal during debug sessions. Like this:

    And these are the RAM settings to update with the suggested values from the log:


    Lakshmikanth Satyavolu said:
    Does HRS example contain softdevice + application? or only application? 

    It only contains the application. But SES loads the Softdevice hex file along with the application when programming, so you don't have to program it separately.

    Lakshmikanth Satyavolu said:
    If I would like to encrypt this app with my private key, is it enough to generate only application or anything else needed? 

     Encryption is not implemented in our DFU solution, only Signature Verification.

Children
No Data
Related