We 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.
Comment on No JS, No CSS, No HTML: online "clubs" celebrate plainer websites
Banthex@feddit.org 3 weeks agoJesus. This is getting out of hand.
We 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.
At this point: Just sing the voice dial tone by yourself.
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.
You’ve convinced me to learn and implement OTA on my 8266. Thanks!
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') }) })()
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.
I photocopied my screen (those all in one printers are heavy) and I cannot find the glue little help?
MonkderVierte@lemmy.zip 3 weeks ago
Forces one to avoid deep links and parameter crap. I’m sorta two minds about this.