This is a JavaScript port of Adafruit's version of Nordic's nrfutil, reimplemented to work with WebSerial in modern browsers. We built this port to enable firmware updates (DFU) directly from Chrysalis, our graphical keyboard configuration tool.
This library provides the core functionality needed to perform Device Firmware Updates (DFU) on nRF52-based devices using the browser's WebSerial API. It maintains compatibility with the Nordic DFU protocol while enabling web-based firmware updates without requiring desktop applications.
- Upload firmware to nRF52 devices through WebSerial
- Support for multiple firmware types:
- Softdevice
- Bootloader
- Application
- Combined SD+BL packages
- Firmware validation before activation
- Device reset handling during update process
- Real-time progress reporting
- ZIP package support with manifest.json
- Browser with WebSerial API support (Chrome/Edge)
- nRF52-based device in DFU mode
- Properly formatted firmware packages (ZIP format)
Open the index.html file in a compatible browser, connect to your device, select a firmware package, and upload the firmware.
This implementation:
- Uses the WebSerial API for device communication
- Implements SLIP framing with CRC16 error checking
- Handles device reset and reconnection during the DFU process
- Unpacks and processes firmware ZIP packages
- Follows Nordic's DFU protocol specification
BSD 3-Clause License, as per the original Nordic Semiconductor implementation. See the LICENSE file for details.
- Original nrfutil by Nordic Semiconductor
- Python port by Adafruit
- JavaScript port by Keyboardio