RDP serial port mapping

Roman Miklautz

First make sure that you've enabled port redirection in the Remote Desktop Connection client:

  1. In the Remote Desktop Connection window, click Options.
  2. On the Local Resources tab, under Local devices, make sure that "Ports" is checked !
  3. Click Connect and now inside your RDP connection all your local serial ports will be available via the same  port name (COM1, COM2, ...).


Let's assume your client-workstation has two built-in serial ports COM1, COM2 and you've also attached an USB-to-SERIAL converter which shows up as COM5 in the device manager.

Now if you launch a remote desktop session from that workstation to the Thinstuff XP/VS Terminal Server any communication within the remote desktop session with COM1, COM2 and COM5 will be redirected to your client-workstation's local (physical) COM1, COM2 and COM5 port.

In other words: Inside the remote desktop session you will get "virtual serial ports" that have the same name as your client-workstation's physical ports.

Important note:

If you have to communicate with the server's own physical serial port from within a remote desktop session you should change the numbers of the server's physical com ports to a higher value in the server's device manager (e.g. from com1 to com11 and com2 to com12).

In this way if you open com1 from within a rdp session your client-workstation's com1 will be opened and if you open com11 within the same rdp session the server's com1 will be accessed instead.


Known limitation for connections TO Windows XP:

If your XP/VS Terminal Server is running on Windows XP then only one user can open a redirected port with the same name at a time. Example: If User1 and User2 are connected to Windows XP and both users have redirected their ports then User2 won't be able to open his redirected COM1 while User1 is accessing his COM1 in the other rdp session. As soon as User1 closes the application which is using COM1, User2 will be able to open his port again. For small installations a simple workaround is to change the client's com port numbers in order to avoid conflicts. (This limitation only applies to rdp sessions TO Windows XP.)

Tags: local resources, map com in rdp, redirect hardware, serial port mapping