HardwareSupportComponentsSerialPorts

Serial ports

The Ubuntu Linux kernel comes with serial support compiled in -- this is to support a console on the serial port (the console is required before modules are loaded). The serial ports on your motherboard will probably be supported by default. What if you want to hook up more serial devices, however, eg for data logging, to drive a bank of fax modems, or for some other reason? In that case, you can buy a PCI card and add more serial ports (typically via an external "octopus cable", due to the space restrictions on the back of a PCI slot). If you have bought one of these expansion cards you may need to change your boot configuration slightly in order for the ports to be recognised by the OS.

For "Dumb" serial cards (if you paid less than about $200, this is probably what you have):

  • edit the GRUB configuration file
    sudo vi /boot/grub/menu.lst
  • Look for the section beginning  ### BEGIN AUTOMAGIC KERNELS LIST 

  • Modify the  # kopt=  line by appending as follows:

    • original
      # kopt=root=UUID=61070778-d126-4faa-a1e1-26b189e82f83 ro
    • modified (note: it is still "commented out"!)
      # kopt=root=UUID=61070778-d126-4faa-a1e1-26b189e82f83 ro 8250.nr_uarts=16
  • run grub:
    sudo update-grub
  • Reboot
  • You should see the serial ports registered within your  /var/log/messages  output (or see  dmesg ):

    May 22 12:01:14 kala kernel: [   22.055064] Serial: 8250/16550 driver $Revision: 1.90 $ 16 ports, IRQ sharing enabled
    May 22 12:01:14 kala kernel: [   22.055221] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    May 22 12:01:14 kala kernel: [   22.055455] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    May 22 12:01:14 kala kernel: [   22.057234] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    May 22 12:01:14 kala kernel: [   22.057554] 00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    May 22 12:01:14 kala kernel: [   22.057773] ACPI: PCI Interrupt 0000:03:0c.0[A] -> GSI 25 (level, low) -> IRQ 16
    May 22 12:01:14 kala kernel: [   22.057938] ttyS4: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.057948] 0000:03:0c.0: ttyS4 at I/O 0xdce0 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.058241] ttyS5: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.058250] 0000:03:0c.0: ttyS5 at I/O 0xdce8 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.058515] ttyS6: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.058524] 0000:03:0c.0: ttyS6 at I/O 0xdcf0 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.058785] ttyS7: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.058794] 0000:03:0c.0: ttyS7 at I/O 0xdcf8 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.058944] ACPI: PCI Interrupt 0000:03:0c.1[A] -> GSI 25 (level, low) -> IRQ 16
    May 22 12:01:14 kala kernel: [   22.059098] ttyS8: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.059108] 0000:03:0c.1: ttyS8 at I/O 0xdcc0 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.059459] ttyS9: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.059469] 0000:03:0c.1: ttyS9 at I/O 0xdcc8 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.059749] ttyS10: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.059759] 0000:03:0c.1: ttyS10 at I/O 0xdcd0 (irq = 16) is a 16C950/954
    May 22 12:01:14 kala kernel: [   22.060021] ttyS11: detected caps 00000700 should be 00000100
    May 22 12:01:14 kala kernel: [   22.060030] 0000:03:0c.1: ttyS11 at I/O 0xdcd8 (irq = 16) is a 16C950/954

For Smart serial cards, you may need to install an additional driver. See the documentation that came with the card. For more information on the distinction between smart & dumb cards, how to configure the ports now that they are recognised by the OS, and much more useful information, see the serial HOWTO.


CategoryHardware

HardwareSupportComponentsSerialPorts (last edited 2008-08-06 16:41:19 by localhost)