NodeMCU firmwareThe otgwmcu firmware was originally created for the WiFi version of the OTGW offered by Nodo Shop, which contained a NodeMCU to provide the WiFi connection. Newer revisions of the board use a Wemos D1 mini for this purpose. Both the NodeMCU and the Wemos D1 mini are basically an ESP8266, with some additional hardware to convert the 5V power supply to 3.3V and provide a USB interface. The otgwmcu firmware can be used with both devices. The text below uses the collective term "ESP8266" for information applicable to both devices.The otgwmcu firmware only provides very basic functionality. After configuring the local WiFi network, it can be used to connect the OTMonitor to the OTGW. But its primary purpose is to be able to upgrade the OTGW PIC firmware without relying on a (stable) WiFi connection. Starting with version 0.3, the EEPROM settings are transferred from the old firmware to the new firmware. Version 0.8 of the otgwmcu firmware will flash the PIC with gateway firmware version 6.2 (PIC16F1847) or 5.5 (PIC16F88). Other options are available via the built-in web server. Installation
PIC RecoveryTo attempt to recover a PIC that has experienced a failed firmware upgrade, the device doesn't need to connect to WiFi. Simply press the FLASH button on the NodeMCU for 2 seconds, until the WiFi LED (next to the antenna) lights up. When using a Wemos D1 mini, use a wire to connect the pin marked D3 to GND for 2 seconds.After about a second the NodeMCU LED (near the USB connector) should start blinking. A Wemos D1 mini doesn't have this LED. But if the WiFi LED remains lit for more than 5 seconds, you can assume the download is running. A normal recovery takes about 30 seconds. At the end the WiFi LED indicates the result:
Connect to WiFiWhen the ESP8266 is connected to a WiFi network, additional functions are available.When a WiFi network has not yet been configured, the ESP8266 creates its own WiFi network, called "OTGW-MCU". Connect to this network with a laptop, mobile phone, or tablet and sign in (no password) and configure the WiFi network you want to use. Once the WiFi has been configured, check your router or other DHCP server for your network to figure out the IP address that has been assigned to the ESP8266. Web serverThe ESP8266 runs a web server that provides a few different pages. The links provided below assume the ESP8266 can be reached as otgwmcu1. Substitute its real name or IP address if this is not the case:
OTMonitorFor more extensive interaction with the OTGW, the OTMonitor application can be used. In OTMonitor, go to Options → Connection. Select "TCP Connection" and fill in the IP address of the ESP8266 in the "Remote host" field. Leave the "Remote port" at its default of 25238. Then click "Connect". |