Redirect REPL to a socket

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Redirect REPL to a socket

Post by deshipu » Sat Mar 26, 2016 9:35 pm

I know that we are going to get an awesome websocket-based REPL through a web browser, but in the mean time I'm wondering if it would be possible to do something similar to this example from nodemcu, https://github.com/nodemcu/nodemcu-firm ... telnet.lua , where you basically get a REPL on a network socket. Is this already possible with the REPL implementation that the current alpha versions have?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Redirect REPL to a socket

Post by pfalcon » Sun Mar 27, 2016 2:54 pm

This functionality is based on os.dupterm(). The best thing I can recommend now if you're interested in that stuff is to read up on it (in usual places - docs, wiki, bugs, source code (including other ports)) - we really need people knowledgeable in that area. I wouldn't recommend going beyond that for now - the natural way would be us delivering webrepl first, and then you be able to do the above, not the other way around. And it's still WIP.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Redirect REPL to a socket

Post by pfalcon » Fri Jul 01, 2016 11:09 am

As a future change notification, dupterm interface will change soon. Please review and subscribe to https://github.com/micropython/micropython/issues/2208 to stay in loop (if you're interested in this topic of course).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

Post Reply