I have migrated a project of mine from a Raspberry + Arduino to the Edison.
It was a python script communicating with the Arduino over serial. This worked like a charm, but took too much space.
To migrate it without having to rewrite the code I found Socat as a solution from this guide: http://www.instructables.com/id/Intel-Edison-Arduino-serial-to-Host-process-serial/ .
This also works like a charm, but... I am not able to get this to run on boot. I need to start it manually to get it to work.
The python script starts fine, but the socat does not start properly and causing the python script to fail when trying to start serial connection.
Keep in mind that this works fine when starting the python script from command line.
socat pty,link=$HOME/tty0,raw,echo=0 pty,link=$HOME/tty1,raw,echo=0
ser = serial.Serial('/home/root/tty1', 115200, timeout=1)
TTYUARTClass mySerial(&rx_buffer_S1, 3, false);
Systemd script for boot
Description=My Script Service
Why is it not running on boot?
I'd be happy to provide more information if needed.
Any suggestions is appreciated
Thank you for reaching out.
I remember seeing this issue in the past, not with Socat but with a similar software. So I'm guessing this is a general issue when running a script on boot and trying to start Socat (or any similar software) at the same time. Have you tried developing a similar script using another programming language? This is just a suggestion, it would be interesting to see if it behaves differently.