OpenLog Hookup Guide

Pages
Contributors: Nate, Toni_K
Favorited Favorite 4

Configuration File

If you would rather not use the serial terminal for modifying the settings on your OpenLog, you can also update the settings by modifying the CONFIG.TXT file.

Note: This feature only functions on firmware verison 1.6 or newer. If you have bought an OpenLog after 2012, you will be running firmware version 1.6+

To do this, you will need a microSD card reader and a text editor. Open up the config.txt file (the capitalization of the file name does not matter), and configure away! If you have never powered up your OpenLog with the SD card before, you can also manually create the file. If you have powered up the OpenLog with the microSD card inserted previously, you should see something like the following when you read the microSD card.

Default SD Configuration

The OpenLog creates a config.txt and LOG0000.txt file on first power up.

The default configuration file has one line of settings and one line of definitions.

OpenLog Config File

Default configuration file written by the OpenLog.

Note that these are regular visible characters (there are no non-visible or binary values), and each value is separated by a comma.

The settings are defined as follows:

  • baud: The communication baud rate. 9600bps is default. Acceptable values that are compatible with the Arduino IDE are 2400, 4800, 9600, 19200, 38400, 57600, and 115200. You can use other baud rates, but you will be unable to communicate with the OpenLog through the Arduino IDE serial monitor.

  • escape: The ASCII value (in decimal format) of the escape character. 26 is CTRL+z and is default. 36 is $ and is a commonly used escape character.

  • esc#: The number of escape characters required. By default, it is three, so you must hit the escape character three times to drop to command mode. Acceptable values are from 0 to 254. Setting this value to 0 will disable escape character checking completely.

  • mode: System mode. OpenLog starts in New Log mode(0) by default. Acceptable values are 0=New Log, 1= Sequential Log, 2 = Command Mode.

  • verb: Verbose mode. Extended (verbose) error messages are turned on by default. Setting this to 1 turns on verbose error messages (such as unknown command: remove !). Setting this to 0 turns off verbose errors but will respond with a ! if there is an error. Turning off verbose mode is handy if you are trying to handle errors from an embedded system.

  • echo: Echo mode. While in command mode, characters are echoed by default. Setting this to 0 turns off character echo. Turning this off is handy if handling errors and you don't want sent commands being echoed back to the OpenLog.

  • ignoreRX: Emergency Override. Normally, OpenLog will emergency reset when the RX pin is pulled low during power up. Setting this to 1 will disable the checking of the RX pin during power up. This can be helpful for systems that will hold the RX line low for various reasons. If Emergency Override is disabled, you will not be able to force the unit back to 9600bps, and the configuration file will be the only way to modify the baud rate.

How OpenLog Modifies the Config File

There are five different situations for the OpenLog to modify the config.txt file.

  • Config file found: During power up, OpenLog will look for a config.txt file. If the file is found, OpenLog will use the included settings and overwrite any previously stored system settings.

  • No config file found: If OpenLog cannot find the config.txt file then OpenLog will create config.txt and record the currently stored system settings to it. This means if you insert a newly formatted microSD card, your system will maintain its current settings.

  • Corrupt config file found: OpenLog will erase the corrupted config.txt file, and will rewrite both the internal EEPROM settings and the config.txt settings file to the known-good state of 9600,26,3,0,1,1,0.

  • Illegal values in config file: If the OpenLog discovers any settings containing illegal values, OpenLog will overwrite the corrupt values in config.txt file with the currently stored EEPROM system settings.

  • Changes through command prompt: If the system settings are changed through the command prompt (either over a serial connection or via microcontroller serial commands) those changes will be recorded both to the system EEPROM and to the config.txt file.

  • Emergency Reset: If the OpenLog is power cycled with a jumper between RX and GND, and the Emergency Override bit is set to 0 (allowing emergency reset), OpenLog will rewrite both the internal EEPROM settings and the config.txt settings file to the known-good state of 9600,26,3,0,1,1,0.