Secure bootloader ble with UART

HI currently  i am utilizing sdk ver 17.1.10  nrf52840 s140 we are using dfu/secure_bootloader/pca10056_ble app and i need to add UART app to it so that so we need both bootloader ble  advertiser and with UART added to it   currently we have added UART to it but whenever we call app_uart_put() function it was unable to advertise if we comment this function it is advertising as dfuTarg can you suggest me any steps to add uart to the secure bootloader /ble so that both peripheral can be utilized f it is possible NOTE: We referred secure bootloader /pca10056_uart  example but in this sdk it will not advertise so we need both advertiser + Uart 

Parents
  • Hello,

    It should be possible to add uart to the BLE bootloader. But the way it is added in the bootloader is a bit strange.

    If you look at nrf_dfu_serial_uart.c, line 86:

    DFU_TRANSPORT_REGISTER(nrf_dfu_transport_t const uart_dfu_transport) =
    {
        .init_func  = uart_dfu_transport_init,
        .close_func = uart_dfu_transport_close,
    };

    So simply by including this file, uart will be added as a DFU transport layer. This is then fetched by nrf_dfu_transports_init() in nrf_dfu_transport.c.

    So it should be a matter of adding nrf_dfu_serial_uart.c (and including the folder that contains nrf_dfu_serial.h), and try to build. If it complains about lacking functions/files, then keep adding until it builds without warnings/errors.

    Best regards,

    Edvin

  • Oh, you may also need these in your sdk_config.h:

    // <h> nrf_dfu_serial_uart - UART DFU transport
    
    //==========================================================
    // <q> NRF_DFU_SERIAL_UART_USES_HWFC  - HWFC configuration
     
    
    #ifndef NRF_DFU_SERIAL_UART_USES_HWFC
    #define NRF_DFU_SERIAL_UART_USES_HWFC 1
    #endif
    
    // <o> NRF_DFU_SERIAL_UART_RX_BUFFERS - Number of RX buffers. 
    // <i> Number of buffers depends on flash access vs.
    // <i> transport throughtput. If value is too low it may lead
    // <i> to received packets being dropped.
    
    #ifndef NRF_DFU_SERIAL_UART_RX_BUFFERS
    #define NRF_DFU_SERIAL_UART_RX_BUFFERS 3
    #endif
    
    // </h> 
    //==========================================================
    
    // </h> 
    //==========================================================
    

    If it complains about other things that are lacking, look for it in the uart bootloader, and include it in your current bootloader.

    BR,
    Edvin

  • Hi our requirement is instead of writing the data in flash for new bin the same bin data should be tx via uart we will comment the flash writing part in bootloader_ble_debug NOTE: this one we need to achieve through he secure_booloader/ble_bootloader_debug sdk

  • Unfortunately, I still don't understand what you want help with, or if there is any issue at all.

    Hieu said:

    I really sorry, but I am still unclear what the problem or question is, or if there is any. 

    Could you please use shorter sentences and more punctuations?

  • 1. in secure bootloader/pca10056_ble_debug sdk we need to add uart

    2. For to tx the bin data to the other controller device 

  • My question was not what your requirements are. They were plenty clear from the diagrams.

    The question was: What do you need help with?

    I already provide links with details on the current solution in the nRF5 SDK.

  • 1. Hi i went through the links provided but i doesn't got much info to proceed further  i have attached files if you can tell us where it went wrong at least we can proceed further 

    2. \..\..\nRF5_SDK_17.1.0_ddde560_ver_1.1\examples\dfu\secure_bootloader\pca10056_s140_ble_debug

    3. we have added UART with wrapper function in nrf_dfu_flash.c file  and changes in the  nrf_dfu_utils.c file so that it can able to accept irrespective of size

    nRF5_SDK_17.1.0_ddde560_ver_1.1.zip

Reply Children
  • AP1 said:
    i have attached files if you can tell us where it went wrong at least we can proceed further 

    I usually only start considering debugging projects after there have been substantial evidences showing that it is necessary. That is not the case here. You will need to tell me what you have done, and what is not working in more details.

    If you need someone to help you with your project, we do have a list of Design Partners here: Design Partners - nordicsemi.com

    AP1 said:
    1. Hi i went through the links provided but i doesn't got much info to proceed further  i have attached files if you can tell us where it went wrong at least we can proceed further 

    I do not believe the links I provided you does not have information. Please go over discussions carefully, visit the links that the people provided. You will find references you can use in your implementation.

    If you insist that it doesn't help, please answer these questions:

    Have you tried the solution?
    Can you explain to me in some details why the discussion there does not help?
    What steps have you taken?
    What is not working?

    AP1 said:
    3. we have added UART with wrapper function in nrf_dfu_flash.c file  and changes in the  nrf_dfu_utils.c file so that it can able to accept irrespective of size

    This is the only detail you have given me, and I must ask, why did you do that?

    The size check is there for a very good reason: preventing new download from overwriting important data regions. If your downloaded binary does not pass the size check, that means the binary is too big.

Related