Meshtastic-Android icon indicating copy to clipboard operation
Meshtastic-Android copied to clipboard

[Feature Request] Add 'Update Firmware' option

Open chrisdebian opened this issue 1 year ago • 7 comments

Related to #1031

When a device is connected, check the firmware version, and give the user the option to download and flash firmware. I suspect many users will not have updated the firmware, since original purchase/ flash.

Thanks,

Chris 2E0FRU

chrisdebian avatar May 14 '24 15:05 chrisdebian

Not sure if this could work over Bluetooth or WiFi as I don't believe Meshtastic has the ability for OTA updates like that. Also, lots of devices need to be manually placed in a flashing mode before they can have their firmware updated.

madeofstown avatar Jun 02 '24 15:06 madeofstown

I believe earlier versions of the android app were able to update esp32 devices over Bluetooth. I remember doing it for a t-beam...

prokrypt avatar Jun 02 '24 16:06 prokrypt

Not sure if this could work over Bluetooth or WiFi as I don't believe Meshtastic has the ability for OTA updates like that. Also, lots of devices need to be manually placed in a flashing mode before they can have their firmware updated.

Biggest issue is space available on most devices (4MB Flash) - is not enough to fit the running Firmware (2.2MB on most devices) and a second copy in the ota_2 partition to swap over to after sending up the new image.

At least thats how I understand it, i've been messing around in this space in a fork and that's basically what i've run into as been the real show stopper here...

Talie5in avatar Jun 04 '24 01:06 Talie5in

@Talie5in I see you have it working now in your fork. When are you doing a pull request?

madeofstown avatar Jun 06 '24 20:06 madeofstown

@Talie5in I see you have it working now in your fork. When are you doing a pull request?

@madeofstown Sorry, not sure how I missed this comment!

It does, however, as per my comment above, is not suitable for 4MB flash devices, it's a space limitation thing, and I only worked on the WiFi portion (over the webserver) and I did have to recraft the partition layout and make minimal builds (Eg, no screen, no modules, etc)

Short of, making the firmware much smaller or devices starting to come out with 8MB flash as a standard..

Alternatively, having the BLE_OTA firmware able to bootup and support WiFi/BLE from existing meshtastic config and a small webserver (for over WiFi) - this is the key, been booted into ota_1 so we can write to ota_0 partition :)

Talie5in avatar Aug 01 '24 04:08 Talie5in

At the very least, a warning letting users know there's a new update would be helpful!
Then down the line can open up OTA to those devices that support it.

jaredcat avatar Aug 05 '24 19:08 jaredcat

At the very least, a warning letting users know there's a new update would be helpful! Then down the line can open up OTA to those devices that support it.

https://github.com/meshtastic/Meshtastic-Android/blob/6d01fb4bc41b072903c4a2470bd78362b9474f3a/app/src/main/java/com/geeksville/mesh/MainActivity.kt#L349 this already exists if your current firmware is below the minversion. For your suggestion there would need to be a hosted api to query for the latest stable build (github maybe?).

jamesarich avatar Aug 05 '24 19:08 jamesarich

Not sure if this could work over Bluetooth or WiFi as I don't believe Meshtastic has the ability for OTA updates like that. Also, lots of devices need to be manually placed in a flashing mode before they can have their firmware updated.

only on nrf52 devices

cracky22 avatar Oct 27 '24 18:10 cracky22