SBC-based serial data logger
Introduction
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.
Setup
apt install tmux build-essential
git clone https://github.com/openmoko/neocon /tmp/neocon
cd /tmp/neocon
make
make install
Operation
Synopsis
tmux new -s sermon "neocon -l /home/pi/sermon-workbench-fipy.log -a /dev/ttyACM0"
Description
This guy will
- Attach
neocon
to 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.
Usage
- Use
CTRL+B
,D
to detach from thetmux
session. - Use
CTRL+D
to log out from the SBC’s remote console. - Use
tmux attach -t sermon
to attach to thetmux
session 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
.