Page 1 of 3

Call for testing finalized WebREPL setup (before 1.8 release)

Posted: Sat Apr 30, 2016 6:08 pm
by pfalcon
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.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 6:08 pm
by pfalcon
webrepl_cli.py wasn't yet updated to handle password.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 6:27 pm
by Roberthh
I cannot even find webrepl_cli.py in master.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 6:31 pm
by pfalcon
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

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 6:55 pm
by Roberthh
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

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 7:50 pm
by pfalcon
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.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 8:26 pm
by mad474
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.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 8:30 pm
by pfalcon
Please try/confirm that you tried "make clean".

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 8:34 pm
by mad474
pfalcon wrote:"make clean".
Thanks, this did it.

Re: Call for testing finalized WebREPL setup

Posted: Sat Apr 30, 2016 9:21 pm
by mad474
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 8290 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!