Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal lithron's Journal: more linux serial card maddness (you can ignore this) 4

old serial card entry I made. But I left out any REAL information that might have been helpful. So here is that data so I can search for it in the future and still not be able to find it.

Setting up a StarTech PCI1S550 Serial Card

# more /proc/pci
                        [garbage to ignore..... the last few lines should be similar]

Bus 0, Device 11, function 0:
                        Serial controller : Unknown vendor Unknown device (rev 01).
                        Vendor id=9710, Device id=9820

                        Medium devsel. Fast back-to-back capable. IRQ 11

                        I/O at 0xc000 [0xc001] serial port 1
                        I/O at 0xc400 [0xc401] serial port 2
                        I/O at 0xc800 [0xc801] not used
                        I/O at 0xd000 [0xd001] not used
                        I/O at 0xd400 [0xd401] not used
                        I/O at 0xd800 [0xd801] not used

Pay attention to the 0xc000 and 0xc400 lines. Those first two lines are the important ones. Yours won't match the numbers above.

Next, determine what ttyS numbers are already in use. You can do this by viewing the /etc/inittab file and looking for lines that start with 'S#:2345'. The ttyS numbers that get added by this serial card need to be higher than the numbers already in use. For example, if S0 and S1, are in the inittab file, then we'll be creating ttyS2 and ttyS3 in the examples below.

Add these lines to /etc/rc.d/rc.local:
setserial /dev/ttyS1 port 0xc000 uart 16550 irq 11 baud_base 115200
setserial /dev/ttyS2 port 0xc400 uart 16550 irq 11 baud_base 115200

Add a couple of lines to /etc/inittab:
S1:2345:off:/sbin/getty ttyS1 DT19200 ansi
S2:2345:off:/sbin/getty ttyS2 DT19200 ansi

Reboot. The serial port(s) should work fine now.

This discussion has been archived. No new comments can be posted.

more linux serial card maddness (you can ignore this)

Comments Filter:
  • Why the reboot? Shouldn't you just be able to restart whichever runlevel you are in?
    • There is a two fold reason for that.

      #1 Redhat doesn't seem to process rc.local during runlevel changes (which is fine. We put things in there that shouldn't be run during runlevel changes).

      #2 Our installation guys and our in-house tech support guys aren't *nix trained, and they already understand rebooting. So its less training that we have to do.

      Any reason we should be changing runlevels for this sort of thing?
      • I didn't mean to imply a 'change' of runlevel, merely restarting the runlevel.

        For that matter, can you just run the commands from the command line and just have the changes to rc.local present for the next reboot? It's been a while since I futzed with running new tty's, so I can't remember.

        And I totally understand telling them 'just reboot'. Helps the Windows monkeys deal.
        • I didn't know you could restart runlevels without changing it to something else first. I'll have to look into that so I can keep my geek card ;-)

          Running the commands from the prompt would work, but I don't trust that they'll get typed in twice without error (once at the command line and once in rc.local). You would also have to run 'init q' to make sure init is aware of the S1 and S2 ports.. but since they're off I don't supose it would really matter.

"Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!" -- Buckaroo Banzai

Working...