Update Over The Air or OTA (an easy way to update firmware without cables) is available in version 62 and above.
If you have version 62 or above and want to upgrade to a newer version you can just write 192.168.4.1:82/update in the browser navigation window (being sure you are connected to NMEA2WIFI) and follow the instructions. Basically you just need to point to the bin file that you want to upload and press the UPDATE button. You will see the % of loading increasing up to 100% when you get a success message. The ESP8266 module does not need to be removed from the multiplexer to update the firmware as described.
If you have a firmware version lower than 62, you still need to use an USB cable as described here to update to a newer firmware. However,instead of updating directly to the newer software you can do the following. Firstly you remove the ESP8266 module from the multiplexer and connect it to the PC through a USB cable. Then you download a simple test firmware file found here OTA_BLINK.bin. This simple binary file places the blue led of the ESP8266 module to blink, prepares the module for OTA and creates an AP with ssid NMEA2WIFI (see below the source code). Having the blue led blinking and after connecting to the NMEA2WIFI network, you write 192.168.4.1:82/update in the navigation browser window as shown in the picture:
You press the left button and point to the bin file that you want to upload and then press the UPDATE button. After a while you get a success message and that is it. Now in the future you can always update using OTA.
Regards, Luis
PS: Following is the source code of the OTA_BLINK sketch:
Code: Select all
/* NMEA2WIFI Multiplexer
* =====================
* Simple sketch to prepare a Wemos module for
* OTA uppdate. OTA = Over The Air
*
* You can compile this code with the Arduino IDE.
* If you have success the BLUE led
* will blink. Then with this programme
* running, connect to the AP it creates and type
* 192.168.4.1:82\update
*/
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
ESP8266WebServer httpServer(82);
ESP8266HTTPUpdateServer httpUpdater;
void setup(void) {
pinMode(LED_BUILTIN, OUTPUT);
WiFi.mode(WIFI_AP);
WiFi.softAP("NMEA2WIFI", "12345678");
httpUpdater.setup(&httpServer);
httpServer.begin();
}
void loop(void) {
httpServer.handleClient();
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
httpServer.handleClient();
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}