Setting up the Arduino EDI with support for ESP8266/Arduino cards was one of the subjects of a previous post. I mentioned that the version of the ESP core is now 2.4.2 whereas previously I used version 2.4.1.
A cursory review indicates that my three Arduino libraries for ESP8266, mdBlinky, mdButton et mdEspRestart/mdEspRestartSF, are working properly in the new environment. It will be a relief for their many users! In all, there were 11, 11 and 14 downloads respectively. These figures overestimate their importance, because I downloaded them when verifying the links.
The transition to version 2.4.2 was not smooth, because one of my sketches, which is not yet public, can not be compiled. Here is the error message that the IDE displays.
A quick reminder: WPS, Wi-Fi Protected Setup, is a way to establish a Wi-Fi connection between a router and a device by pressing a button (real or virtual) on each of these devices. In my sketch, running on a Sonoff switch, I have to press its push button three times in quick succession and the WPS button on the router for the Sonoff to connect it to my home Wi-Fi network. It is not necessary to program the network name and password in the sketch.
A search on Google with the criterion
brought me to the Arduino WiFiManager forum: WiFiManager is causing compile problems Aug 06, 2018. The
suggestion from user
pert was to update the library.
The most recent version of the library was already installed. Even after
reinstalling version 0.14.0, the problem was not eliminated.7
After more digging, I found the relevant information in the FAQ of
version 2.4.2 of the ESP8266/Arduino core, that I should have read before.
The ESP8266 board definition file,
boards.txt has to be
rebuilt because by default, WPS is no longer available in the new core.
Since I have a portable EDI installation that is in the directory
/home/michel/ED here is how I proceeded.
Note that version 2.7 of python must be used to generate the file
boards.txt. This version is no longer installed by default in
Ubunut 18.04. So you have to install it. I think it
should be simple.
I cannot confirm that this is how to do it because Python 2.7.15rc1 was available on my system. It was included when installing some other application whose name I cannot recall.
If version 2.7.15 of Python is not installed on your system and you do
not want it, then here is my modified boards.txt file. This file
contains an additional directive at the end of each board definition
board.build.noextra4kheap=-DNO_EXTRA_4K_HEAP such as
nodemcuv2.build.noextra4kheap=-DNO_EXTRA_4K_HEAP. It is very
important to save the original file as shown above, because with the time and
with changes to the ESP8266/Arduino core, the file that I am making available
will become obsolete.
If you have not opted for a portable installation of the Arduino EDI, the
directory containing the definition of ESP8266 cards will be different. It
seems to me that it would be something like
According to the FAQ, support for Wi-Fi connections by WPS will be
incorporated again in future versions of the ESP8266/Arduino core. So, in
the future, it will no longer be necessary to generate a modified