CONFIG.TXT and command mode problem #140

Closed
harry02 opened this Issue Feb 28, 2013 · 2 comments

Comments

Projects
None yet
2 participants

harry02 commented Feb 28, 2013

Hi,

I use Openlog on my JeeNode (Arduino) microcontroller, interfaced with a UART shield. Uptill now I did not succeed to find the version of the firmware, but I bought the Openlog device 2 month ago, so it is quite new.

  1. From the documentation I learn that a new CONFIG.TXT file with the values : 9600,26,3,0,1,1 is created when none is found at power up . When I delete the config.txt file and even format the SD card, at power up my 'old' CONFIG.TXT file is created with the value and text as follows: 57600,26,3,2,1,1 baud,escape,esc#,mode,verb,echo. Is something wrong in my Openlog device or is this a new feature??

  2. In my application I have to read and write in arbitrary sequence: sometimes several write operations and then one or more read operations, followed again by one or more write operations, etc. My problem is to keep track wether the device is in command mode or not.

The documentation (https://github.com/sparkfun/OpenLog/wiki/Command-Set) says that when writing , following the "append "command , is finished :"To exit this state, send the command Ctrl+z (ASCII 26) and OpenLog will return to the '>' prompt. So it should go back to command mode. I don't think that that happens; when I issue the command "append " again this text is just written to the file .

Also it is unclear what happens at the end of execution of the read command: is the device still in command mode or not?

Also, it is not documented what happens if no length or a too large length is given in the read command or when the file does not exist.

"You may leave off any of the arguments." is (for me) rather strange in case of positional parameters.

Please clarify when Openlog leaves and stays in command mode: that is my biggest problem.

Harry02

Owner

nseidle commented Feb 28, 2013

Hi Harry -

  1. When OpenLog powers up, it will check to see if there is a config file. If there is, it will use the settings within it. If there is no config file, it will create one with the current settings. More than likely your unit got set to 57600 at some point so it keeps creating the config with this baud rate. Be sure to see the datasheet about factory reset. Basically, hold the RX line during power up for a few seconds and the unit will reset everything to 9600bps.

  2. OpenLog may not be great for what you are trying to do. It's meant to log, not really switch back and forth between reading/writing, but it should be possible.

Looks like github tried to parse some of your comment so it doesn't make sense to me.

When you are in command mode, you will see a >
When you send the command 'append myfile.txt' you will then see a < indicating anything following will be recorded to the file. To exit append mode, send the escape character (probably three of ctrl+z unless you change it).

OpenLog will not leave command mode unless:

  1. You send the append file command
  2. You send the write file command
  3. Power cycle the unit and the cofiguration is set to seqlog or newlog

I hope this gives some clarity! Please keep asking questions.

Owner

nseidle commented Apr 8, 2013

No activity from reporter. Closing.

nseidle closed this Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment