HomeACcessoryKid / life-cycle-manager

Initial install, WiFi settings and over the air firmware upgrades for any esp-open-rtos repository on GitHub
Apache License 2.0
60 stars 11 forks source link

Question: How to flash by wire a device that is already running LCM without loosing Homekit settings #25

Closed peros550 closed 4 years ago

peros550 commented 4 years ago

Is it possible to sometimes flash by wire a device which is already running LCM & Homekit firmware?

Sometimes, during development it might be quicker to just flash a device rather than go though the OTA process.

Thanks once again for this excellent library.

HomeACcessoryKid commented 4 years ago

it is easy to do, just only write to sector 0x2000 your binary

esptool.py -p /dev/cu.usbserial-* --baud 230400 write_flash 0x2000 ./firmware/main.bin

One item of caution: normally people use my recommendation to calculate c# from the version number stored by LCM. If you change your homekit accessories definition, this must increase and I recommend using OTA in such a moment.

peros550 commented 4 years ago

many thanks! I'll give it a try!