What does the “opost” stty flag do?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What does the “opost” stty flag do?

1,072 Views
okwaj
Contributor III
Hi, I am working on an imx6UL .
 
I can communicate with a device over UART with the following command in the linux shell:
 

 

echo "abcd" > /dev/ttymxc6

 

I am using this UART for RS485 communication. The communication works well on the linux shell but when I use pymodbus, it creates a Serial that deactivates the"opost" flag to ttymxc6 for unknown reasons.

Without using pymodbus (and so pyserial):

 

root@user:~# stty -F /dev/ttymxc6
speed 9600 baud; line = 0;
-brkint -imaxbel

 

After using pymodbus:

 

root@user:~# stty -F /dev/ttymxc6
speed 9600 baud; line = 0;
min = 0; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

 

It is annoying because I have to add :

 

os.system("stty -F /dev/ttymxc6 opost")

 

In my code to make it work and this takes around 11ms which is pretty long for my application...


What does the opost flag do on IMX6UL ?

0 Kudos
1 Reply

1,061 Views
nxf54947
NXP Employee
NXP Employee

Hi  @okwaj,

I believe a similar question was answered at https://unix.stackexchange.com/questions/402874/what-does-the-opost-stty-flag-do

Regards,

Ruben

0 Kudos