Updating Firmware Over the Air (=OTA)

Discussion and support for the Nmea2Wifi multiplexer - a 2-input Nmea 0183 wifi multiplexer.
Post Reply
Luis Sa
Site Admin
Posts: 526
Joined: Thu May 04, 2017 4:12 am

Updating Firmware Over the Air (=OTA)

Post by Luis Sa » Thu Oct 17, 2019 1:51 am

Hello,

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:

nmea2wifi-ota.gif
nmea2wifi-ota.gif (9.51 KiB) Viewed 12641 times

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);
}

Leon
Posts: 7
Joined: Wed Jun 17, 2020 6:25 pm

Re: Updating Firmware Over the Air (=OTA)

Post by Leon » Sun May 02, 2021 4:16 pm

So how do you know which version you have when it comes to updating the firmware ?

Luis Sa
Site Admin
Posts: 526
Joined: Thu May 04, 2017 4:12 am

Re: Updating Firmware Over the Air (=OTA)

Post by Luis Sa » Sun May 02, 2021 5:17 pm

Hello,

The version of the software you have is shown on all webpages just under the top animated GIF. Hope this answers to your question.

Redgards, Luis

Post Reply