Serial Port COM1 under Linux on IBM ThinkPad 770X

Dirk W. Steinberg (Dirk_Steinberg@bonn.detecon.de)
Fri, 02 Jul 1999 17:14:13 +0200


Hi,

has anyone succeeded in using the serial port on an
IBM ThinkPad 770X notebook unser Linux?

I have been unlucky so far:

root@ibmtop:pts/0 ~ # id
uid=0(root) gid=0(root) groups=0(root)
root@ibmtop:pts/0 ~ # cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 ttyS
5 cua
....
root@ibmtop:pts/0 ~ # ll /dev/ttyS[01]
0 crw-rw---- 1 root dialout 4, 64 Feb 23 04:42 /dev/ttyS0
0 crw-rw---- 1 root dialout 4, 65 Feb 23 04:42 /dev/ttyS1
root@ibmtop:pts/0 ~ # cu -l /dev/ttyS0
cu: open (/dev/ttyS0): Permission denied
cu: /dev/ttyS0: Line in use
zsh: 5731 exit 1 cu -l /dev/ttyS0

>From strace cu:
open("/dev/ttyS0", O_RDWR|O_NONBLOCK) = -1 EACCES (Permission denied)

But this is as superuser (root). How is this possible at all?

I have tried a number of things:

1. It is enabled in the Control Panel of Windows 98
2. It work under Windows 98
3. I tried leaving the resources as auto-configure in Win
4. I tried setting the resources of COM1 to IRQ 4, I/O 0x3f8 in Win
5. I tried setserial

root@ibmtop:pts/0 ~ # setserial /dev/ttyS0
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
root@ibmtop:pts/0 ~ # setserial -av /dev/ttyS0
/dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000, closing_wait2: infinite
Flags: spd_normal

I could also manually set the type to 16550A, but it doesn't help either.

6. I tried CONFIG_SERIAL_DETECT_IRQ in the Linux kernel config
From dmesg:

Serial driver version 4.27 with HUB-6 MANY_PORTS MULTIPORT SHARE_IRQ DETECT_IRQ enabled
ttyS01 at 0x02f8 (irq = 3) is a 16550A

ttyS01 presumably is the IrDa port, which I set to 3/0x2f8.

This is Kernel 2.2.9, but I also tried 2.2.{2,5,8} and 2.1.x

7. Rebooting from Win to Linux doesn't help

8. Finally I tried this:

root@ibmtop:pts/0 ~ # chmod 777 /dev/ttyS[01]
root@ibmtop:pts/0 ~ # setserial -av -z /dev/ttyS0 port 0x03f8 auto_irq autoconfig
/dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000, closing_wait2: infinite
Flags: spd_normal auto_irq

root@ibmtop:pts/0 ~ # cu -l /dev/ttyS0
Connected.
cu: Got hangup signal

Disconnected.

I'm lost! Any ideas/help? I desperately need that stupid serial port.... :-(

Thanks for any pointers,

Dirk

BTW: Are there any IrDa drivers for the TP770X built-in Fast IrDa port?
Or maybe just in Slow IrDa mode?

-- 
Dipl.-Ing. Dirk W. Steinberg
__________________________________________________
Consultant Technologieberatung Informationssysteme
DETECON GmbH,  Oberkasseler Strasse 2,  53227 Bonn
Tel.:  (0228) 700-1277    Fax:     (0228) 700-1157   
Mobil: (0171) 221 6585    Internet: www.detecon.de

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/