Archived. **Has license issues**. Read local and remote decoded CAN messages I want, append to a file, plot to a GUI with some controls. Need to be used with [mycan](https://git.flylightning.xyz/mycan/). The software is licensed under GPL-3.0-or-later. But list.c and list.h contain source code I edited from book "C Primer Plus" Chapter17 practice problem 2 which contain codes from its example codes, and the author of "C Primer Plus" does not have a license for list.c and list.h, so the author of "C Primer Plus" has the copyright on list.c and list.h, so list.c and list.h can be considered non-free close souce proprietary code. **So there's a license issue because I use both non-free and free copyleft license codes together.** build, install, and run ```sh make sudo make install remote_plot ``` usage ```sh # use default ssh destination and plot remote data remote_plot # use another ssh destination remote_plot -d username@10.0.0.7 # plot local data remote_plot -l ``` Raspberry pi (Debian 12 bookworm) needed pkgs: - plplot-driver-cairo - libgtk-4-dev - libssh-dev - libplplot-dev Arch Linux needed pkgs: - libssh - gtk4 - aur/plplot Infrastructure configs, some maybe included in pi_config dir - I prefer manage infrastructure configs using my [cfg](https://git.flylightning.xyz/fsh/tree/sh/cfg) script, but that script is my personal project and I don't want to force people to use that, so I include those config files in this repo and I did not manage it with my cfg script on raspberry pi. - raspberry pi - ~/.config/labwc/autostart autostart remote_plot locally - - /etc/wireguard/wg0.conf wireguard config - /etc/NetworkManager/system-connections/wg0.nmconnection, networkmanager wireguard config imported from wireguard config - /etc/modules-load.d/wireguard.conf autostart load wireguard kernel module, see - /etc/nftables.conf nftables firewall configs - ~/.ssh/know_hosts remote plot default use ssh public key authentication so you need to add your ssh public key to this file or via something like `ssh-copy-id Spartan_Racing_Charger@10.0.0.9` - server and laptop: - wireguard related configs - files in /etc/wireguard, see below - files in /etc/NetworkManager/system-connections - /etc/nftables.conf nftables firewall configs - server: - laptop: - Reboot or restart/reload the services maybe needed for some configurations to work. wireguard laptop configuration ``` # https://wiki.archlinux.org/title/WireGuard # https://github.com/teddysun/across/blob/master/wireguard.sh [Interface] Address = 10.0.0.1/24, fdc9:281f:04d7:9ee9::1/64 PrivateKey = [Peer] PublicKey = PresharedKey = Endpoint = ca.flylightning.xyz:49432 AllowedIPs = 10.0.0.5/32, fdc9:281f:04d7:9ee9::5/128, 10.0.0.9/32, fdc9:281f:04d7:9ee9::9/128 PersistentKeepalive = 25 ``` wireguard server configuration ``` [Interface] Address = 10.0.0.5/24, fdc9:281f:04d7:9ee9::5/64 ListenPort = 49432 PrivateKey = [Peer] PublicKey = PresharedKey = AllowedIPs = 10.0.0.1/32, fdc9:281f:04d7:9ee9::1/128 [Peer] PublicKey = PresharedKey = AllowedIPs = 10.0.0.9/32, fdc9:281f:04d7:9ee9::9/128 ``` wireguard raspberry pi configuration (/etc/wireguard/wg0.conf) ``` [Interface] Address = 10.0.0.9/24, fdc9:281f:04d7:9ee9::9/64 PrivateKey = [Peer] PublicKey = PresharedKey = Endpoint = ca.flylightning.xyz:49432 AllowedIPs = 10.0.0.5/32, fdc9:281f:04d7:9ee9::5/128, 10.0.0.1/32, fdc9:281f:04d7:9ee9::1/128 PersistentKeepalive = 25 ``` remote_plot future improvements - **Rewrite linked list list.c and list.h code or use a library to resolve the license issue mentioned above** - maybe use glib's linked list - - - Line plot - Use a slider for time - Time in current timezone - Show data number on plot - Webui with rest API - Save little to RAM, read from file mostly - Server side record data - Better network hole punching - Better UI - Specify to plot last how many last seconds - Async read remote data - Plot average data in a time period to use less CPU - Scroll-able plots - Show cell name for max min data - Better way to manage infrastructure code - More touch screen friendly - It is possible with gtk, see - There's maybe a bug for the expander of choosing voltage and temperature not able to swipe to scroll. So user have to press right side scroll bar to scroll. This bug maybe due to the code does not use a scrolled window for each expander. I guess so because I only use one scrolled window for the whole GUI. Adding one scrolled window for each expander may help, but I haven't tested it. Maybe there are other ways to fix it with gtk. gtk definitely is touch friendly. I personlly use [phosh](https://gitlab.gnome.org/World/Phosh/phosh) as my touch screen pinephone's GUI shell, it uses gtk and it is touch friendly. - More platform independent - Show min/avg/max in a table - Better error checks and handling On raspberry pi, I saved some temporary files I used to work on like git repos in ~/test. Those files can be cleaned if you want.