-
Notifications
You must be signed in to change notification settings - Fork 130
SerialPortSetup
Note: This step is very hardware dependent -- it may not apply to your installation, if not skip this page!
I use an older four port STB serial adapter to provide the extra serial connections that my setup requires. There is an excellent HowTo: “Serial HOWTO” that seems to have everything that you could possibly want to know about Linux and serial ports. This is pretty much true except for some critical information that I needed to enable ports above ttyS3. The following instructions probably apply to most dumb serial cards but may be very specific to the Ubuntu distribution – I don't have enough experience with other distributions to know but I do know that it was very hard to find the necessary instructions on the net.
Working as root logged into the MH server box, install setserial with apt-get: //**root@mh_server:/#**// sudo apt-get install setserial
Edit autoserial.conf to enable and configure the serial drivers you need: //**root@mh_server:/#**// sudo nano /var/lib/setserial/autoserial.conf
The file should look something like this (my box has 2 built in serial ports):
code format="bash"
- PORT STATE GENERATED USING AUTOSAVE-ONCE###
- AUTOSAVE-ONCE###
- AUTOSAVE-ONCE###
- AUTOSAVE###
- If you want to configure this file by hand, use
- dpkg-reconfigure setserial
- and change the configuration mode of the file to MANUAL. If you do not do this, this file
- may be overwritten automatically the next time you upgrade the package.
My serial card is an old ISA four port (STB 4-Com). It is a dumb serial card that has the ability to share irq's but does not require special drivers (apparently this may not be true for earlier versions of the kernel). The base address and irq's are set by jumpers on the card. I added the following lines to the file:
code format="bash" /dev/ttyS2 uart 16550A port 0x01e8 irq 10 baud_base 115200 spd_normal skip_test /dev/ttyS3 uart 16550A port 0x01a8 irq 10 baud_base 115200 spd_normal skip_test /dev/ttyS4 uart 16550A port 0x01f8 irq 10 baud_base 115200 spd_normal skip_test /dev/ttyS5 uart 16550A port 0x02a8 irq 10 baud_base 115200 spd_normal skip_test code
Next type: //**root@mh_server:/#**// sudo dpkg-reconfigure setserial
And select “manual” to prevent the file from being overwritten. Then reboot your computer. Once you have rebooted, you can type: //**root@mh_server:/#**// sudo setserial -g /dev/ttyS*
To make sure that the ports got set correctly. You should see output from this command that looks something like this:
code format="bash" /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 /dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3 /dev/ttyS2, UART: 16550A, Port: 0x01e8, IRQ: 10 /dev/ttyS3, UART: 16550A, Port: 0x01a8, IRQ: 10 /dev/ttyS4, UART: 16550A, Port: 0x01f8, IRQ: 10 /dev/ttyS5, UART: 16550A, Port: 0x02a8, IRQ: 10 /dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0 ... code
There will be a number of other lines with “unknown” and “0” addresses. These are names other potential serial ports that have not been enabled. You will also notice all of the serial ports being set up at boot time if you watch the boot messages carefully.
Next: Download & Install Support Packages Back: Enable Remote Access with SSH Return to Index