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 

  • Hello,

    The length (and the signature of the image) is checked after the init packet is sent. 

    From what I understand you have this setup:

    [Mobile device (or other BLE device)] <--- BLE ---> [nRF device running a modified BLE bootloader] <--- UART ---> [nRF running a UART bootloader]

    right?

    So where do you want to check the length? On the device in the middle, or on the nRF running the UART bootloader?

    And how do you generate your DFU images? Using nrfutil? Or are you sending the raw binary files somehow?

    If you are using nrfutil to generate the DFU image (zip file), then it contains the init packet (containing information about length and signature), and the actual DFU image, containing the new application.

    The place that normally checks the init packet (and thus, the length) is the function: nrf_dfu_validation_init_cmd_execute(). But you should decide whether you need to check this on your BLE device, or if you should just forward the command that initializes this check to the UART bootloader.

    Best regards,

    Edvin

  • Hi thanks for the reply our setup 

    1. Ble bootloader without any modification in this we need to achieve accept non ble bins and TX the non ble bins in uart irrespective of size

    2. so we already able to perform non ble bins DFU OTA for any length thats working fine but we need an UART in the ble boorloader code so that we can tranfer the bin data over UART 

    requirement

    1. it can able to accept non ble bins irrespective of the length 

    2. we wiill add uart to the ble bootloader for only to transmit ,RX is not required for us

    Description :

    1. In UART bootloader sdk  it will not advertise but it has only UART RX but we need both TX and ble bootloader advertise 

    Note : so we need a sdk where it will advertise in dfu mode whenever required  and able to perform dfu ota through mobile app for both  ble bins and non ble bins and  also should TX the non ble bins which is received through ble bootloader via UART TX PIN and write the nordic ble bins to the flash area as it is with dfu process

  • Hi edvin i have provided the feature requirement anything on this one 

  • Hi i have updated the requirement can please go through it 

  • 1. Hi currently i am using nrf52840 sdk ver 17.1.0 s140 sd we have added UART in the secure bootloader/ Bootloader_ble_debug  

    2. we can able to send multiple bytes once  ie 53 46 30 04 02 01 00 FF 00 00 45 46 on reset of device 

    3. we have sending through the func  ret_code_t ret = nrf_drv_uart_tx(&m_uart, data, sizeof(data));

    4. while we tried to connect from mobile app but we are unable to connect to dfuTarg 

    Logs

    <info> app: Inside main
    <debug> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate
    <info> app: No firmware to activate.
    <info> app: Boot validation failed. No valid app to boot.
    <debug> app: DFU mode because app is not valid.
    <info> nrf_bootloader_wdt: WDT is not enabled
    <debug> app: in weak nrf_dfu_init_user
    <debug> app: timer_stop (0x200059BC)
    <debug> app: timer_activate (0x200059BC)
    <info> app: Entering DFU mode.
    <debug> app: Initializing transports (found: 2)
    <debug> nrf_dfu_ble: Initializing BLE DFU transport
    <debug> nrf_dfu_ble: Setting up vector table: 0x000E8000
    <debug> nrf_dfu_ble: Enabling SoftDevice.
    <debug> nrf_dfu_ble: Configuring BLE stack.
    <debug> nrf_dfu_ble: Enabling the BLE stack.
    <debug> nrf_dfu_ble: No advertising name found
    <debug> nrf_dfu_ble: Using default advertising name
    <debug> nrf_dfu_ble: Advertising...
    <debug> nrf_dfu_ble: BLE DFU transport initialized.
    <debug> nrf_dfu_serial_uart: serial_dfu_transport_init()
    <debug> nrf_dfu_serial_uart: serial_dfu_transport_init() completed
    <info> nrf_dfu_serial_uart: Sending initial byte 0x24
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
    <debug> app: Enter main loop

    our settings as follows

Related