-
Notifications
You must be signed in to change notification settings - Fork 97
Socat
tagyoureit edited this page Apr 23, 2020
·
1 revision
Want to have a RaspberryPi Zero, or other $5 computer, sitting by your pool equipment while the main code runs elsewhere on your network? Or want to help get involved with the project and debug in an app like Netbeans?
@arrmo was super slick in getting this to run.
There are two options:
- Run socat each time to enable the pipe
- Setup a daemon to automatically start socat
Run these commands on the remote machine
-
sudo apt-get install socat
to install socat /usr/bin/socat TCP-LISTEN:9801,fork,reuseaddr FILE:/dev/ttyUSB0,b9600,raw
- Setup the app parameters (below)
Run these commands on the remote machine
-
sudo apt-get install socat
to install socat -
sudo apt-get install daemon
to install daemon - Copy the
poolTTY
file (in /scripts directory) to your remote machine directory/etc/init.d
- Run the following command to make the daemon run the socat upon startup:
sudo update-rc.d poolTTY defaults
- Setup the app parameters (below)
Props to @antamy. Another approach to an etc/init.d
script. The script is runAtBoot.sh
. See https://github.com/chovy/node-startup for instructions to use this script.
From your local machine, you should be able to telnet to port 9801 and see incoming packets.