Call for testing finalized WebREPL setup (before 1.8 release)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Call for testing finalized WebREPL setup (before 1.8 release)

Post by pfalcon » Sat Apr 30, 2016 6:08 pm

We're approaching general availability release time soon. The last thing we had in our list which clearly "a TODO" vs "a known issue" is support for password for WebREPL. Well, this feature is finally implemented, along with a way to set the initial password.

The code is now in the master, and works for me as expected. Generally, the release depends on this feature to be tested well enough, so we appreciate your help. Start build as usual, don't forget to erase flash before "make deploy". WebREPL is still not enabled on boot in master, to help folks diagnose issues easier. But auto-start works for me, and if you're brave, uncomment corresponding line in scripts/inisetup.py before you start build.

That's it, after you boot and execute "import webrepl; webrepl.start()", first time you connect via WebREPL client (https://github.com/micropython/webrepl), you will be asked to setup password. After reboot, WebREPL will work on production mode and ask this password on connect.
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: Call for testing finalized WebREPL setup

Post by pfalcon » Sat Apr 30, 2016 6:08 pm

webrepl_cli.py wasn't yet updated to handle password.
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/

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Call for testing finalized WebREPL setup

Post by Roberthh » Sat Apr 30, 2016 6:27 pm

I cannot even find webrepl_cli.py in master.

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

Re: Call for testing finalized WebREPL setup

Post by pfalcon » Sat Apr 30, 2016 6:31 pm

Roberthh wrote:I cannot even find webrepl_cli.py in master.
This thread provides information about it: http://forum.micropython.org/viewtopic.php?f=16&t=1757
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/

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Call for testing finalized WebREPL setup

Post by Roberthh » Sat Apr 30, 2016 6:55 pm

Thanks for the reply. It looks as if that is part of the early access package which I did no book. No problem, I'll wait
Regards, Robert

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

Re: Call for testing finalized WebREPL setup

Post by pfalcon » Sat Apr 30, 2016 7:50 pm

WebREPL clients (including webrepl_cli.py) are available at https://github.com/micropython/webrepl . Thread linked above contains additional information what it is, how out use it, etc. But again, it (webrepl_cli.py) is not needed (not work yet) for the testing being called for in this thread.
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/

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: Call for testing finalized WebREPL setup

Post by mad474 » Sat Apr 30, 2016 8:26 pm

Apparently just in time back in town and ready to test. Maybe I've missed something but I'm getting the following build error after successfully building axtls:

Code: Select all

~/micropython/esp8266$ make 
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC ../py/modbuiltins.c
In file included from ../py/objint.h:30:0,
                 from ../py/modbuiltins.c:32:
./mpconfigport.h:110:23: error: 'MP_QSTR_help' undeclared here (not in a function)
     { MP_OBJ_NEW_QSTR(MP_QSTR_help), (mp_obj_t)&mp_builtin_help_obj }, \
                       ^
../py/obj.h:163:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
 #define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 0x00000006))
                                                        ^
../py/modbuiltins.c:726:5: note: in expansion of macro 'MICROPY_PORT_BUILTINS'
     MICROPY_PORT_BUILTINS
     ^
../py/mkrules.mk:47: recipe for target 'build/py/modbuiltins.o' failed
make: *** [build/py/modbuiltins.o] Error 1
... haven't taken a closer look yet.

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

Re: Call for testing finalized WebREPL setup

Post by pfalcon » Sat Apr 30, 2016 8:30 pm

Please try/confirm that you tried "make clean".
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/

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: Call for testing finalized WebREPL setup

Post by mad474 » Sat Apr 30, 2016 8:34 pm

pfalcon wrote:"make clean".
Thanks, this did it.

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: Call for testing finalized WebREPL setup

Post by mad474 » Sat Apr 30, 2016 9:21 pm

Now briefly but successfully tested WebREPL with password on 8m/1MB ESP01! Very good work, if I may say this. The password procedure worked as described.

Two tiny remarks:
1. In order to have the cursor in the right place (this is after "New password:") I first had to click into the window. You can't simply start typing. Here's a screenshot to explain ...
2016-04-30-224618_1596x855_scrot.png
2016-04-30-224618_1596x855_scrot.png (21.06 KiB) Viewed 8268 times
Iceweasel/Firefox 46.0a2.

2. Module "webrepl" was already loaded on initial boot (before applying the password) but on reboot (after applying password) I had to "import webrepl". I guess I wasn't brave enough uncommenting corresponding line in scripts/inisetup.py.

I'll do some additional testing tomorrow. Thanks again for the huge achievements!

Locked