I have a small LED matrix controlled by a display driver that accepts serial commands to update the display. I'm successfully controlling it via node with the node serial package, however I'd like to be able to update it with echo so that I can control it earlier in the boot up process with a shell script.
To start testing this new method, I set it up with:
chmod o+rw /dev/ttyUSB0 stty /dev/ttyUSB0 115200
And I'm able to send it commands using screen:
screen -F /dev/ttyUSB0 115200
However when I try to use:
echo -e 'title \r' > /dev/ttyUSB0
it doesn't work, and when I monitor the response in another window with
cat -v < /dev/ttyUSB0
I see that its receiving the message but it seems fragmented and also continuously responding with an error as if I'm sending lots of bad and/or blank commands.
How can I mimic the commands sent from screen using echo?