Since ESP8266 can self program on wifi, can we use it to program arduino too with the binary sent via wifi? my arduino is connected with reset+RX+TX pins and shared power. Has this been already done?
1 Answer
If you use Linux, you can use a simple Telnet to Serial sketch in esp8266 to upload with avrdude to Uno over esp8266. Only on Linux can avrdude use telnet to do a serial upload.
For upload from IDE on any OS there is JeeLabs ESP Link firmware for the esp8266.
-
plenty of ways on other os to patch things so arduino looks to be connected over serial as far as avrdude is concerned- for example com0com makes virtual serial ports...– AbelMar 17, 2022 at 23:24
-
-
haven't done it for avrdude yet, but i did have the need to do something similar for a serial user interface program to connect to a stream that had to be encapsulated by ssh first.– AbelMar 18, 2022 at 11:54
-
tested with pi in the middle (avrdude-com0com-customExe-pi-customProgram-uno). gotchas found: bootloader baud, and stable re-entry to bootloader. no reason to believe any other program attempting this over serial would behave differently. i implemented re-entry via usb port poweroff and poweron via rpi uhubctl, but it might be possible with hardware (reset pin), a modified bootloader, or crashing? the main on command (casting 0 to a function pointer and calling it).– AbelMar 20, 2022 at 13:43
-
@Abel, my sketch linked in the answer resets the target at new telnet connection. what problem with baud rate?– Juraj ♦Mar 20, 2022 at 14:45