Skip to content
nseidle edited this page Feb 22, 2012 · 2 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 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 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 by default. Acceptable values are 2400, 4800, 19200, 38400, 57600, 115200.
  • 26: The [ASCII](http://www.asciitable.com) value (in decimal form) for the escape character. 26 is ctrl+z. 36 is ‘$’.
  • 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.
  • 0: System mode. OpenLog starts in newlog mode (‘0’) by default. Acceptable values are 0 = New Log, 1 = Sequential Log, or 2 = Command mode.

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 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.

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. 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