Skip to content
Nathan Seidle edited this page Dec 14, 2013 · 18 revisions

Configuring OpenLog via the CONFIG.TXT File

As of firmware version 1.6 and above, you no longer need to use a terminal to reconfigure OpenLog. Simply edit the config.txt file (capitalization is not important) and change 9600 to 57600 and OpenLog will operate at 57600bps the next time you power it up. This is pretty handy! Rather than hooking up a serial connection and opening up a terminal window, you can now edit many of the settings on OpenLog via an SD card reader and a text editor.

The default config file has one line and looks like this: 9600,26,3,0,1,1,0 Note that these are regular visible characters (no non-visible or binary values please). Each value is separated by a comma:

  • 9600: The communication baud rate. 9600bps is default. Acceptable values are 2400, 4800, 9600, 19200, 38400, 57600, 115200.
  • 26: The ASCII value (in decimal form) for the escape character. 26 is ctrl+z and is default. 36 is '$' and is a commonly used escape character.
  • 3: The number of escape characters required. By default it is three so you must hit ctrl+z three time to drop to command mode. In v3.3 and newer you can set this from 0 to 254. Setting the number to zero will disable escape character checking completely.
  • 0: System mode. OpenLog starts in newlog mode (0) by default. Acceptable values are 0 = New Log, 1 = Sequential Log, or 2 = Command mode.
  • 1: 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.
  • 1: Echo mode. While in command prompt characters are echoed by default. Setting this to 0 turns off character echo. Turning off echo is handy if you are trying to handle errors and don't want to have the sent commands echoing back to the sender.
  • 0: Emergency Override. Normally, OpenLog will emergency reset when the RX pin is pulled low during power up. There are some systems that will hold the RX line low for various reasons. Setting the Emergency Override from 0 to 1 will disable the checking of the RX pin during power up. If Emergency Override is set to 1, you will not be able to force the unit back to 9600bps. The only way to verify the baud rate is by editing the configuration file.

Here are the different ways that OpenLog can change its system settings:

  • Config file found: During power up, OpenLog will look for a CONFIG.TXT file (capitalization is not important). If the file is found, OpenLog will use those 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 current system settings to it. This means that if you insert a newly formatted microSD card, your system will maintain its current settings.
  • Changes through command prompt: If 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 system EEPROM and to the CONFIG.TXT file.
  • Emergency reset: If you get OpenLog stuck into an unknown baudrate, there is a safety mechanism built-in. Tie the RX pin to ground and power up OpenLog. You should see the LEDs blink back and forth for 2 seconds, then blink in unison. Now power down OpenLog and remove the RX/GND jumper. OpenLog is now reset to 9600bps with an escape character of ctrl+z sent three consecutive times. This will re-write both the internal EEPROM settings and the config.txt settings file to a known-good state. Note: This feature can be overridden by setting the Emergency Override bit to 1. See configuration file for more information.

If the config file is found to be corrupt or contains illegal values, OpenLog will always go to its safety settings of 9600,26,3,0,1,1,0. OpenLog will always delete the CONFIG.TXT file and then write back the values that it found. This protects against odd values or illegal characters living in the config file.

Remember, if you get OpenLog stuck into an unknown baudrate, there is a safety mechanism built-in. Tie the RX pin to ground and power up OpenLog. You should see the LEDs blink back and forth for 2 seconds, then blink in unison. Now power down OpenLog and remove the RX/GND jumper. OpenLog is now reset to 9600bps, the escape command is reset to ctrl+z sent consecutively three times, and CONFIG.TXT will be properly recreated with default, safe values.

OpenLog Wiki Pages:

Clone this wiki locally