I bought a china usb 8 relay switch board. It shows up in ubuntu server as a serial device. I figured out the commands to get it to work.
*Set Baud Rate of relay board
stty -F /dev/ttyUSB0 9600 -parity cs8 -cstopb
To start relay controller:
echo -e -n "\x50" > /dev/ttyUSB0
To activate relay for commands:
echo -e -n "\x51" > /dev/ttyUSB0
To turn on relay
echo -e -n "\x(number)" > /dev/ttyUSB0*
But my issue is if I turn on relay 1 (/x01) and then turn on relay 2 (/x02) relay 1 turns off. I'm trying to automate and will need it to turn on more than one relay at a time. I went thru with testers and started mapping each number, Like 03 turns on relay 01 and 02. But there has to be an easier way. Any help would be grateful.