Author Topic: ttyD Serial Ports Not Recognized  (Read 4035 times)

twodogs

  • Guru
  • ****
  • Posts: 224
    • View Profile
ttyD Serial Ports Not Recognized
« on: March 02, 2011, 09:11:34 pm »
After installing a Syba SY-PCI15001 card and the latest driver from MOSCHIP I now have an additional 6 serial ports. However, two of the new ports show up as ttyD, and are apparently not recognized by LinuxMCE. Is there a way around this?

js@dcerouter:~/MCS9865_V1.0.0.11$ setserial -g /dev/tty[SD]*
/dev/ttyD0, UART: 16550A, Port: 0xdc00, IRQ: 19            
/dev/ttyD1, UART: 16550A, Port: 0xd880, IRQ: 18            
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4              
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3            
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4            
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3            
/dev/ttyS4, UART: 16550A, Port: 0xd800, IRQ: 16            
/dev/ttyS5, UART: 16550A, Port: 0xd480, IRQ: 16            
/dev/ttyS6, UART: 16550A, Port: 0xd400, IRQ: 16                                          
/dev/ttyS7, UART: 16550A, Port: 0xd080, IRQ: 16

I can use S0 (motherboard) and S4-S7 from the Syba card. The ttyD ports do not show up in the wizard when I install my Denon amp. S1-S3 are legacy addresses, I think, from the time when motherboards had many built-in serial ports. I tried to rename D0 to S2 using setserial. S2 subsequently appeared as a choice in the wizard, but it would not work. After this failure, I tried to reconnect on S0 using web admin (select S0, save, reload router). This did not work, nor would any of my other good ports until I deleted the device (AVR2310) and reinstalled to S0 using the wizard. After doing this, I could again use the web admin method to easily change between all my working ports.
By the way, I tested all the 6 ports on the card (including ttyD0 and D1) using minicom to talk with another computer through a null cable. Everything checked out fine.

Any insights are appreciated,

John

Code: [Select]
js@dcerouter:~/MCS9865_V1.0.0.11$ make           
rm -f *.mod.c *.o *.ko .*.cmd *.symvers         
make -C /lib/modules/2.6.27-17-generic/build/ SUBDIRS=/home/js/MCS9865_V1.0.0.11 modules                                                                       
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-17-generic'         
  CC [M]  /home/js/MCS9865_V1.0.0.11/mcs9865.o                                 
/home/js/MCS9865_V1.0.0.11/mcs9865.c: In function ‘receive_chars’:             
/home/js/MCS9865_V1.0.0.11/mcs9865.c:644: warning: comparison of distinct pointer types lacks a cast                                                           
/home/js/MCS9865_V1.0.0.11/mcs9865.c:718: warning: comparison of distinct pointer types lacks a cast                                                           
  CC [M]  /home/js/MCS9865_V1.0.0.11/mcs9865-isa.o                             
  Building modules, stage 2.                                                   
  MODPOST 2 modules                                                             
  CC      /home/js/MCS9865_V1.0.0.11/mcs9865-isa.mod.o                         
  LD [M]  /home/js/MCS9865_V1.0.0.11/mcs9865-isa.ko                             
  CC      /home/js/MCS9865_V1.0.0.11/mcs9865.mod.o                             
  LD [M]  /home/js/MCS9865_V1.0.0.11/mcs9865.ko                                 
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-17-generic'           
                                               
js@dcerouter:~/MCS9865_V1.0.0.11$ sudo insmod mcs9865.ko                       
[sudo] password for js:                                                         
js@dcerouter:~/MCS9865_V1.0.0.11$ sudo insmod mcs9865-isa.ko                   

js@dcerouter:~/MCS9865_V1.0.0.11$ setserial -g /dev/tty[SD]*
/dev/ttyD0, UART: 16550A, Port: 0xdc00, IRQ: 19             
/dev/ttyD1, UART: 16550A, Port: 0xd880, IRQ: 18             
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4             
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3             
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4             
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3             
/dev/ttyS4, UART: 16550A, Port: 0xd800, IRQ: 16             
/dev/ttyS5, UART: 16550A, Port: 0xd480, IRQ: 16             
/dev/ttyS6, UART: 16550A, Port: 0xd400, IRQ: 16                                           
/dev/ttyS7, UART: 16550A, Port: 0xd080, IRQ: 16

js@dcerouter:~/MCS9865_V1.0.0.11$ sudo setserial /dev/ttyS2 UART 16550A Port 0xdc00 IRQ 19
js@dcerouter:~/MCS9865_V1.0.0.11$ setserial -g /dev/tty[SD]*                             
/dev/ttyD0, UART: 16550A, Port: 0xdc00, IRQ: 19                                           
/dev/ttyD1, UART: 16550A, Port: 0xd880, IRQ: 18                                           
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4                                           
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3                                           
/dev/ttyS2, UART: 16550A, Port: 0xdc00, IRQ: 19                                           
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3                                           
/dev/ttyS4, UART: 16550A, Port: 0xd800, IRQ: 16                                           
/dev/ttyS5, UART: 16550A, Port: 0xd480, IRQ: 16                                           
/dev/ttyS6, UART: 16550A, Port: 0xd400, IRQ: 16                                           
/dev/ttyS7, UART: 16550A, Port: 0xd080, IRQ: 16

js@dcerouter:~/MCS9865_V1.0.0.11$ sudo setserial /dev/ttyD0 UART unknown Port 0x0000 IRQ 0
js@dcerouter:~/MCS9865_V1.0.0.11$ setserial -g /dev/tty[SD]*                             
/dev/ttyD0, UART: unknown, Port: 0x0000, IRQ: 0                                           
/dev/ttyD1, UART: 16550A, Port: 0xd880, IRQ: 18                                           
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4                                           
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3                                           
/dev/ttyS2, UART: 16550A, Port: 0xdc00, IRQ: 19                                           
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3                                           
/dev/ttyS4, UART: 16550A, Port: 0xd800, IRQ: 16                                           
/dev/ttyS5, UART: 16550A, Port: 0xd480, IRQ: 16                                           
/dev/ttyS6, UART: 16550A, Port: 0xd400, IRQ: 16                                           
/dev/ttyS7, UART: 16550A, Port: 0xd080, IRQ: 16

js@dcerouter:~/MCS9865_V1.0.0.11$ lspci -v
00:00.0 Host bridge: nVidia Corporation MCP79 Host Bridge (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356             
        Flags: bus master, 66MHz, fast devsel, latency 0         

00:00.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356                   
        Flags: bus master, 66MHz, fast devsel, latency 0               

00:03.0 ISA bridge: nVidia Corporation MCP79 LPC Bridge (rev b2)
        Subsystem: ASUSTeK Computer Inc. Device 8356           
        Flags: bus master, 66MHz, fast devsel, latency 0       
        I/O ports at 4f00 [size=256]                           

00:03.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356                   
        Flags: 66MHz, fast devsel                                     

00:03.2 SMBus: nVidia Corporation MCP79 SMBus (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356 
        Flags: 66MHz, fast devsel, IRQ 15             
        I/O ports at 4900 [size=64]                   
        I/O ports at 4d00 [size=64]                   
        I/O ports at 4e00 [size=64]                   
        Capabilities: <access denied>                 

00:03.3 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356                   
        Flags: 66MHz, fast devsel                                     

00:03.4 RAM memory: nVidia Corporation Device 0a98 (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356       
        Flags: 66MHz, fast devsel                         

00:03.5 Co-processor: nVidia Corporation MCP79 Co-processor (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356               
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 23   
        Memory at fad80000 (32-bit, non-prefetchable) [size=512K]   
        Kernel driver in use: nvidia                               
        Kernel modules: nvidia                                     

00:04.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1) (prog-if 10)
        Subsystem: ASUSTeK Computer Inc. Device 8356                                         
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21                             
        Memory at fad7f000 (32-bit, non-prefetchable) [size=4K]                               
        Capabilities: <access denied>                                                         
        Kernel driver in use: ohci_hcd                                                       
        Kernel modules: ohci-hcd                                                             

00:04.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1) (prog-if 20)
        Subsystem: ASUSTeK Computer Inc. Device 8356                                         
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 23                             
        Memory at fad7ec00 (32-bit, non-prefetchable) [size=256]                             
        Capabilities: <access denied>                                                         
        Kernel driver in use: ehci_hcd                                                       
        Kernel modules: ehci-hcd                                                             

00:06.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1) (prog-if 10)
        Subsystem: ASUSTeK Computer Inc. Device 8356                                         
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 20                             
        Memory at fad7d000 (32-bit, non-prefetchable) [size=4K]                               
        Capabilities: <access denied>                                                         
        Kernel driver in use: ohci_hcd                                                       
        Kernel modules: ohci-hcd                                                             

00:06.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1) (prog-if 20)
        Subsystem: ASUSTeK Computer Inc. Device 8356                                         
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 22                             
        Memory at fad7e800 (32-bit, non-prefetchable) [size=256]                             
        Capabilities: <access denied>                                                         
        Kernel driver in use: ehci_hcd                                                       
        Kernel modules: ehci-hcd                                                             

00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 82fe                         
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21             
        Memory at fad78000 (32-bit, non-prefetchable) [size=16K]             
        Capabilities: <access denied>                                       
        Kernel driver in use: HDA Intel                                     
        Kernel modules: snd-hda-intel                                       

00:09.0 PCI bridge: nVidia Corporation MCP79 PCI Bridge (rev b1) (prog-if 01)
        Flags: bus master, 66MHz, fast devsel, latency 0                     
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64       
        I/O behind bridge: 0000d000-0000dfff                                 
        Memory behind bridge: fae00000-faefffff                             
        Prefetchable memory behind bridge: dff00000-dfffffff                 
        Capabilities: <access denied>                                       

00:0a.0 Ethernet controller: nVidia Corporation MCP79 Ethernet (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356                   
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21       
        Memory at fad7c000 (32-bit, non-prefetchable) [size=4K]       
        I/O ports at c480 [size=8]                                     
        Memory at fad7e400 (32-bit, non-prefetchable) [size=256]       
        Memory at fad7e000 (32-bit, non-prefetchable) [size=16]       
        Capabilities: <access denied>                                 
        Kernel driver in use: forcedeth                               
        Kernel modules: forcedeth                                     

00:0b.0 IDE interface: nVidia Corporation MCP79 SATA Controller (rev b1) (prog-if 85 [Master SecO PriO])
        Subsystem: ASUSTeK Computer Inc. Device 8356                                                   
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 221                                       
        I/O ports at c400 [size=8]                                                                     
        I/O ports at c080 [size=4]                                                                     
        I/O ports at c000 [size=8]                                                                     
        I/O ports at bc00 [size=4]                                                                     
        I/O ports at b880 [size=16]                                                                     
        Memory at fad76000 (32-bit, non-prefetchable) [size=8K]                                         
        Capabilities: <access denied>                                                                   
        Kernel driver in use: ahci                                                                     
        Kernel modules: ahci                                                                           

00:0c.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
        Flags: bus master, fast devsel, latency 0                       
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0   
        Capabilities: <access denied>                                   
        Kernel driver in use: pcieport-driver                           
        Kernel modules: shpchp                                         

00:10.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
        Flags: bus master, fast devsel, latency 0                       
        Bus: primary=00, secondary=03, subordinate=03, sec-latency=0   
        I/O behind bridge: 0000e000-0000efff                           
        Memory behind bridge: faf00000-fbffffff                         
        Prefetchable memory behind bridge: 00000000e0000000-00000000f9ffffff
        Capabilities: <access denied>                                       
        Kernel modules: shpchp                                             

00:15.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1)
        Flags: bus master, fast devsel, latency 0                       
        Bus: primary=00, secondary=04, subordinate=04, sec-latency=0   
        Capabilities: <access denied>                                   
        Kernel driver in use: pcieport-driver                           
        Kernel modules: shpchp                                         

01:05.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
        Subsystem: DViCO Corporation Device d500                                       
        Flags: bus master, medium devsel, latency 64, IRQ 17                           
        Memory at dffff000 (32-bit, prefetchable) [size=4K]                           
        Capabilities: <access denied>                                                 
        Kernel driver in use: bttv                                                     
        Kernel modules: bttv                                                           

01:05.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
        Subsystem: DViCO Corporation Device d500                                 
        Flags: bus master, medium devsel, latency 64, IRQ 17                     
        Memory at dfffe000 (32-bit, prefetchable) [size=4K]                     
        Capabilities: <access denied>                                           
        Kernel driver in use: bt878                                             
        Kernel modules: bt878                                                   

01:06.0 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
        Subsystem: Device a000:1000
        Flags: bus master, medium devsel, latency 64, IRQ 19
        I/O ports at dc00 [size=8]
        Memory at faeff000 (32-bit, non-prefetchable) [size=4K]
        Memory at faefe000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: mcs9865-serial

01:06.1 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
        Subsystem: Device a000:1000
        Flags: bus master, medium devsel, latency 64, IRQ 18
        I/O ports at d880 [size=8]
        Memory at faefd000 (32-bit, non-prefetchable) [size=4K]
        Memory at faefc000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: mcs9865-serial

01:06.2 Communication controller: NetMos Technology PCI 9865 Multi-I/O Controller
        Subsystem: Device a000:3004
        Flags: bus master, medium devsel, latency 64, IRQ 16
        I/O ports at d800 [size=8]
        I/O ports at d480 [size=8]
        I/O ports at d400 [size=8]
        I/O ports at d080 [size=8]
        Memory at faefb000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: serial-isa

03:00.0 VGA compatible controller: nVidia Corporation GeForce 9300 / nForce 730i (rev b1)
        Subsystem: ASUSTeK Computer Inc. Device 8356
        Flags: bus master, fast devsel, latency 0, IRQ 22
        Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f8000000 (64-bit, prefetchable) [size=32M]
        I/O ports at ec00 [size=128]
        [virtual] Expansion ROM at fafe0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nvidia, nvidiafb

js@dcerouter:~/MCS9865_V1.0.0.11$
« Last Edit: March 02, 2011, 09:13:46 pm by twodogs »
http://greenrenovation.wordpress.com/home-automation/
system:
ASUS P5N7A-VM
integrated GeForce 9300
E5200 processor
Fusion 5 lite HDTV card
2G RAM
SYBA SY-PCI15001 6-port serial card
Denon AVR 3805
LG 42" Plasma
Gyration GYR3101
Cisco SPA3102 analog telephone adapter
Cisco 7971G IP phone/orbiter

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: ttyD Serial Ports Not Recognized
« Reply #1 on: March 02, 2011, 09:23:29 pm »
You might try disabling the un-used serial ports (S1-S3) in your your BIOS.  The additional ports may be re-numbered at the lower addresses then...  Not sure if that'll work or not, but it's what I'd try first.

J.

twodogs

  • Guru
  • ****
  • Posts: 224
    • View Profile
Re: ttyD Serial Ports Not Recognized
« Reply #2 on: March 02, 2011, 09:37:19 pm »
I just gave that a try. The BIOS only lets me turn off my single onboard port or change its default address. I think the linux kernel sets up S0-S3 by default? I also think that the MOSCHIP driver is responsible for creating the ttyD ports. I've emailed their tech support with no luck yet. Based on the fact that the ports work in minicom, I think I have a naming problem. So maybe two solutions:

1. Rename the ttyD ports to ttyS (tried it, but I might not be using setserial correctly - see code in first post)
2. Modify LMCE to recognize ttyD ports (don't really know where to look to do this  - anyone?)

John
« Last Edit: March 02, 2011, 09:39:58 pm by twodogs »
http://greenrenovation.wordpress.com/home-automation/
system:
ASUS P5N7A-VM
integrated GeForce 9300
E5200 processor
Fusion 5 lite HDTV card
2G RAM
SYBA SY-PCI15001 6-port serial card
Denon AVR 3805
LG 42" Plasma
Gyration GYR3101
Cisco SPA3102 analog telephone adapter
Cisco 7971G IP phone/orbiter

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: ttyD Serial Ports Not Recognized
« Reply #3 on: March 02, 2011, 11:37:37 pm »
look at UpdataAvailableSerialPorts.sh
rock your home - http://www.agocontrol.com home automation