Welcome, Guest

Author Topic: UART Parity odd or even  (Read 442 times)

Numtem

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
UART Parity odd or even
« 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   

JohnS

  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +33/-45
Re: UART Parity odd or even
« Reply #1 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

Numtem

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
Re: UART Parity odd or even
« Reply #2 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.

JohnS

  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +33/-45
Re: UART Parity odd or even
« Reply #3 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