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

FUOTA(Firmware update over the air) of Nordic controller NRF52840 using Azure as host.

I want to perform FUOTA(Firmware update over the air) for my Nordic controller NRF52840 using Azure as host. 

Please suggest how to do this .

  • I see. There could be another issue. Referring to dfu_transport_serial.py and this code:

        def __ensure_bootloader(self):
            lister = DeviceLister()
    
            device = None
            start = datetime.now()
            while not device and datetime.now() - start < timedelta(seconds=self.timeout):
                time.sleep(0.5)
                device = lister.get_device(com=self.com_port)
    
            if device:
                device_serial_number = device.serial_number
    
                if not self.__is_device_in_bootloader_mode(device):
                    retry_count = 10
                    wait_time_ms = 500
    
                    trigger = DFUTrigger()
                    try:
                        trigger.enter_bootloader_mode(device)
                        logger.info("Serial: DFU bootloader was triggered")
                    except NordicSemiException as err:
                        logger.error(err)
    
    
                    for checks in range(retry_count):
                        logger.info("Serial: Waiting {} ms for device to enter bootloader {}/{} time"\
                        .format(500, checks + 1, retry_count))
    
                        time.sleep(wait_time_ms / 1000.0)
    
                        device = lister.get_device(serial_number=device_serial_number)
                        if self.__is_device_in_bootloader_mode(device):
                            self.com_port = device.get_first_available_com_port()
                            break
    
                    trigger.clean()
                if not self.__is_device_in_bootloader_mode(device):
                    logger.info("Serial: Device is either not in bootloader mode, or using an unsupported bootloader.")
    
        def __is_device_in_bootloader_mode(self, device):
            if not device:
                return False
    
            #  Return true if nrf bootloader or Jlink interface detected.
            return ((device.vendor_id.lower() == '1915' and device.product_id.lower() == '521f') # nRF52 SDFU USB
                 or (device.vendor_id.lower() == '1366' and device.product_id.lower() == '0105') # JLink CDC UART Port
                 or (device.vendor_id.lower() == '1366' and device.product_id.lower() == '1015'))# JLink CDC UART Port (MSD)
    

    You can see that nrfutil looks at the USB vendor ID to check if the device is in DFU mode, and if not it attempts to trigger DFU mode (that only works via the nRF52840's USB interface though). If you are not using a J-Link debugger as USB-UART bridge nrfutil will assume the device is not in DFU mode. So you either need to use a different debug probe, or (probably more relevant), modify __is_device_in_bootloader_mode.

  • Hi ,

    I went through the links above but they don't look of much help , can you please give some more details on how to proceed after writing the FW on flash. 

    We are using SDK v17 and chip nrf52840 .

    Any help would be nice.

    thanks .

  • Hi,

    Nordic does not provide a ready made example, nor do I have any. There are several threads discussing this before so you could look on this forum, for instance at this post, which has an unofficial example.

Related