Sun Ray Serial Port Mapping

Mapping the serial or com ports from a Sun Ray to a Windows Session using the Sun Ray Connector for Windows doesn't have to be confusing.  Here's a handy little "how to".

First we need to determine what ports we want to map.

On a Sun Ray 2 or 2FS there is one serial port.  On a Sun Ray 170 and 270 there are two ports.  We need to know the path in order to provide it to the Sun Ray Windows Connector.

For Sun Ray 2 or 2FS the serial port is:


For Sun Ray 170 and 270 the serial ports are:



Now we need to pass those ports to the Sun Ray Windows Connector:

/opt/SUNWuttsc/bin/uttsc -r comport:COM1=$DTDEVROOT/unit/dev/term/a Windows_Server

Now what will that look like from your windows session?

Open up a command prompt and type change port /query.  You will see

Note the mapping for COM1.  That means it's going through the Sun Ray Windows Connector down to your Sun Ray.

But does it work?  Yes.  What you don't have serial device to try it?  No problem.  Telnet ssh to the Sun Ray Server.  If you need a  free ssh client for windows, give PuTTY a shot.  Sign in and then su to root (or an account that has privileges to run truss).  Find the child process for utseriald (it will be the one that does not have a parent PID of 1).  Note that while it's not doing anything you'll see a lot of pollsys' going by.  The more Sun Rays you have with serial ports the more of these you will see.

Now go back to your command prompt that you issued the change port /query command in and type dir > COM1

Watch the ssh session that you are running truss in.  You will see a flurry of activity.

 Make sure you break out of your truss before closing the ssh window.

How do you map two ports?  Easy,  we just need to pass both ports to the Sun Ray Windows Connector:

/opt/SUNWuttsc/bin/uttsc -r comport:COM1=$DTDEVROOT/unit/dev/term/a -r comport:COM2=$DTDEVROOT/unit/dev/term/b Windows_Server

Same other steps from above.  Note the difference now in the change port /query command.

You can do your same truss test as above, just for fun send the directory listing out to COM2.

I can hear it now.  That's all well and good but I don't have Sun Ray 2 series or a Sun Ray 170.  Well in this case you'll need to get a supported USB to Serial Adapter.  Let's repeat (some) of the steps with an Inside Out Networks Edgeport/2.

The serial ports live in the same place, they just don't have as friendly of names.  If you want to cheat and make the names really friendly, check out this handy dandy serial port mapping script.

# ls $DTDEVROOT/unit/dev/term

Now we just need to pass those ports to Windows via the Sun Ray Windows Connector (all on one line of course).

/opt/SUNWuttsc/bin/uttsc -m -A 24 -r
comport:COM1=$DTDEVROOT/unit/dev/term/Inside_Out_Networks.V53072798-0a -r  comport:COM2=$DTDEVROOT/unit/dev/term/Inside_Out_Networks.V53072798-0b

Lather, rinse, repeat on the steps above if you want to see it in action.



Could I then use this to attach a bluetooth keyboard to my SunRay... could this also perhaps overcome the issue of RDP always using the RDP keyboard rather than one locally attached. I've been looking into USB-over-Ethernet hubs using NHCI, however when attaching a HID device, such as a keyboard or mouse, RDP can't be brought to use them.

Sorry if this is semi-rant, it's been a long day :s.


Posted by Alex Green on September 04, 2008 at 08:03 AM PDT #


So this type of forwarding works for Windows running terminal server ... But how exactly would I do this via Sun's VDC connector e.g. virtual Windows XP instances running inside VMware ESX?

Posted by Drazenko Djuricic on September 18, 2008 at 11:12 PM PDT #

I had to copy the change.exe and chgport.exe from a terminal server to the XP VDI image (copy to C:\\WINDOWS\\system32\\ on XP). I also had to ensure that the VDI image had no COM ports pre-mapped (uninstall them if they are as the RDP session will create the mapping). Once this is done you should be able to run the 'change port /query' command and see the com port mapping as shown in the example.

Posted by Rob George on November 20, 2008 at 02:02 AM PST #

Hi ,

I try install esxI (free esx) on dell p2950 ,insert the Vm is :
1. 2 instance solaris 10 as sunray server failover
2. 2 instance windows server 2003 as ad,doamin controler and virtual center another win2k3 as VDM brooker
3. 2 windows xp sp3

so far sunray running well and regarding map com port to xp desktop (manage by VDM) ,here the step :
1. go to /etc/opt/SUNWkio/sessions/uttsc

add this line -r comport:COM1=$DTDEVROOT/unit/
i use only one port for test console sf240
example :


theUTTSCRoot=`/etc/opt/SUNWut/basedir/lib/utprodinfo -r SUNWuttsc`
if [ $? -ne 0 ] ; then
logger -i -p user.error -t $theModule \\
"Error: SUNWuttsc is not correctly installed"
exit 2
theUTTSCExec="$theUTTSCRoot/SUNWuttsc/bin/uttsc -r comport:COM1=$DTDEVROOT/unit/

now every user login use card to sunray terminal the com1 on sunray will automatically map to xp desktop. i test to console 2 sf240 over 2 sunray terminal.



Posted by Nyohadi on December 04, 2008 at 12:15 PM PST #

Thank you for the constructive and affordable information!

Posted by Olga Ritchie on December 07, 2008 at 04:02 PM PST #

How can I do this to map a COM in xp pc on a ESX server using VDA?

Posted by Mauricio Lopez on March 18, 2009 at 06:28 AM PDT #

I was having problems making work a Signature Capture box from NCR via the Serial Port. I finished using rdesktop instead uttsc and then the redirection of the comport worked.
Then I edited the /etc/opt/SUNWkio/session/uttsc/uttsc file so it could invoke the rdesktop instead the uttsc.

Posted by Mauricio Lopez on March 31, 2009 at 07:39 AM PDT #

Post a Comment:
Comments are closed for this entry.

Think Thin is a collection of bloggers that work with Oracle's Virtual Desktop portfolio of products.


« July 2016