Sound Monitor
PC
Prerequisite
sudo apt-get install netdiscover rrdtool cifs-utils # generate ssh keys ssh-keygen
gedit preferences → editor
tab width: 4 check insert spaces instead of tabs
Discover RADXA
sudo netdiscover ... 192.168.2.44 ac:a2:13:42:1c:14 Shenzhen Bilian electronic CO.,LTD ...
Upload key to RADXA (password is rock)
ssh-copy-id rock@192.168.x.y
Connect
Connect to RADXA
# user rock, password rock
ssh rock@192.168.x.y
connettersi alla rete WIFI (vedi sotto)
Graphs
Mount remote share
mkdir /tmp/monitor sudo mount -t cifs -o uid=valerio,guest //192.168.2.44/monitor /tmp/monitor cd /tmp/monitor
Edit
gedit /tmp/monitor/monitor/capture.py
Generate graph
ssh rock@192.168.2.44 monitor_graph
RADXA
- battery CR1220 3V
Python monitor
Project is in /home/rock/monitor
run program in devel mode
# console sul radxa (ssh rock@192.1689.x.y)
sudo systemctl stop monitor
# start in foreground
monitor_run
# stop with CTRL+C
edit code
nano ~/monitor/monitor/capture.py
WIFI
sudo nmcli device wifi connect <ssid> password <password> sudo reboot # staccare la ethernet
Service
/etc/systemd/system/monitor.service
[Unit] Description=Monitor [Service] Type=simple User=rock ExecStart=/usr/local/bin/monitor_run After=network.target Wants=time-sync.target [Install] WantedBy=multi-user.target
Enable
systemctl enable monitor.service