5 ms·
One thing I really want for the ESP8266 is REPL-over-WiFi with persistence. MicroPython doesn't seem to have this AFAICT and from the docs Forth doesn't either.
by CamTin 8y ago
One thing I really want for the ESP8266 is REPL-over-WiFi with persistence. MicroPython doesn't seem to have this AFAICT and from the docs Forth doesn't either. Does anybody know of an environment for the 8266 that has a feature like this? I don't really care if the language is Forth or Lisp or Python, but I'd like to be able to modify a live running environment on an embedded device over the network.
- exikyut 8y agoThat sounds like an awesome idea. I think I know what one of my first ever embedded projects might be... One of the first things that comes to mind with such a system is security. After thinking about this for a few minutes I think the best general-purpose safe solution would be a button and a switch that requires the button to be pressed whenever a new TCP connection is accepted if the switch is "on", the idea being that you switch security off for repeated reconnects and back on once the device is shoved somewhere inaccessible. The ESP8266 apparently offers TLS 1.2, and that would probably be the best production solution, but I mention the above as a dead-simple fallback that requires very little program memory, would be simple enough to implement in an hour even if you have absolutely no idea what you were doing, and involves buttons and switches :P
- kbr2000 8y agoHey, you can access the PunyForth over a TCP session (as implemented here: https://github.com/zeroflag/punyforth/blob/master/arch/esp8266/forth/tcp-repl.forth https://github.com/zeroflag/punyforth/blob/master/arch/esp82...). Not sure what you mean with "persistence", you can write to memory in one session, and read back in another? Or are you talking about the stack here? EDIT: swapped for correct URL
- CamTin 8y agoI mean that I would like the running image I am building in Forth to persist in non-volatile storage (so if I power the device off and back on, the program remains). Is this possible?
- sigjuice 8y agoWhat does "stack" mean in this context? TCP stack or Forth stack?
- kbr2000 8y agoI was referring to the Forth stack in my question about what was ment with persistence in this particular case.
- alexose 8y agoMicropython does have a Wifi REPL, although it's not enabled by default: https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/repl.html https://docs.micropython.org/en/latest/esp8266/esp8266/tutor...
- craftyguy 8y agoYep, and it works really well. You can even send arbitrary files to the device over the webrepl.