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

ble disconnection in dfu mode

Hi All,

i am working on SDK-14.2, i am facing issue with ble disconnection in dfu mode.

by using nrf-Connect in mobile i am upgrading the firmware, but it lost connection when dfu reaches 15-20%. after that it re-connect with device and still in dfu mode.

when i re-Select  the zip file. it start again where dfu stops.

there is one more problem with the speed, it takes around 5-7 min to complete the dfu process.

please see the log in the snapshot.

please help me to resolved the issue.

Thanks,

Prateek

Parents
  • Hi Prateek.

    Which examples are you using? Are you using any of the DFU bootloader examples, and which one?

    - Andreas

  • Hi Andreas,

    I am using my custom code with the help of DFU Bootloader Example.

    In Previous, i am using sdk-11 which works fine in dfu and i am not getting any issue with DFU, while currently i am upgrading my sdk to 14.2 in which i am getting this issue.

    Thanks,

    Prateek

  • Hi Prateek.

    Could you please upload your project so I can have a look at it?

    - Andreas

  • Hi Andreas,

    i can't upload complete project to thread. you can ask me the section you want to look.

    Thanks,

    Prateek

  • Hi Prateek.

    I really need more information in order to be able to help you. Can you post any debug output? Output during the dfu? Are you using Watchdog? Can you please add your main.c and sdk_config.h?

    - Andreas

  • Hi Andreas,

    I am uploading main.c and sdk_config.h, i am not using watchdog in this.

    i am using

    Moto G5S plus - Android 8.1.0 - finding multiple time disconnection issue - 0x85,0x08 error code

    Nexus 6P - Android 8.1.0 - Single time disconnection issue - 0x85,0x08 error code

    /**
     * Copyright (c) 2016 - 2017, Nordic Semiconductor ASA
     * 
     * All rights reserved.
     * 
     * Redistribution and use in source and binary forms, with or without modification,
     * are permitted provided that the following conditions are met:
     * 
     * 1. Redistributions of source code must retain the above copyright notice, this
     *    list of conditions and the following disclaimer.
     * 
     * 2. Redistributions in binary form, except as embedded into a Nordic
     *    Semiconductor ASA integrated circuit in a product or a software update for
     *    such product, must reproduce the above copyright notice, this list of
     *    conditions and the following disclaimer in the documentation and/or other
     *    materials provided with the distribution.
     * 
     * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
     *    contributors may be used to endorse or promote products derived from this
     *    software without specific prior written permission.
     * 
     * 4. This software, with or without modification, must only be used with a
     *    Nordic Semiconductor ASA integrated circuit.
     * 
     * 5. Any software provided in binary form under this license must not be reverse
     *    engineered, decompiled, modified and/or disassembled.
     * 
     * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
     * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
     * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     * 
     */
    /** @file
     *
     * @defgroup bootloader_secure_ble main.c
     * @{
     * @ingroup dfu_bootloader_api
     * @brief Bootloader project main file for secure DFU.
     *
     */
    
    #include <stdint.h>
    #include "boards.h"
    #include "nrf_mbr.h"
    #include "nrf_bootloader.h"
    #include "nrf_bootloader_app_start.h"
    #include "nrf_dfu.h"
    #include "nrf_dfu_types.h"
    #include "nrf_log.h"
    #include "nrf_log_ctrl.h"
    #include "nrf_log_default_backends.h"
    #include "app_error.h"
    #include "app_error_weak.h"
    #include "nrf_bootloader_info.h"
    
    /*#include "nrf52.h"
    #include "nrf_soc.h"
    #include "nrf52_bitfields.h"
    #include "nrf_dfu_settings.h"*/
    
    
    
    
    #define BOOTLOADER_BUTTON   (BSP_BUTTON_3)          /**< Button for entering DFU mode. */
    #define BL_SETTING_BASE            (0x7B000UL)
    #define DFUSETTING                 ((nrf_dfu_settings_t       *)   BL_SETTING_BASE )
    
    
    void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
    {
        NRF_LOG_ERROR("Received a fault! id: 0x%08x, pc: 0x%08x, info: 0x%08x", id, pc, info);
        NVIC_SystemReset();
    }
    
    
    void app_error_handler_bare(uint32_t error_code)
    {
        (void)error_code;
        NRF_LOG_ERROR("Received an error: 0x%08x!", error_code);
        NVIC_SystemReset();
    }
    
    
    
    /**@brief Implementation to use button press to enter bootloader
     */
    bool nrf_dfu_button_enter_check(void)
    {
        if (nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0)
        {
            return true;
        }
        
        return false;
    }
    
    
    /**@brief Function for application main entry. */
    int main(void)
    {
        uint32_t ret_val;
    
        (void) NRF_LOG_INIT(NULL);
        NRF_LOG_DEFAULT_BACKENDS_INIT();
    
        NRF_LOG_INFO("Inside main");
    
        //leds_init();
        NRF_LOG_INFO("33333333 main");
    
        NRF_LOG_INFO("s_dfu_settings.enter_buttonless_dfu Inside main");
    //	NRF_LOG_DEBUG("Running nrf_bootloader_app_start with address: 0x%08x", s_dfu_settings.enter_buttonless_dfu);
        //buttons_init();
    
        ret_val = nrf_bootloader_init();
        NRF_LOG_INFO("444444444444 main");
        APP_ERROR_CHECK(ret_val);
    
        // Either there was no DFU functionality enabled in this project or the DFU module detected
        // no ongoing DFU operation and found a valid main application.
        // Boot the main application.
        nrf_bootloader_app_start(MAIN_APPLICATION_START_ADDR);
    
        // Should never be reached.
        NRF_LOG_INFO("After main");
    }
    
    /**
     * @}
     */
    
    6811.sdk_config.h

  • Hi.

    I'm not able to reproduce the error with the main.c file and sdk_config.h file you supplied. Could you please upload the project in a .zip file or do a debug in Segger Embedded Studio as I suggested previous?

    - Andreas

Reply Children
  • Hi Andreas,

    My hole application is based on ARMGCC and i am in last stage of the project, in that i am not able to use any other tools for the development. as i debug this in nrf Connect, i am getting  error code ( 0x85, 0x08, 0x16).

    please help me to resolved the error, if you have nos of solution, provide me i am trying everything asap.

    thanks.

  • Hi Prateek.

    As I previously said, based on the information you have provided I cannot draw any conclusion to what may cause your problem. To understand the events leading up to this issue the project must be debugged, either by you or me. The error codes you provide gives little insight to where or what has gone wrong in the code.

    Please debug the project or upload it in a .zip file so that I can debug it.

     - Andreas

Related