I am echoing an AT command to a modem interface (/dev/ttyUSB3
) and the command runs successfully.
For instance the below command works and has an output of OK
:
echo -e "ATZ\r" > /dev/ttyUSB3
I can see this by having another terminal with cat /dev/ttyUSB3
active.
How do I, instead of using cat
(eg use one command to send a command and get output back), redirect the output OK
to a variable or file so that I can process data returned from the modem?