Using Java(tm) Communications API on Sun Ray Appliances

Version 2.0.3

License

Accessing the Sun Ray Appliance's USB Ports


Please review the Sun Ray server software documentation for accessing the Sun Ray appliance USB serial and parallel adapters.


Portmapping: Associating Server-side Ports to Sun Ray Appliances

The Java Communications API allows Sun Ray appliances to access Sun Ray server-side communication ports with the portmapping feature. Under normal conditions, the server-side serial and parallel ports are not accessible from the server's Sun Ray appliances. However, with portmapping, specific server-side ports can be associated with specific Sun Ray appliances. In this scenario, the Sun Ray appliance can access those ports that are associated with it.

The portmapping feature also sets up logical port names for physical port names, for example, com1 could be made the logical name for /dev/cua/a.  Even '/dev/cua/a' could be made the logical name for the physical device /dev/cua/a, because, to access a serial port via its physical name on the SunRay platform, it is necessary to facilitate it using a logical name; there is no alternative.

Configuring Portmapping

Portmapping is configured in the portmap.properties file. portmap.properties must reside in the same directory as the comm.jar, that comes with the Java Communications API package.

Each entry in the file lists the Sun Ray appliance terminal ID and its associated communications ports' physical and logical names. Each entry is composed of a single line of the form:

Sun Ray Terminal ID     Physical Name,Logical Name      [Physical Name,Logical Name]*
A '#' indicates the beginning of a comment; characters up to the end of the line are not interpreted by routines that search this file.

An example file:

# FILE : portmap.properties.
#
# This file is in the format:
#
# <SunRay ID>  physical-port,logical-port [physical-port,logical-port...]
#
# Example:
#
# IEEE802.080020ac3fa5  /dev/term/a,com1  /dev/term/c,com2
# IEEE802.080020ac3fa5  /dev/term/b,com1  /dev/term/e,com2
# IEEE802.080020bef0a2  /dev/term/a,barcodeReader   /dev/terrm/b,/dev/term/b
Determining the Sun Ray Appliance Terminal ID
  • To determine the Sun Ray appliance terminal ID:
      1. Press the three audio option keys to the left of the moon key in the upper right corner of the Sun Ray appliance keyboard.

      2.  
      3. The six character alphanumeric values displayed within the connection icon represent the unique part of the MAC address.

      4.  
      5. Type the following command at the shell-prompt (note that back-quotes are used, not regular apostrophies):
           % basename `ls -d /tmp/SUNWut/units/*<truncated MAC address>`

             As a result of executing this command, the full SunRay ID will be displayed
                    (which can be used in the portmapping file).

             Example:
         

            basename `ls -d /tmp/SUNWut/units/*81524`
           IEEE802.080020a81524

    Copyright © 1997-1998 Sun Microsystems, Inc.

    All Rights Reserved.