Early access releases #3 & #4

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

Re: Early access release #3

Post by deshipu » Tue Apr 12, 2016 6:37 am

You released v3 just as I was leaving for a conference (on which we had workshop using your Micropyhon for ESP8266!), and now I'm going to be out of the loop for a couple more days. I see there is a filesystem support now in the github, which is great. I would have never guessed the python part of it by myself, though.
I quickly tested the webrepl on the Huzzah Feather, and it seems to be working great. I managed to get a segfault with os.listdir again:

Code: Select all

>>> import os
>>> os.listdir()
Fatal exception 28(LoadProhibitedCause):
epc1=0x4024b9ed, epc2=0x00000000, epc3=0x00000000, excvaddr=0x0000001c, depc=0x00000000

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 30424, room 16
tail 8
chksum 0x9a
load 0x3ffe8000, len 1000, room 0
tail 8
chksum 0x0e
load 0x3ffe83f0, len 2652, room 0
tail 12
chksum 0xff
csum 0xff
But there is a bug report for that already.

vfl68
Posts: 4
Joined: Sun Feb 28, 2016 9:54 am

Re: Early access release #3

Post by vfl68 » Tue Apr 12, 2016 2:37 pm

Hi, hadn't time testing until now.

I imported webrepl, did some test, it seems to work so far. I disconnected, looked back at the serial and saw a reboot.
I did several test, even just connecting to and disconnecting from webrepl, after some times the same fatal exception and reboot. It's seems to be similar to deshipu's problem.

Code: Select all

Fatal exception 28(LoadProhibitedCause):
epc1=0x4025481a, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000070, depc=0x00000000

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 30424, room 16 
tail 8
chksum 0x9a
load 0x3ffe8000, len 1000, room 0 
tail 8
chksum 0x0e
load 0x3ffe83f0, len 2652, room 0 
tail 12
chksum 0xff
csum 0xff
os.listdir() works fine for me, no fatal exception

I tried to connect with http on the ws, I know, it won't work, but it made webrepl2 crash

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 74, in <module>
  File "", line 67, in start
  File "", line 34, in handshake
OSError: Not a websocket request
I tried to restart and got

Code: Select all

>>> import webrepl2
>>> webrepl2.start()
Bind address info: [(2, 1, 0, '', ('0.0.0.0', 8080))]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 61, in start
  File "", line 47, in wait_connection
OSError: 112
A soft reboot changes nothing, but after some time, the webrepl2.start() works again, perhaps after timeout.

On my Olimex board :

Code: Select all

>>> hex(esp.flash_id())                                                         
'0x1540ef'

User avatar
marfis
Posts: 193
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: Early access release #3

Post by marfis » Tue Apr 12, 2016 8:16 pm

I'm using a Huzzah feather board.

Webrepl2 seems to work, but when I do CTRL+D it comes up with OS Error112 when I import webrepl2 a second time after reset. Strangely, repeating import webrepl2 afterwards throws no error, but it doesn't seem to work either.

Complete REPL session:

Code: Select all

>>> import webrepl2
Bind address info: [(2, 1, 0, '', ('0.0.0.0', 8080))]
<socket state=2 timeout=-1 incoming=3fff63e8 remaining=0>
b'GET / HTTP/1.1\r\n'(b'Upgrade', b'websocket')
(b'Connection', b'Upgrade')
(b'Host', b'192.168.4.1:8080')
(b'Origin', b'file://')
..
..
Connected
>>>  # CTRLD here
PYB: soft reboot
ioctl(1, 0)
ioctl(5, 0)
readblocks(0, 3ffef680(4096))
readblocks(2, 3ffef750(4096))
could not open file 'boot.py' for reading
MicroPython v1.6-436-ge5dc8d3-dirty on 2016-04-08; ESP module with ESP8266
Type "help()" for more information.
>>> import webrepl2
Bind address info: [(2, 1, 0, '', ('0.0.0.0', 8080))]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 74, in <module>
  File "", line 61, in start
  File "", line 47, in wait_connection
OSError: 112
>>> import webrepl2
>>> # it's not working 


gojimmypi
Posts: 36
Joined: Wed Mar 02, 2016 8:01 pm
Contact:

Re: Early access release #3

Post by gojimmypi » Tue Apr 12, 2016 9:42 pm

pfalcon wrote:Come on guys, no feedback from anyone else? Early access backers are the front cohort of the project, we really need your feedback, especially taking into account that release is not so far away.
day job keeps me busy, sorry for delay. I did some brief testing and the initial results were that my multi-byte I2C read problems are significantly better. (not actually confirmed for accuracy, but at least the data now makes sense). I'll post more specifics soon. Oh, also - I previously had an odd problem when pasting large blocks of text in putty on earlier versions (which could be blamed on a lot of things, including putty, Windows serial drivers, and more). However that seems to work better in this release as well. Were there any changes to the serial IO?

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

Re: Early access release #3

Post by pfalcon » Wed Apr 13, 2016 10:46 pm

kfricke wrote:My Huzzah feather works like a charm so far. Just flashed the v3 alpha and took some time to poke around...

The block device now shows up a little more descriptive (using dir(bdev)), or I did learn some more details by implementing my own file based block device in the Unix port as a practice.
I guess the latter, and that's good ;-).

The introduction to the WebREPL did also work flawlessly for the initial walk around.

One difference i can see is what is being printed onto the serial REPL and the WebREPL. Please check esp.meminfo at the end of the session. The command got repeated from the WebREPL and the UART REPL, always showing the whole truth only on the UART REPL.
Thanks for detailed testing ;-). That's expected, esp.meminfo() is a special debug function which calls out to vendor SDK function, and the latter prints its output only to UART.
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
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Wed Apr 13, 2016 10:51 pm

Hi,
i did some tests using the webREPL and have found some questions about using it. I'm using an ESP12E Devkit V2 from http://www.doit.am.
The webREPL is started from REPL with import webrepl2.
The git repository is forked to my windows pc with mobaxterm connection to the linux dev machine.
When i connect to the ESP12E from the browser (Firefox) i see the welcome message and the prompt >>>
The bottom line gives help for paste, but trying to paste python code stops in the middle. Hitting enter key gives syntax error message.
Newline codes seem not to be recognized, all text is concatenated.
What is the expected behaviour?
The paste via normal REPL is working.

After disconnecting i see the similar exception and reboot as others.
Last edited by jwissing on Wed Apr 13, 2016 11:09 pm, edited 1 time in total.

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

Re: Early access release #3

Post by pfalcon » Wed Apr 13, 2016 10:55 pm

vfl68 wrote:Hi, hadn't time testing until now.

I imported webrepl, did some test, it seems to work so far. I disconnected, looked back at the serial and saw a reboot.
I did several test, even just connecting to and disconnecting from webrepl, after some times the same fatal exception and reboot. It's seems to be similar to deshipu's problem.
It does not - you can see that it has quite different "epc1" value. I already did one pass on tightening modlwip error condition checking, so hopefully it will be resolved.
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: Early access release #3

Post by pfalcon » Wed Apr 13, 2016 11:17 pm

jwissing wrote: The bottom line gives help for paste, but trying to paste python code stops in the middle. Hitting enter key gives syntax error message.
Newline codes seem not to be recognized, all text is concatenated.
What is the expected behaviour?
The paste via normal REPL is working.
First of all, please make sure that you use "paste mode" when pasting (Ctrl+E). But I can reproduce the problem even with it, it was ticketed as https://github.com/micropython/webrepl/issues/2 . We'll look into it, thanks for report!
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
Frida
Posts: 40
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: Early access release #3

Post by Frida » Thu Apr 14, 2016 8:47 pm

After I enter import web repl2, the console blocks until I start webrepl and connect.
When I disconnect, it takes some time before webrepl are disconnected.
Back in the console when I type return and tab, or I type tab and return, mycropython crash.

Code: Select all

b'aEktOB/ssf/OUtf8UAJIY4OxeHM='
b'HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: aEktOB/ssf/OUtf8UAJIY4OxeHM=\r\n\r\n'
Connected
>>> 
>>> a=1
>>> chg_A3:-180

Fatal exception 28(LoadProhibitedCause):
epc1=0x4025481a, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000070, depc=0x00000000

 ets Jan  8 2013,rst cause:1, boot mode:(3,0)

load 0x40100000, len 30424, room 16 
tail 8
chksum 0x9a
load 0x3ffe8000, len 1000, room 0 
tail 8
chksum 0x0e
load 0x3ffe83f0, len 2652, room 0 
tail 12
chksum 0xff
csum 0xff
��
  ������rn���l
                     ���
On a Adafruit HUZZAH
Yes Frida is my watchdog!

User avatar
jwissing
Posts: 29
Joined: Thu Jun 19, 2014 12:23 pm
Location: Germany

Re: Early access release #3

Post by jwissing » Fri Apr 15, 2016 2:06 pm

webREPL crashes/reboots after disconnect.
I can reproduce the reboot using following steps:
  • serial connection (/dev/ttyUSB0) to esp12e waiting for REPL
  • boot board hard with reset button -> esp12e response on serial REPL
  • import webrepl2
  • start webrepl from git cloned repository with firefox
  • connect to esp8266
  • simple test, like import os, os.listdir()
  • disconnect by using button in browser
  • wait for disconnect message in browser
  • switch to serial REPL
  • hit enter twice
This results in reboot.

again this time with more info available

Code: Select all

Fatal exception 28(LoadProhibitedCause):
epc1=0x4025481a, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000070, depc=0x00000000

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 30424, room 16
tail 8
chksum 0x9a
load 0x3ffe8000, len 1000, room 0
tail 8
chksum 0x0e
load 0x3ffe83f0, len 2652, room 0
tail 12
chksum 0xff
csum 0xff
▒▒
  l▒▒|▒▒{oc▒▒l▒▒
                c▒l
                                                                                                                                                                                                          c쌜▒▒▒▒bd
        lcd▒▒lo▒d`▒▒lg▒psl▒d▒▒|▒▒rrgc▒▒d▒▒▒c▒l▒ioctl(1, 0)
ioctl(5, 0)
readblocks(0, 3ffef680(4096))
readblocks(2, 3ffef750(4096))
readblocks(6, 3ffef7a0(4096))
readblocks(2, 3ffef720(4096))
readblocks(11, 3ffef1a0(4096))
scandone
state: 0 -> 2 (b0)

#5 ets_task(4010027c, 3, 3fff4f48, 4)
MicroPython v1.6-436-ge5dc8d3-dirty on 2016-04-08; ESP module with ESP8266
Type "help()" for more information.
>>> state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt

connected with OMEGA, channel 6
dhcp client start...
ip:192.168.178.34,mask:255.255.255.0,gw:192.168.178.1
Last edited by jwissing on Fri Apr 15, 2016 3:44 pm, edited 1 time in total.

Locked