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 want to perform FUOTA(Firmware update over the air) for my Nordic controller NRF52840 using Azure as host.
Please suggest how to do this .
Hi Einar,
>> I am uploading installSDKdirectory\examples\dfu\secure_bootloader\pca10056_uart this code to my nrf52 device, After uploading this code led 4 is continuously on.
>>UART communication is working well in normal condition without bootloader.
>>yes i configured the bootloader UART in the same way as the application.
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.
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.