Ok, so does this device appear as a serial port on your computer?
What have you written so far to interface with it?
From a quick look around online it looks like this is supposed to appear as a serial port and the following are supposed to activate the relays:
Code:
Communication Parameters:
8 Data, 1 Stop, No Parity
Baud rate : 9600
Commands:
FIRST channel commands:
OFF command : FF 01 00 (HEX) or 255 1 0 (DEC)
ON command : FF 01 01 (HEX) or 255 1 1 (DEC)
SECOND channel commands:
OFF command : FF 02 00 (HEX) or 255 2 0 (DEC)
ON command : FF 02 01 (HEX) or 255 2 1 (DEC)
THIRD channel commands:
OFF command : FF 03 00 (HEX) or 255 3 0 (DEC)
ON command : FF 03 01 (HEX) or 255 3 1 (DEC)
FOURTH channel commands:
OFF command : FF 04 00 (HEX) or 255 4 0 (DEC)
ON command : FF 04 01 (HEX) or 255 4 1 (DEC)
So try:
You may have to change the stty accordingly, I've not really looked at it in much detail.
Code:
stty -F /dev/ttyS0 speed 9600 cs8 -cstopb
echo -e -n "\xFF\x01\x01\x0a" > /dev/ttyS0
and see if that turns relay 1 on.
If that works then you can use a quick and dirty bash script to achieve your timings.
I've a Velleman 8 relay board that's similar and appears as a com port and I've written some nice sequencer software with a GUI that sends the relevant commands down the serial port to the board. However it's also Windows only.
You may also find this link handy, it's the "missing" documentation / samples from SainSmart:
https://s3-ap-northeast-1.amazonaws....20-018-909.rar