Today:
   Support & Service
      Download Center
      RMA Service
      Product Warranty
      FAQ
   Related Links
    ::  Contact Us
>visionsystems.de/Support & Service/Frequently Asked Questions

FAQ (Frequently Asked Questions)

Wechsel zur deutschsprachigen Version ...


Configure serial Ports with LINUX

The only boards supported by special drivers are those from the PCI-series. This is not a problem, since the serial ports are already supported by the kernel. Only the actual settings have to be configured. Even the PCI-series may be used this way; this is necessary with older kernels. This configuration is done with Setserial. The settings should be placed in /sbin/init.d/serial, to execute them at every system start. An example might look like this:

        ${SETSERIAL} ttys0 port 0x3f8 irq 4 uart 16550A ^fourport
        ${SETSERIAL} ttys1 port 0x2f8 irq 3 uart 16550A ^fourport
        ${SETSERIAL} ttys2 port 0x100 irq 5 uart 16550A ^fourport
        ${SETSERIAL} ttys3 port 0x108 irq 5 uart 16550A ^fourport
        ${SETSERIAL} ttys4 port 0x110 irq 5 uart 16550A ^fourport
        ${SETSERIAL} ttys5 port 0x118 irq 5 uart 16550A ^fourport
                

The ports ttys0 and ttys1 already exist, typical on the Mainboard. Ports ttys2 through ttys5 belong to a VScom 400 Turbo, configured for base address 0x100 and IRQ 5. With a VScom 800 Turbo one will place settings up to ttys9. Right now all ports work OK with these settings. Additional calls of Setserial may integrate more ports into the system.

There is a problem with VScom PCI-Series here. Via PCI-Bus (Plug&Play) the board gets its resources dynamically. So the settings aren't controllable directly. But Linux is sufficiently informative also here. In /proc/pci one finds all necessary information. Here are the important data for all cards of the VScom PCI-Series, with example values for address and IRQ.

The IRQ and the address become parameters at Setserial. The resources are assigned dynamically with every start of the PC; but they only change, if something else is changed in the configuration of the computer. So one can rely on these values to be stable.

Additional the VScom PCI board is set to high transmission speed automatically, this is eight times faster than normal. This would always cause a higher baud rate than configured by a program. To correct this, Setserial needs an extra parameter, this is baud_base 921600. The driver is configured to calculate all speeds based on a maximum transmission rate of 921.6kbps. Meanwhile many cards offer the option to configure the standard speed. This is not recommended, therefore not mentioned further here.

Compatibility and higher speed:
Especially older programs do not allow to select all speeds (namely the high ones). For these purposes there are the options spd_hi and spd_vhi. When a port is configured with this setting, the driver replaces the baud rate 38400 with the speed of 57.6kbps (or 115.2kbps). This setting is placed at the end of the configuration command line.

Setting the Handshake:
Stty - set terminal characteristics If your modem supports hardware-handshake, you should ensure, this is active. Most surprising only few communication programs try to set this; so you must do this manually. This is best done also in the serial-Script, by calling stty this way:
$ stty crtscts < /dev/ttys1

This is a complete Script for a VScom 400L PCI with parameters from the examples:


  ${SETSERIAL} ttys0 port 0x3f8 irq 4 uart 16550A ^fourport spd_hi
  ${SETSERIAL} ttys1 port 0x2f8 irq 3 uart 16550A ^fourport spd_hi
  ${SETSERIAL} ttys2 port 0xa800 irq 10 uart 16550A baud_base 921600 ^fourport spd_hi
  ${SETSERIAL} ttys3 port 0xa400 irq 10 uart 16550A baud_base 921600 ^fourport spd_hi
  ${SETSERIAL} ttys4 port 0x9c00 irq 10 uart 16550A baud_base 921600 ^fourport spd_hi
  ${SETSERIAL} ttys5 port 0x9c08 irq 10 uart 16550A baud_base 921600 ^fourport spd_hi
  stty crtscts 38400 </dev/ttys0
  stty crtscts 38400 </dev/ttys1
  stty crtscts 38400 </dev/ttys2
  stty crtscts 38400 </dev/ttys3
  stty crtscts 38400 </dev/ttys4
  stty crtscts 38400 </dev/ttys5
                

With a VScom Turbo- or Pro-series card please insert the configured addresses.

The boards of the VScom Turbo - series allow different maximum speeds. In the PRO and PCI series the factors 1 and 8 are possible. Depending on configuration possible values for Baud_base are:

Factor  Baud Base
All boards 115,200 kbps
VScom Turbo, VScom 200 PRO, VScom 100 PRO 230,400 kbps
VScom Turbo, VScom 200 PRO, VScom 100 PRO 460,800 kbps
VScom PCI, VScom PRO (not VScom 100 PRO) 921,600 kbps
VScom 100 PRO 12  1,382400 Mbps

The upper settings - namely for the VScom 400 PCI - have been tested an transmitted by Mr. Stephan Isringhausen-Bley of the Ruhr Universität Bochum. Here again we want to express our many thanks for this.

All trademarks and brands are property of their rightful owners.
Copyright © 2005-2022, VS Vision Systems GmbH. All Rights Reserved.