|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
References
|
Loading Logger CodeThis page discusses how to load new firmware supplied as a binary file by Dragonnorth into a LOGGER processor module. Contents
Network Code UpdateThe LOGGER supports loading code over the internet starting with software version 1x88. To maintain security when loading code over the internet firmware can only be loaded by download from www.dragonnorth.com. Select "Update Firmware" from the menu on a logger. The LATEST firmware is offered by default. Click the "Update Firmware" button to initiate a firmware update. Old versions can be loaded by putting the version number in the box. A typical version number is 1x88. With the version number in the box click the button to start the update. Ensure that the LOGGER remains powered until the firmware update completes. The web pages will not be active while the update proceeds. Programming ModuleThe LOGGER can also be updated from a PC. Updating from a PC can recover a LOGGER that has lost power or had a bad error in a network update. The FTDI Friend Adafruit Selectable programming Module is the recommended programmer. It can be selected for 3.3V or 5V power and pinning. It comes configured for 5 volt VCC and 3.3 volt logic levels which is the correct configuration for programming a LOGGER processor module. Drivers for the FTDI chip on this module are available at http://www.ftdichip.com/Drivers/VCP.htm. The Adafruit Serial programming cable can also be used. NodeMCU LoaderA copy of the ESP8266Flasher.exe program for 32 bit and 64 bit windows is bundled with the proper environment and a copy of Version 1(92)-214 of the LOGGER binary here: ESP8266Flasher.zip Download the ZIP file and unpack it into an empty directory. There should be two application files Win64ESP8266Flasher.exe, Win32ESP8266Flasher.exe a binary logger file logger1x92.bin and a Config directory. If a different version of the logger software is desired place that BIN file in the same directory. Start the appropriate (64 vs 32 bit) version of the application and perform these steps:
Open source notice:The NodeMCU flasher in the download just described is open source software and comes from Expresif. The source and program can be obtained from https://github.com/nodemcu/nodemcu-flasher. Dragonnorth is required to provide a link to the source in order to distribute this program. The source is not required to program the LOGGER module. Dip SwitchesThere are no dip switches on the LOGGER processor module. When I/O modules are not being used skip this section. The logger developers kit comes with several Sensor modules integrated on the same snap apart board. The Sensor modules are connected if the board is not snapped apart. The dip switches on the I/O and AC detector modules must be properly configured for the LOGGER to operate and for it to be reloaded see the Module Setup page for complete details. In summary: The AC detector module should have Switch 1 and Switch 2 down. The I/O module should have Switch 1 and Switch 2 down. Loading the LOGGER FirmwareConnect the USB to LOGGER cable to the computer and to the LOGGER.
Run the appropriate (64 vs 32 bit) ESP8266Flasher.exe from that directory, a programming window will pop up. Select the appropriate COM port for your programmer from the pulldown. Click on the Config tab. Click on the highlighted gear on the first line. In the window that opens find and double click on logger.cpp.bin. (This file should be in the ESP8266flasher directory.) This file is the image to copy into the LOGGER. Click on Open if your double click did not close the window. On the LOGGER module press and hold SW4 a green LED will light brightly. While holding SW4 press and release SW3, then release SW4. The green LED will now glow faintly. The module is now ready to program. (On two Cat-5 LOGGER modules SW1 is used instead of SW4 and SW2 instead of SW3.) Click on the Operation tab and click on the Flash button. The button name changes to Stop as programming starts. When programming is complete the button changes it's name back to Flash (from Stop). Loading code takes about a minute. Once the load completes press and release SW3 on the LOGGER processor module to restart the system (SW2 for 2 Cat-5 modules). It will now be running the new firmware. NOTE: It is critical to restart the system by pressing the button to reboot it. If an automatic restart occured (as it often does) after the code download the next reboot will hang waiting for a code download. The hang might occur hours later after a watchdog timer or other event that tries to recover by rebooting. Loading the LOGGER Firmware to an EPS32A port of the LOGGER firmware to the ESP32 development board is in progress. Loading code to this board is similar but not quite the same. Connect the USB to LOGGER cable to the computer and to the ESP32 development board. Remove any peripherals or I/O modules connected to the board. The built in boot code depends on pins 0 and 2 floating or pulled low and some I/O modules interfere with this. A CCS811 connected to the default SPI pins has been oserved to cause a failure. Only loading from the Arduino development environment has been tried. Press and hold the BOOT button (right of the USB connector) when the Arduino tools try to connect to the board. Once the Connected state has been reported in the lower window of the tools the button can be released. Once the load completes reconnect and I/O modules and press and release reset button (left of the USB connector) to restart the system. It will now be running the new firmware. The LOGGER note to restart the system may apply (not yet tested): NOTE: It is critical to restart the system by pressing the button to reboot it. If an automatic restart occured (as it often does) after the code download the next reboot will hang waiting for a code download. The hang might occur hours later after a watchdog timer or other event that tries to recover by rebooting. LOGGER ImagesAs LOGGER development proceeds new images will be released and placed in the list below. The latest code will always be at the top of the list. Download a new image from this list, unpack the file, and replace the logger.cpp.bin file in the ESP8266Flasher directory with the new image you want to load. The ESP8266Flasher directory was created when ESP8266Flasher was installed in the 'NodeMCU Loader' step above.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LOGGER pages copyright 2016-2022 by Dragonnorth Group (Michael Newman). Send comments and corrections to: Webmaster: mnewman@dragonnorth.com |