General availability release v1.8

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

Re: General availability release v1.8

Post by pfalcon » Thu May 05, 2016 5:02 pm

As for memory issues, people building from source can easily bump heap size by 4K - the plan was to do that for release, but as we already faced problems with WebREPL file transfer, we decided to stay conservative and stay at the amount we did a lot of testing with, to not cause further non-obvious regressions. But bumping by 4K should be safe (as in: do it on your own risk), and actually if you don't over-use network, but rather would have more memory, you can bump heap to 32K, which is pretty decent amount of memory.
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/

arthoo
Posts: 2
Joined: Wed Mar 09, 2016 10:39 pm

Re: General availability release v1.8

Post by arthoo » Thu May 05, 2016 8:33 pm

If I try the example from
https://docs.micropython.org/en/latest/ ... pixel.html
and type in the fresh webrepl after power on:

import machine, neopixel
np = neopixel.NeoPixel(machine.Pin(4), 8)

I get :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "neopixel", line 11, in __init__
AttributeError: 'Pin' object has no attribute 'PULL_NONE'

I'm using an Olimex MOD-WIFI-ESP8266-DEV

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

Re: General availability release v1.8

Post by pfalcon » Thu May 05, 2016 9:03 pm

arthoo wrote: AttributeError: 'Pin' object has no attribute 'PULL_NONE'
Yes, that's a known erratum in the release: http://forum.micropython.org/viewtopic.php?f=16&t=1869
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
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: "Supporter" Backer initial feedback v1.8 & questions

Post by platforma » Fri May 06, 2016 10:25 am

Hey Rick!
mindrobots wrote: 1) With Pyboard, I see the storage show up as a blk device (/dev/sdx) - with ESP8266 connected to USB, I do not see a block device presented. Is this as expected?
Yes, there is no USB filesystem mounting, I don't think we will see it anytime soon, you can use the webrepl_cli.py to transfer some files across however!
mindrobots wrote: 2) From the MicroPython ESP8266 documentation (Tutorial 1.4 and 2.1), I get the impression that I should be able to access the REPL via the USB/UART connections. It ignores any input from minicom when I connect but I do see the ESP8266 logging events to minicom as I do things through webREPL. Is this as expected? I assume webREPL has control over the UART so it can log things which is keeping me from accessing it. I've found no way to stop it and break into the UART REPL.
You can stop webrepl with:

Code: Select all

import webrepl # already loaded in current version
webrepl.stop()
Webrepl shouldn't be blocking UART, this worked okay for me when I tested. Althought you can't be transferring with webrepl_cli.py and have an open session in the browser at the same time.
mindrobots wrote: 3) You should make a note that a copy of the webrepl.html sources and supporting files needs to be locally available on the system you attach to the AP and access the ESP8266 with. Once you attach to the ESP8266 AP, you no longer have access to other networks and can't get to the webrepl.html and supporting files if you didn't copy them some place local. (I may be missing something here.)
Yes that makes sense :) If you disconnect from the internet, you won't be able to access anything but the ESP AP! So "git clone" the webrepl repository before hand. I have also played with connecting the ESP in STA mode to my own access point, and accessing webrepl through my router, which worked fine for me, but it is not an officially supported method.

Cheers!

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: "Supporter" Backer initial feedback v1.8 & questions

Post by deshipu » Fri May 06, 2016 10:34 am

mindrobots wrote: 1) With Pyboard, I see the storage show up as a blk device (/dev/sdx) - with ESP8266 connected to USB, I do not see a block device presented. Is this as expected?
It's not possible with ESP8266, because the board itself doesn't handle the USB connection -- it's done by a separate chip, USB2TTL, which basically emulates a serial port through USB.
mindrobots wrote: 2) From the MicroPython ESP8266 documentation (Tutorial 1.4 and 2.1), I get the impression that I should be able to access the REPL via the USB/UART connections. It ignores any input from minicom when I connect but I do see the ESP8266 logging events to minicom as I do things through webREPL. Is this as expected? I assume webREPL has control over the UART so it can log things which is keeping me from accessing it. I've found no way to stop it and break into the UART REPL.
You should be able to access the REPL through USB. If you can't, but you can see the output, my guess is that there is something wrong with the TX line between the ESP8266 and the USB2TTL.

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

Re: "Supporter" Backer initial feedback v1.8 & questions

Post by pfalcon » Mon May 09, 2016 3:22 pm

With couple of people already giving their reply, here's my try to add to it:
mindrobots wrote: Questions relating to ESP8266 version:
1) With Pyboard, I see the storage show up as a blk device (/dev/sdx) - with ESP8266 connected to USB, I do not see a block device presented. Is this as expected?
Yes, that's expected. It works on PyBoard because it has native USB interface which can be programmed e.g. to emulate USB mass storage device. ESP8266 doesn't have USB at all, so that's not possible (it has only UART which is connected to USB by a separate USB-serial chip, which thus handles only serial connection). http://docs.micropython.org/en/latest/e ... datasheets gives a summary of ESP8266 capabilities and links to datasheets, looking thru which is recommended for any serious user of ESP8266. A resume though is that ESP's distinctive feature is builtin WiFi interface, in all other aspects PyBoard is superior to it.
2) From the MicroPython ESP8266 documentation (Tutorial 1.4 and 2.1), I get the impression that I should be able to access the REPL via the USB/UART connections. It ignores any input from minicom when I connect but I do see the ESP8266 logging events to minicom as I do things through webREPL. Is this as expected? I assume webREPL has control over the UART so it can log things which is keeping me from accessing it. I've found no way to stop it and break into the UART REPL.
Both normal UART REPL and WebREPL work in parallel. I.e. you can type on any of them, and will see both your typing and results (the only exception is some low-level logging output which is seen only on UART). If that's not the case, I'd start with checking terminal client configuration (I personally use picocom where there's almost no configuration, it "just works").
3) You should make a note that a copy of the webrepl.html sources and supporting files needs to be locally available on the system you attach to the AP and access the ESP8266 with. Once you attach to the ESP8266 AP, you no longer have access to other networks and can't get to the webrepl.html and supporting files if you didn't copy them some place local. (I may be missing something here.)
The tutorial actually recommends to use hosted client at http://micropython.org/webrepl . But you're right, we should make a note of that to give users the least surprise, added on TODO list.
This is really great stuff! I wish I had been devoting more of my play time to my Pyboards (kickstarter backer) and MicroPython instead of other things. :cry: I've missed out on a lot.
Thanks! The last comment is especially useful, as we really want people to know that MicroPython grows and improves all the time, and actually want to make this growth and support sustainable, and campaigns like ESP8266's give good momentum for overall MicroPython development (not just a particular port). So thanks for your participation!

I hope my feedback helps. Let me know if I can do anything to help out (sweep the floors, tidy up after the cats, test things, break things, etc.)
It is, please keep the feedback coming. And any of the above is helpful, at your convenience ;-)
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/

mindrobots
Posts: 3
Joined: Fri Aug 15, 2014 12:58 am

Re: "Supporter" Backer initial feedback v1.8 & questions

Post by mindrobots » Tue May 10, 2016 2:09 pm

mindrobots wrote: 2) From the MicroPython ESP8266 documentation (Tutorial 1.4 and 2.1), I get the impression that I should be able to access the REPL via the USB/UART connections. It ignores any input from minicom when I connect but I do see the ESP8266 logging events to minicom as I do things through webREPL. Is this as expected? I assume webREPL has control over the UART so it can log things which is keeping me from accessing it. I've found no way to stop it and break into the UART REPL.
This appears now to be a "local problem" with my particular NodeMCU board. It presents a console REPL when connected to Tera Term on Windows. It works fine with Lua loaded to it when connected to my RasPi using Minicom. The SAME ESP8266 binary when loaded into a WeMos presents both a WebREPL and console REPL when talking to my RasPi using Minicom. So at this point, it's a NON-ISSUE for the general public and is a strange anomoly with the combination of my NodeMCU board loaded with MicroPython and my Raspi/minicom. I may or may not pursue it further.

Thanks, all for the feedback and suggestions! Onward!!

Post Reply