How do I access the UART pins on 40-pin GP bus?
I follow the instruction on the wiki to install ubuntu and updated the kernel on Up Squared
$ uname -a Linux ***** 4.15.0-37-generic #40~upboard03-Ubuntu SMP Wed Dec 12 16:21:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
I use a jumper cable to connect pin 8 and pin 10 and follow the instruction on the UP2 pinout wiki and see that my UART node is ttyS5.
$ ls /sys/bus/pci/devices/0000\:00\:18.?/dw-apb-uart.*/tty/ | grep tty /sys/bus/pci/devices/0000:00:18.0/dw-apb-uart.8/tty/: ttyS4 /sys/bus/pci/devices/0000:00:18.1/dw-apb-uart.9/tty/: ttyS5
then I do a simple read-write. It will just hang at the cat command.
$ echo "hello world" > /dev/ttyS5 $ cat -v < /dev/ttyS5
Am I missing some steps to get the UART pins working?
Here are some additional information on the things I tried:
$ stty -F /dev/ttyS5 -a 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; discard = ^O; min = 1; time = 0; -parenb -parodd -cmspar 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 -flusho -extproc
running linux-serial-test as suggest by another UART post:
$ ./linux-serial-test -s -e -p /dev/ttyS5 -b 9600 Linux serial test app Error setting RS-232 mode: Inappropriate ioctl for device No data received for 2.0s. No data transmitted for 2.0s. No data received for 3.0s. No data transmitted for 3.0s. No data received for 4.0s. No data transmitted for 4.0s. /dev/ttyS5: count for this session: rx=4096, tx=8191, rx err=0 /dev/ttyS5: TIOCGICOUNT: ret=0, rx=4096, tx=4096, frame = 0, overrun = 0, parity = 0, brk = 0, buf_overrun = 0 No data received for 2.0s. No data transmitted for 2.1s. No data received for 3.0s. No data transmitted for 3.1s. No data received for 4.0s. No data transmitted for 4.1s. No data received for 2.0s. No data transmitted for 2.0s. /dev/ttyS5: count for this session: rx=8192, tx=12287, rx err=0 /dev/ttyS5: TIOCGICOUNT: ret=0, rx=8192, tx=9215, frame = 0, overrun = 0, parity = 0, brk = 0, buf_overrun = 0
- 287 All Categories
- 104 Announcements & News
- 47 Product News - New Product/Product Change Notice/ End-of-life
- 179 Welcome Developers!
- 49 Unboxing & Project Sharing
- 18 Tech Updates
- 376 UP Products
- 6 UP Xtreme i11
- 12 UP Squared 6000
- 38 UP Squared Pro
- 126 UP Xtreme
- 796 UP Squared
- 1.4K UP Board
- 86 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 40 UP AI Edge
- 213 Starter Kits & Peripheral