how to Change baud rate of ttyS0 in ubuntu 14.04

2

1

i cant change the baud rate of ttyS0 and ttyS1 from 115200 , i want to change the baud rate to 9600 because the baud rate of POS printer is 9600. . thank you!

user319339

Posted 2014-04-30T03:39:03.537

Reputation: 21

i already used that but nothing changes, – user319339 – 2014-04-30T05:30:31.183

What did you try, precisely? What, exactly, was the error message that it returned? – John1024 – 2014-04-30T05:47:50.423

Answers

4

The stty command handles that:

sudo stty -F /dev/ttyS0 9600

You can confirm that you succeeded in changing the baud rate by asking stty to print out the current settings with:

sudo stty -F /dev/ttyS0 -a

See man stty for more details.

John1024

Posted 2014-04-30T03:39:03.537

Reputation: 13 893