2

I need to find the linux way of running the following DOS commands:

MODE COM1: 9600,N,8,1,P
COPY FIRMWARE.COD COM1 

Is this possible? I know COM1 in Linux is /dev/ttyS0 but that's about it. How do you set the mode on it and perform the copy?

wonea
  • 1,817
  • 1
  • 23
  • 42
nmuntz
  • 751
  • 4
  • 10
  • 23

1 Answers1

8

Set tty device settings:

stty -F /dev/ttyS0 9600 -parity cs8 -cstopb

Send data:

cat firmware.cod > /dev/ttyS0
u1686_grawity
  • 426,297
  • 64
  • 894
  • 966