use echo to send command then use cat to get return. use ctrl+c to exit cat
echo -e "AT+QCFG=\"nwscanmode\",3,1" > /dev/ttyUSB2 cat /dev/ttyUSB2