From 8237ac2cb832e7514f9517a7360509f82a327dd0 Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Thu, 3 Sep 2026 12:52:54 +0200 Subject: [PATCH] Add function to get ESP firmware version Signed-off-by: Niel Nielsen --- armsrc/bwm_wifi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/armsrc/bwm_wifi.c b/armsrc/bwm_wifi.c index c25e8b5ce..15182da76 100644 --- a/armsrc/bwm_wifi.c +++ b/armsrc/bwm_wifi.c @@ -305,6 +305,11 @@ int bwm_wifi_forward_down(void) { // esp_ota_begin erases the target partition and esp_ota_end finalizes + sets the // boot slot, so those get generous timeouts. // --------------------------------------------------------------------------- +// Read the ESP's running firmware version string (APP_CMD_GET_VERSION_INFO). +int bwm_esp_get_version(uint8_t *buf, uint16_t *buflen) { + return bwm_cmd(BWM_CMD_GET_VERSION_INFO, NULL, 0, buf, buflen, 3000); +} + int bwm_esp_ota_begin(uint32_t total_size) { // SILENCE ESP log forwarding for the OTA. With it on, the ESP's background // log broadcasts (WiFi/coex/BLE) interleave with the per-chunk acks across