Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 pairs of serial devices (a scale and a POS pin pad) hooked up to 2 pcs (4 serial devices in total) with windows xp embedded sp3 (x86) running RDC/rdp 6.0. I am using those machines to RDP into virtual machines running Windows 7 enterprise (x64) where my point of sale software is installed. I need to redirect the local PC's com ports (com1 and com2) over to the virtual machine. I configured the rdp file to send the com ports and it does as I can see the ports if I add a printer (they show up as ts033 and ts034) but the software I am using requires it be called com1 - com10. I have tried to use "net use com3:\device\com1, net use com3:\tsclient\ts033" and a few other combos on my VM to redirect the ts com port to a "real/virtual" one.

I don't have the money to spend on purchasing a serial server (new or used) or purchase the amount of licenses/seats for 3rd party software. Even the cheapest solution from ebay to purchase 4 new serial servers comes out to about $100 plus you have to use 4 wall warts and it involves extra cabling.

My only other option is to get 8 db9 to rj-45 adapters and send this over 4 existing cat5e lines and physically attach them to the vm server. I'd rather avoid having to do this as again it requires running extra cables from the POS terminal/pc as well as running cables from the patch panel to the VM server. I would much rather use the net use method if you could tell me how or some other free/opensource software that is out there.

Let me know if you need any other information or if something is unclear.

share|improve this question
    
I forgot to mention I also installed Microsoft Point of Service 1.12 SDK on the VMs. –  Mitchell Skurnik May 28 '12 at 6:42
1  
Somehow after entering "change port com1=com1:2\tsclient\com1" it tossed an error but now after rebooting both machines I see "COM1 = \Device\RdpDrPort\;COM1:2\tsclient\COM1" with "change port /query". I don't have access to the equipment right now but I will test to see if it is indeed working in the morning. –  Mitchell Skurnik May 29 '12 at 1:44
add comment

1 Answer

up vote 1 down vote accepted

So after searching a bit more I came across a rather random domain name that had the answer. Over at http://www.GoodJobSucking.com/?p=214 (yes I too was hesitant to click on that link) the blog post describes how to use com0com (which is an open source application) to transmit a com port from one computer to another using a TCP connection.

I only found this out after I pinned and wired a set of db9 to rj45 cables and attached it directly to my server. The server was able to see the data from the scale but Hyper-V apparently does not provide physical access to the com ports on the server. I have no idea why but after doing some digging and finally searching for "hyperv named pipe com port" on Bing, the 3rd link was what I was looking for.

Here are the steps that I took:

Host Computer / Old computer (x86)

  • I downloaded hub2com from http://sf.net/projects/com0com/files/ and extracted it to C:\ComPorts\
  • I then launched command prompt and ran com2tcp-rfc2217 com1 1000 (I will end up doing the same for com2 and make that use 2000)
  • That will launch a debug session. You can choose to keep this active or run a posh or vbs script that runs this in the background but I like having it visible to ensure that data is transferring.
  • I am now ready to transmit data to my virtual machine

Virtual Machine (x64)

  • I downloaded com0com from http://sf.net/projects/com0com/files/ and installed it on the machine
  • When the install was complete I check the "launch setup" box and hit next.
  • In the command prompt window I then typed "install EmuBR=yes EmuBR=yes" hit enter then typed "change CNCA0 PortName=COM1" and hit enter. This is now setup so I closed the window.
  • The next step is downloading the x64 compiled version of hub2com found in the blog post linked above and extracting that again to C:\ComPorts.
  • I then launched command prompt again and entered "com2tcp-rfc2217 \.\CNCB0 RemoteHostName 1000" (replacing RemoteHostName with the hostname of my old machine) and hit enter.
  • Again this launched a debug session and let me see the data flowing in.

At this point I attached my Point of Sale scale (a CAS PD-II) to the host's com1 serial port and placed something on the scale. Instantly I see data flowing in via the command prompt window and the POS software saw the weight.

I really hope that this saves someone weeks of trying to get this to work like I did.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.