-1

How can I send input to /dev/ttyUSB0 and get its output. I'm trying to do this in bash script. Any ideas?

0xmtn
  • 360
  • 3
  • 15
denizeren
  • 329
  • 3
  • 11
  • 1
    I've read your question several times and still can't figure out what your trying to achieve. Can you clarify please. – user9517 Dec 03 '12 at 08:50
  • I will explain it with screen: `screen /dev/ttyUSB0` `COMMAND` `output` `exit screen` In such case I can do it with screen but I need a script to do it. – denizeren Dec 03 '12 at 08:54

1 Answers1

1

I solved this problem using pyserial library of python.

http://pyserial.sourceforge.net/

denizeren
  • 329
  • 3
  • 11