$ sudo uname -a
Linux iugo 3.7.0-4-generic #12~lp1085115v1 SMP Fri Nov 30 20:57:19 UTC 2012 
i686 i686 i686 GNU/Linux
(i have this kernel because of Bug #1085115, but the standard ubuntu kernel 
behaves exactly similar)

$ sudo dmesg|grep tty
[    0.000000] console [tty0] enabled
[    0.663436] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.683785] 00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

$ sudo ls -al /dev/ttyS?
crw-rw---- 1 root dialout 4, 64 Dec  8 10:05 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Dec  8 10:05 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Dec  8 10:05 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Dec  8 10:05 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 Dec  8 10:05 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 Dec  8 10:05 /dev/ttyS5
crw-rw---- 1 root dialout 4, 70 Dec  8 10:05 /dev/ttyS6
crw-rw---- 1 root dialout 4, 71 Dec  8 10:05 /dev/ttyS7
crw-rw---- 1 root dialout 4, 72 Dec  8 10:05 /dev/ttyS8
crw-rw---- 1 root dialout 4, 73 Dec  8 10:05 /dev/ttyS9

$ sudo cat /etc/group|grep koen
adm:x:4:koen
tty:x:5:koen
dialout:x:20:koen
cdrom:x:24:koen
sudo:x:27:koen
dip:x:30:koen
plugdev:x:46:koen
lpadmin:x:107:koen
scanner:x:116:koen
koen:x:1000:

$ sudo which cu
/usr/bin/cu

$  cu -l /dev/ttyS0 -s 115200
Connected.

(note: cu always says "Connected.", this doesn't mean anything)
(also note: the baudrate, parity, et cetera... are correct; the cable is 
healthy and connected to the right serial port)

$ sudo cu -l /dev/ttyS0 -s 115200
/usr/bin/cu: open (/dev/ttyS0): Permission denied
/usr/bin/cu: /dev/ttyS0: Line in use

$ sudo su -
# cu -l /dev/ttyS0 -s 115200
/usr/bin/cu: open (/dev/ttyS1): Permission denied
/usr/bin/cu: /dev/ttyS1: Line in use

nothing can be found in any logs, and i don't see any way to debug this
from userland. do we really need to hook up a kernel debugger to get a
serial line working in a modern unix?

to rule things out, i made a polkit action definition for this. logs
confirmed the action definition worked. i tried the above scenarios with
polkit's pkexec. it didn't make any difference.

to rule things out, i tried making a pam exception for this
(capabilities), by adding some lines to /etc/security/group.conf and
creating /etc/pam.d/cu. it didn't make any difference, but i'm not sure
my pam configuration was entirely correct.

to rule things out, i started fiddling with /bin/stty (which shouldn't
be needed). it didn't make any difference. for the record:

$ sudo stty -a
speed 38400 baud; rows 43; columns 124; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; 
swtch = M-^?; 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

$ sudo stty -g
6d02:5:4bf:8a3b:3:1c:7f:15:4:0:1:ff:11:13:1a:ff:12:f:17:16:ff:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

$ sudo stty -F /dev/ttyS0 speed
115200
(this is interesting! apparently baudrate was set by cu?)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1087519

Title:
  Serial port ttyS4 doesn't work in 12.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1087519/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to