From 51668dffaa2367f06fce453c5b8a05539dd5e6d4 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 23 Jun 2017 22:00:40 +0300 Subject: docs/esp8266/tutorial/intro: Discourage use of 512kb firmwares. This follows similar warnings in other parts of docs. --- docs/esp8266/tutorial/intro.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'docs/esp8266') diff --git a/docs/esp8266/tutorial/intro.rst b/docs/esp8266/tutorial/intro.rst index 67ed0ba67c..3c26b954ce 100644 --- a/docs/esp8266/tutorial/intro.rst +++ b/docs/esp8266/tutorial/intro.rst @@ -50,12 +50,16 @@ From here, you have 3 main choices * Daily firmware builds for 1024kb modules and above. * Daily firmware builds for 512kb modules. -The best bet is nearly always to go for the Stable firmware builds. -An exception to this though is if you have an ESP8266 module with only 512kb -of onboard storage. You can easily tell by trying to load a Stable firmware -build and if you get the error below, then you may have to use the Daily -firmware builds for 512kb modules. - WARNING: Unlikely to work as data goes beyond end of flash. +If you just start with MicroPython, the best bet is to go for the Stable +firmware builds. If you are advanced, experienced MicroPython ESP8266 user +who would like to follow development closely and help with testing new +features, there are daily builds (note: you actually may need some +development experience, e.g. being ready to follow git history to know +what new changes and features were introduced). + +Support for 512kb modules is provided on a feature preview basis. For end +users, it's recommended to use modules with flash of 1024kb or more. As +such, only daily builds for 512kb modules are provided. Deploying the firmware ---------------------- -- cgit v1.2.3 From beb94b6efc094be4788f38b6b5e3b9c6da72b292 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 23 Jun 2017 22:04:33 +0300 Subject: docs/esp8266/tutorial/intro: Sphinx requires blank lines around literal blocks. At least, Sphinx 1.3.6. --- docs/esp8266/tutorial/intro.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/esp8266') diff --git a/docs/esp8266/tutorial/intro.rst b/docs/esp8266/tutorial/intro.rst index 3c26b954ce..c4c272ca5a 100644 --- a/docs/esp8266/tutorial/intro.rst +++ b/docs/esp8266/tutorial/intro.rst @@ -165,7 +165,9 @@ after it, here are troubleshooting recommendations: * If lower baud rate didn't help, you may want to try older version of esptool.py, which had a different programming algorithm:: + pip install esptool==1.0.1 + This version doesn't support ``--flash_size=detect`` option, so you will need to specify FlashROM size explicitly (in megabits). It also requires Python 2.7, so you may need to use ``pip2`` instead of ``pip`` in the @@ -180,8 +182,10 @@ after it, here are troubleshooting recommendations: * Additionally, you can check the firmware integrity from a MicroPython REPL prompt (assuming you were able to flash it and ``--verify`` option doesn't report errors):: + import esp esp.check_fw() + If the last output value is True, the firmware is OK. Otherwise, it's corrupted and need to be reflashed correctly. -- cgit v1.2.3 From 0a54b6dce9dcc1cace74359ea07ff4e15a1834c4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 26 Jun 2017 15:12:48 +1000 Subject: docs/esp8266/tutorial/intro: Fix some grammatical typos. --- docs/esp8266/tutorial/intro.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/esp8266') diff --git a/docs/esp8266/tutorial/intro.rst b/docs/esp8266/tutorial/intro.rst index c4c272ca5a..711db3fceb 100644 --- a/docs/esp8266/tutorial/intro.rst +++ b/docs/esp8266/tutorial/intro.rst @@ -50,8 +50,8 @@ From here, you have 3 main choices * Daily firmware builds for 1024kb modules and above. * Daily firmware builds for 512kb modules. -If you just start with MicroPython, the best bet is to go for the Stable -firmware builds. If you are advanced, experienced MicroPython ESP8266 user +If you are just starting with MicroPython, the best bet is to go for the Stable +firmware builds. If you are an advanced, experienced MicroPython ESP8266 user who would like to follow development closely and help with testing new features, there are daily builds (note: you actually may need some development experience, e.g. being ready to follow git history to know -- cgit v1.2.3 From 45b127e7ac95308b51364b22f174c8b15d1f8e89 Mon Sep 17 00:00:00 2001 From: Patrick O'Leary Date: Sun, 2 Jul 2017 20:02:19 -0500 Subject: docs/esp8266/general.rst: Fix name of NTP module. The simple NTP client module is named "ntptime.py". --- docs/esp8266/general.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/esp8266') diff --git a/docs/esp8266/general.rst b/docs/esp8266/general.rst index 47df80d7ba..6d186fcd2f 100644 --- a/docs/esp8266/general.rst +++ b/docs/esp8266/general.rst @@ -116,7 +116,7 @@ Real-time clock RTC in ESP8266 has very bad accuracy, drift may be seconds per minute. As a workaround, to measure short enough intervals you can use ``utime.time()``, etc. functions, and for wall clock time, synchronize from -the net using included ``ntpdate.py`` module. +the net using included ``ntptime.py`` module. Due to limitations of the ESP8266 chip the internal real-time clock (RTC) will overflow every 7:45h. If a long-term working RTC time is required then -- cgit v1.2.3 From 6ede921731aaf6ab6c8bcbeb4e53a9ad04b2900b Mon Sep 17 00:00:00 2001 From: Peter Hinch Date: Wed, 19 Jul 2017 16:57:42 +0100 Subject: eps8266/general: Add known issue of WiFi RX buffers overflow. --- docs/esp8266/general.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/esp8266') diff --git a/docs/esp8266/general.rst b/docs/esp8266/general.rst index 6d186fcd2f..68ed701beb 100644 --- a/docs/esp8266/general.rst +++ b/docs/esp8266/general.rst @@ -122,3 +122,26 @@ Due to limitations of the ESP8266 chip the internal real-time clock (RTC) will overflow every 7:45h. If a long-term working RTC time is required then ``time()`` or ``localtime()`` must be called at least once within 7 hours. MicroPython will then handle the overflow. + +Sockets and WiFi buffers overflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Socket instances remain active until they are explicitly closed. This has two +consequences. Firstly they occupy RAM, so an application which opens sockets +without closing them may eventually run out of memory. Secondly not properly +closed socket can cause the low-level part of the vendor WiFi stack to emit +``Lmac`` errors. This occurs if data comes in for a socket and is not +processed in a timely manner. This can overflow the WiFi stack input queue +and lead to a deadlock. The only recovery is by a hard reset. + +The above may also happen after an application terminates and quits to the REPL +for any reason including an exception. Subsequent arrival of data provokes the +failure with the above error message repeatedly issued. So, sockets should be +closed in any case, regardless whether an application terminates successfully +or by an exeption, for example using try/finally:: + + sock = socket(...) + try: + # Use sock + finally: + s.close() -- cgit v1.2.3 From 205c368fa1e03e93af3b45ae08ac02f87ca866b5 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 21 Jul 2017 12:08:18 +0300 Subject: eps8266/general: Fix typo in recent example. --- docs/esp8266/general.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/esp8266') diff --git a/docs/esp8266/general.rst b/docs/esp8266/general.rst index 68ed701beb..e23acb469b 100644 --- a/docs/esp8266/general.rst +++ b/docs/esp8266/general.rst @@ -144,4 +144,4 @@ or by an exeption, for example using try/finally:: try: # Use sock finally: - s.close() + sock.close() -- cgit v1.2.3 From d003daee06d0547c496169fcc306ed82082e34be Mon Sep 17 00:00:00 2001 From: Matthew Brener Date: Sun, 23 Jul 2017 22:53:34 +1000 Subject: docs/esp8266/tutorial: Fix typo, "its" to "it's" in powerctrl.rst. --- docs/esp8266/tutorial/powerctrl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/esp8266') diff --git a/docs/esp8266/tutorial/powerctrl.rst b/docs/esp8266/tutorial/powerctrl.rst index 9e44339c86..3502624ab5 100644 --- a/docs/esp8266/tutorial/powerctrl.rst +++ b/docs/esp8266/tutorial/powerctrl.rst @@ -22,7 +22,7 @@ processing power, at the expense of current consumption:: 160000000 You can change to the higher frequency just while your code does the heavy -processing and then change back when its finished. +processing and then change back when it's finished. Deep-sleep mode --------------- -- cgit v1.2.3