Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: Numtem on March 06, 2018, 06:45:25 PM

Title: UART Parity odd or even
Post by: Numtem on March 06, 2018, 06:45:25 PM
Hi All

I´ve been able to communicate with my olinuxino imx233 MAXI using parity none and that fine but does anyone been able to use parity odd or even?
In the manual i don´t seen any entry related to this subject.

BR   
Title: Re: UART Parity odd or even
Post by: JohnS on March 06, 2018, 09:08:42 PM
If you want parity you would have to set it yourself.  (I don't see any reason to, but up to you.)

If using Linux, see stty

John
Title: Re: UART Parity odd or even
Post by: Numtem on March 07, 2018, 01:15:47 PM
Hi John

Thanks for your feedback, this is what i done:

root@arm:~# sudo stty -aF /dev/ttyAPP0
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
root@arm:~#
root@arm:~#
root@arm:~# stty -F /dev/ttyAPP0 115200 parenb parodd cs7
root@arm:~#
root@arm:~#
root@arm:~# sudo stty -aF /dev/ttyAPP0
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
parenb parodd cs7 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
root@arm:~#


but even when i try to access (putty) using parity odd or even i only see garbage.
Title: Re: UART Parity odd or even
Post by: JohnS on March 09, 2018, 03:20:14 PM
Sounds like you need to go hunting as to why.

Expect it to be frustrating unless you have some suitable hardware tool(s) (and maybe even if you have).

John