Add OTA firmware update support for NRF52840 and ESP32 platforms#14
Draft
Add OTA firmware update support for NRF52840 and ESP32 platforms#14
Conversation
Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add OTA DFU support for NRF52840 in Home Assistant Integration
Add OTA DFU firmware update support for NRF52840 devices
Feb 12, 2026
Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
…tract constant Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
Copilot
AI
changed the title
Add OTA DFU firmware update support for NRF52840 devices
Add ESP32 BLE OTA support alongside NRF52840 Nordic DFU
Feb 12, 2026
Co-authored-by: Misiu <1741838+Misiu@users.noreply.github.com>
Copilot
AI
changed the title
Add ESP32 BLE OTA support alongside NRF52840 Nordic DFU
Add OTA firmware update support for NRF52840 and ESP32 platforms
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements BLE OTA firmware updates triggered from Home Assistant, supporting both NRF52840 (Nordic DFU) and ESP32 (direct BLE OTA) platforms per OpenDisplay_Firmware#1.
NRF52840: Nordic DFU via bootloader
ble/nrf_dfu.py— Full Nordic Secure DFU protocol implementation (service0xFE59): SELECT/CREATE/CRC/EXECUTE opcodes, 4096-byte data objects, init packet validationNRF52840.zip(the only asset containing both the.datinit packet and.binfirmware required by the bootloader —.hex/.uf2lack the init packet)0x0044→ device resets into Adafruit DFU bootloader → scans by service UUID → connects and flashesESP32: BLE OTA via application firmware
ble/esp32_ota.py— Three-command protocol mirroring the direct-write pattern:0x0046OTA Start (4-byte LE size) →0x0047OTA Data (200-byte chunks, ACK per chunk) →0x0048OTA End → reboot.bin(excludes_full.binmerged images)Platform-aware update entity
update.py—async_install()readssystem.ic_typefrom TLV config to dispatch:ic_type=1(NRF52840) →_install_nrf52840()→ Nordic DFUic_type=2,3,4(ESP32-S3/C3/C6) →_install_esp32()→ BLE OTA_get_firmware_download_url()resolves correct GitHub release asset per IC typeUpdateEntityFeature.INSTALL | PROGRESSwith percentage callbackOther
protocol_open_display.py—CMD_OTA_START/CMD_OTA_DATA/CMD_OTA_ENDconstants,enter_dfu_mode()methodble/__init__.py— Exportsperform_esp32_ota,perform_dfu_update,parse_dfu_packagestrings.json— DFU and ESP32 OTA error strings, updated preview feature description💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.