Devserv: A Device Server

This program (devserv) receives and carries out requests from local or remote clients to drive serial video devices. (See Remote Camera and Videoswitcher Control Software.) The devices supported are the Sony EVI-D30, Canon VC-C1, Canon VC-C3, and Canon VC-C4 cameras and the Panasonic WJ-MX50 video switcher. Devserv communicates with these devices using RS-232. Devserv receives client requests via unicast UDP messages and sends its replies (which are description messages) via IP multicast.

Platforms

Devserv was developed and tested under Solaris 2.6/2.7 and ported to freeBSD 2.2.x/3.x, Linux 2.2.5/2.2.19 (under Redhat 6.1/6.2), Irix 6.5, and Windows 95/98/NT/2000. Starting with version 1.0, devserv is multithreaded. Version 0.4.7 works the best for Irix and versions 0.4.7 and 1.1 work the best for Linux. The Solaris binary includes support for the CIF communication library.

Compiling and Running

The distribution of devserv includes packages with executables or source code for building your own binaries for each of the platforms. These packages have been archived as "src" or "bin" and include the platform and version number in their titles. Devserv was written in C++. Since the build environments and RS232 communication are different under UNIX and Windows, there are separate source as well as executable packages for these environments. All devserv packages include documentation (a README with further detail for building or executing devserv under the specific platform and a user manual). In addition, devserv requires a text file that specifies the hardware configuration. This file is also included in each package.

Environment:

To run devserv:

  1. Install the binary in any directory.

  2. Install the configuration file in your home directory and edit the file to reflect your device connections. You may also make entries to override the default network addresses and ports, and to specify video or host information. This file treats as a comment any line beginning with "#". Under UNIX, this file is .devserv.config. Under Windows, this file is devconfig.

    Devserv reads this file at startup to learn about the devices it should support. So if you change the hardware configuration, you MUST edit the device entries in this file.

    Entries for devices are stored in the following format:

    device make  model  device_no.   type  unit_no.   serial_port   lens_type
    ******** NOTE ***************************
    The device number given by is used for internal device addressing. The addresses should be numbered 1, 2, 3, etc., in order from the closest to the computer to the farthest away. For the Sony EVI-D30, this number is NOT the camera number on the back of the camera unit. The camera numbers 1, 2, and 3 on the back of the Sony EVI-D30 are for use with the hand-held remote commander unit. It is INDEPENDENT OF unit_no.. **********************************************

    The type and unit_no. are used by the client to make requests to move the device and unit_no. is assigned by the devserv user. It is independent of the device_no. which is used only to indicate order of distance from the port to which it is connected.

    The serial_port specifies the serial port to which the device is connected. For UNIX, serial_port gives the full pathname for the serial port. For SUN workstations, use /dev/ttya and /dev/ttyb, for ports A and B, respectively. On a PC running freeBSD, use /dev/ttyd0, /dev/ttyd1, etc. for serial ports COM1, COM2, etc., respectively. For Linux, use /dev/ttyS0, /dev/ttyS1, etc. for serial ports COM1, COM2, etc. For Irix, use /dev/ttydx or /dev/ttymx, where x = 1,2, etc. For Windows, just specify COM1, COM2, etc.

    lens_type gives the type of lens for a camera. If left blank, the default is used, which is a standard lens. If the camera is using a wide-angle lens, specify "w" or "W".

    Here are sample entries for UNIX:

    device Canon VC-C3 1 camera 1 /dev/ttyb w
    device Sony EVI-D30 1 camera 2 /dev/ttya
    device Sony EVI-D30 2 camera 3 /dev/ttya
    These entries indicate that two Sony EVI-D30 cameras are connected to port A and a Canon VC-C3 camera is connected to port B on a Sun workstation. The Sonys are chained.

    The client will refer to the Sony cameras as "camera 2" and "camera 3", while devserv will use the device numbers 1 and 2 for internal addressing. The client will refer to the Canon as "camera 1". The Canon is is the first and only device attached to Port B, so it is given a device number of 1.

    On Windows 95/98/NT, these entries would be:

    device Canon VC-C3 1 camera 1 COM2 w
    device Sony EVI-D30 1 camera 2 COM1
    device Sony EVI-D30 2 camera 3 COM1

    NOTE: You may use "cam" or "vid" for "camera" and "videoswitch", respectively in the type field.

  3. On UNIX, run devserv from the command line. On Windows, run from either the DOS shell command line or click on the devserv.exe icon.

  4. Devserv supports the following command line options: [-d debug_level] [-s N (or 'n')] [-m S] [-t ttl] [-v video_address/video_port/video_ttl] [-h video_host] [-f file] [--version] [--help]

    If the "-d" option is used, the terminal will display output for the category indicated by the given integer. Specify debug_level 0 if you do not want anything displayed; specify 1 if you want only high-level information (e.g., initialization and termination status and error messages, if any); specify 2 if you want to display network events; specify 3 if you want to display communication between devserv and the devices; specify 4 if you want everything displayed. (1 is the default debug_level.)

    If the "-s" option is used, "N" or "n" means do NOT turn off the power upon termination.

    If you specify "-m S", you will run in simulated mode, which means that actual RS232 communication is turned off although devserv behaves as though it were on. This feature may be useful in developing/testing other features or applications.

    If the "-t" option is used, the integer specified for ttl overrides the default time-to-live for multicast status messages. (1 is the default time-to-live.)

    If the -v option is used, the given string (delimited by "/") specifies the address, port, and time-to-live used by the video tool for media transmission. This is included in description messages. The default is 0.0.0.0/0/0.

    If the -h option is used, the video_host is the computer that is the source of the camera feed. The default is the local host. This information is included in description messages.

    If the -f option is used, the file specified is the name of the configuration file in $HOME that should be used instead of the default filename.

    Specifying "--version" displays the version number and terminates.

    Specifying "--help" displays the command line synopsis and terminates.

  5. Make sure that the main power switches are on "ON" for all devices and that, if you are using the Canon VC-C3, both the main power switch (on the CCU) and the power switches for the pan/tilter and camera control units are on (the three LEDs should be green). The Sony EVI-D30 and the Panasonic WJ-MX50 have auxiliary power switches (in the front of the device) that can be controlled by the computer. The Canon VC-C1 lets a computer control its power, if the main power is manually turned on. Thus, devserv sends "power on" and "power off" commands to the Sony EVI-D30, Canon VC-C1, and Panasonic WJ-MX50.

    However, the Canon does not allow the power to be controlled by a computer so this must be done manually.

  6. See Devserv: Description and Operation for more information.
BUGS: Under Windows 2000: If devserv does not receive a request for a period of time, it is necessary to press the carriage return to activate it. We suspect this is a problem with the threading under Windows2K and plan to investigate this fairly soon.

To do: