I'm trying something like Linux serial port listener and interpreter?
However, I want a timeout
#!/bin/bash
stty -F /dev/ttyUSB1 300 cs7 parenb -parodd
echo -n -e 'Sending '
echo -n -e "\x2F\x3F\x21\x0D\x0A">/dev/ttyUSB1
read LINE -r -t1 </dev/ttyUSB1
echo -n "Read "
echo $LINE
I'd like to continue if I do not get input; it just hangs.
(It is part of an input routine for reading a powermeter https://electronics.stackexchange.com/questions/305745/ir-data-from-landisgyr-e350)