Back in school my friends all flashed their mcus with 4-8MB images over serial with 115200 baud. I set up ota updates over wifi. They were all fascinated by my speedy flashes. However when I offered to help them set it up not one was interested because their setup was working as is and slow flashing is not a “bad” thing since it gave them an excuse to do.other things.
Comment on No JS, No CSS, No HTML: online "clubs" celebrate plainer websites
Agent641@lemmy.world 1 day agoWe can go further. We could take away your fancy "URL"s and just use IP addresses for navigation.
Heck, we could do away with TCP/IP altogether and network over serial.
raldone01@lemmy.world 23 hours ago
DontNoodles@discuss.tchncs.de 19 hours ago
You’ve convinced me to learn and implement OTA on my 8266. Thanks!
raldone01@lemmy.world 14 hours ago
I used this script:
import Axios from 'axios' import OldFS from 'fs' import { PromiseChain } from '@feather-ink/ts-utils' const fs = OldFS.promises const image = process.argv[2] const destination = `http://${process.argv[3]}/vfs/ota` const now = process.argv[4] === 'now' const once = process.argv[4] === 'once' async function triggerUpdate(): Promise<void> { console.log('Uploading new binary') const file = await fs.readFile(image) await Axios({ method: 'POST', url: destination, headers: { 'Content-Type': 'application/octet-stream', 'Content-Length': file.byteLength }, data: file }) console.log('Finished uploading') } (async () => { const updateChain = new PromiseChain() console.log(`Watching file '${image}' for changes\nWill upload to '${destination}'!`) if (once) { await triggerUpdate() return } if (now) await updateChain.enqueue(triggerUpdate) OldFS.watch(image, async (eventType) => { if (eventType !== 'change') return let succ = false do { try { console.log('Change detected') await updateChain.enqueue(triggerUpdate) succ = true } catch (e) { console.error(e) console.log('Retrying upload') } } while (!succ) console.log('Upload finished') }) })()
raldone01@lemmy.world 14 hours ago
Hahahah. Awesome. Have fun! You just need a simple webserver. The builtin one will do and then you use the ota functions of the ESP IDF.
hakunawazo@lemmy.world 18 hours ago
At this point: Just sing the voice dial tone by yourself.