SBC-based serial data logger
For continuous detached-but-not-quite babysitting-like debugging of the system at runtime, we are using a console monitor for the datalogger in order to be able to watch and record the serial interface output of the MCU.
For building this, get ready to integrate the listed components easily. We assume the system to be used for monitoring the other system is running Linux already.
- A Single-board computer - Wikipedia system like the RaspberryPi, the BeagleBone Black, the BeagleBone Enhanced or any other
ordinaryregular Linux system.
- The Tmux terminal multiplexer.
- The Neocon simple (multi-)serial console utility.
apt install tmux build-essential git clone https://github.com/openmoko/neocon /tmp/neocon cd /tmp/neocon make make install
tmux new -s sermon "neocon -l /home/pi/sermon-workbench-fipy.log -a /dev/ttyACM0"
This guy will
neoconto the given UART interface.
- Log its output to a file, eventually appending to that file. This will never overwrite existing data, e.g. after restarting the SBC system or the monitor program.
- Run the whole shebang inside Tmux in order to be able to reattach interactively to the session later and to keep the software running after logging out of the SBC’s remote console.
Dto detach from the
CTRL+Dto log out from the SBC’s remote console.
tmux attach -t sermonto attach to the
tmuxsession after logging back in into the SBC’s remote console.
- As the UART output is also redirected to a file, watching it is as easy as invoking
tail -F /home/pi/sermon-workbench-fipy.log.