Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

[solved] Making RS232 communication work with virtual machine (older equipment)

Status
Not open for further replies.

Grossel

Well-Known Member
Hi

On my work, they have some older equipment (around 20 years old by now) that is now time to do a certain change in settings in order to it prepare to a future rearrangement. Sorry I cannot got in more detail.

For an operator to being properly able to change settings, get logs etc, one have to use the manufacturer software. The software versions available today can communicate with the equipment properly (so I know the cable are ok and the equipment do communicate properly), but some important functions are incompatible with the new software and just doesn't work.

So after I had a conversation with the manufacturer, it was clear that I had to use an older version of the software, one that doesn't run on OS newer than windows XP. So I got to install Virtualbox and then Windows XP virtually. After that I installed the manufacturer software on that virtual pc.
However, when I connected the computer with the virtual OS to the eqipment, the software began to communicate (virtual com port in windows XP are linked to the com port of the host computer) for a while, it's progress bar more or less confirm communication are established with the equipment, but then it suddenly fails.

When I spoke with the manufacturer about the issue (while sitting in front of tha laptop trying to communicate) I was told that I did everyting correct for the communication (setting up com ports and that) and he claim that maybe another virtual software would work better - pointing to Wmware. So I probably have to get the company get a license for that.


The question I want to ask in this regard: Do you have experienced that Virtualbox have issues with the com port, and that shifting to another virtual software have resolved that issue ?
 
Use a proper old computer running a proper version of XP - my son-in-law is a technician at a University, and his department is on a continuous hunt for working XP machines, in order to keep old (multi-million Euro) machines running.

A virtual machine doesn't work, and virtual hardware probably doesn't either - for example, modern machines are unlikely to have a proper hardware serial ports or parallel ports, and it's unlikely you can fit ones at the proper addresses either.
 
Think I may have to acquire that Win95 machine in the workshop in school as it's probably going to be worth more than those diamond necklaces on Antiques roadshow.:joyful:

Mike.
 
Think I may have to acquire that Win95 machine in the workshop in school as it's probably going to be worth more than those diamond necklaces on Antiques roadshow.:joyful:

Mike.

Well if you've got a perfectly good NMR machine (or other expensive devices) you can't afford to buy a new one just because it's control computer dies :D
 
A virtual machine doesn't work, and virtual hardware probably doesn't either - for example, modern machines are unlikely to have a proper hardware serial ports or parallel ports, and it's unlikely you can fit ones at the proper addresses either.
Well, this laptop was bought because that particular model actually have a working serial port. As I mentioned in my first post, a modern version of the software package are indeed fully capable to communicate with the device, but are not fully compatible (i.e. the physical interface does work ok).
 
Well, this laptop was bought because that particular model actually have a working serial port. As I mentioned in my first post, a modern version of the software package are indeed fully capable to communicate with the device, but are not fully compatible (i.e. the physical interface does work ok).

That has nothing to do with it, partial working isn't 'working' - what's the actual physical (not virtual) address of the serial port, and does it use the same chip and circuit as an XP motherboard does. If the issue was simply 'requires a serial port', then any PC would be fine, including adding a USB/Serial converter - I suspect it's a LOT more difficult than that, and it's using the port in a non-standard way.

This was why WinPicProg never supported serial port programmers (like the JDM), as they relied on the port been completely 'standard' yet achieving (or exceeding) the maximum voltage ratings of RS232.
 
I worked with CNC machines from the 80's onwards that used RS232 communication, in later PC's that did not have RS232 connector, a connector was usually included on the MB so a port could in fact be implemented..
One common issue was handshake and most machines used software handshake code so the RS232 cable could often be reduced to just 3 conductors,
i.e. H.S. lines eliminated and jumpered out.
I am sure you can still get RS232 software source somewhere that will run on a later O.S.
 
So, you have to use older software that runs on XP due to lack of the feature in newer versions?

Your using virtual COM port technology.

My experience if the instrument used a DB25, they knew what they were doing,

With DE-9 anything is possible. The DB-9 doesn't exist
I had DTR and DSR and CTS and RTS totally messed up and not swapped correctly.
Some systems used DTR and DSR for flow control.
A breakout box helps
A DTE/DCE reverser sometimes does less than a null modem cable.

I forgot about DCD - answer the phone.

RJ45 adds another layer of messes, Some people call it 8 pin RJ45, others a 10pin RJ45. Ethernet cables are really 10P8C modular connectors, but that's not what sells.

So there are both 8 and 10 pin modular connectors used for RS232. The 10p10c should be called RJ50. There is a cisco pinout and who knows what else.

I just found connectors with screw terminals, so for a modular pinout I needed to a DE-9 female I needed at home recently, I used a cut Ethernet cable the DE-9 screw terminal and wire ferrules. The terminal DE-9 is not quite centered, so it could cause problems.

There are two types of flow control:
^S, ^Q and ^S, resume any character

reducing the baud rate generally removes the need for any type of flow control.
The wrong characters is usually a baud rate problem.

I'm "just starting" to get into serial servers. I need a few for a home project,

I currently have these serial servers at home.

IOLAN SDS, STS and SCS Serial Terminal Server
1U Rackmount Console Servers
**broken link removed**

Moxa Nport 5410; Have revision 3.3, DC power
http://www.moxa.com/en/support/search?psid=50361

Avantek EKI-1524-BE 4-port Rs-232, 422 and 485, dual ethernet, dual power supply,DC power

The IOLAN STS is broken. No Ethernet blinking lights.
The IOLAN SCS - can't access config page. It has two defaults. Factory and user. It depends on how long you hold reset, The device pinouts are different. Console config is the same.

I think the MOXA powers up, Comprehensively, MOXA handles everyone including the Rasberyy PI. The brand seems like a good choice.

The IOLAN seems to have every option imaginable and even has a SDK.

There are a couple of technologies that require you to recompile the linux kernel to add better behaved ports.
The terms real port, true port and virtual com port are terms thrown around.

There is an RFC???? something or other that uses tcp/IP ports for data and a telnet port for control. So, it can implement hardware flow control via a telnet port. The device can also tell the computer what baud rate it can use.

Real port and tru port essentially make hardware flow control work very quickly,

You can have hardware and software control at the same time.

You can monitor the port.

The bigger issue I found was the use of +-5V levels for RS232. For a short distance, that works fine. RS422 or RS485 is better suited for longer distances. RS232 needs at least +-12. Remember it was spec'ed to +-25V.

I had a major piece of grief with a MacIntosh where yoou muck with the pin-out of the RS422 and make it RS232. It's not true RS422, so I had to use a level shifter.

I had grief with a modified controller for an X-ray diffraction unit It would blow drivers. manufacturer said replace them, they are socketed. I put a $100.00 isolator on it and had no problems.

Then there was the Mac iBook that kept hanging up when you sent an email containing ATH$ over a PPP connection.

And graduate student that just fininshed a "network terminal handler" for his thesis before the IBM PC. He asked me to try out the terminal handler, so I did. I thought about a condition that would have to be an exception and went over to a logged out terminal and typed those 3 characters in the correct order, The system crashed.

You can always tap the serial port. I suspect you may need hardware flow control and something isn't wired right.for that to happen. You could also have both hardware and software flow enabled at the same time.

Even though the serial port is supposed to work a specific way the manufacturer may have messed up.

Look under resources:


lastly, a rasberry PI might make a cheap serial server or a single verual com too serial port.

Sluggish hardware flow or incorrect hardware flow is where I might look. A breakout can help there.

DTR and DSR are supposed to indicate the device has power or is available.
RTS/CTS is hardware flow control or "answer the phone"
RI is the phone is ringing.

Tx gets connected to Rx

Devices are supposed to be:

DTE or Data Terminal Equipment (Terminal)
DCE or Data Communications Equipment (modem)

You have ground and protective ground. These can sometimes cause hassles.

There should be a length table with respect to speed.

The first thing I would check is voltage levels and what the specifications are.
Lower the baud rate and see if your problems go away.
Look at cable length and quality.
Know how the connectors are pinned.
Know how they are supposed to be pinned.

What I want to do is to use virtual COM port technology with a Rasberry PI and hopefully LabView Communtity Edition with Web and NXG features.

I "grew up" in the RS232 ERA starting in about 1975 with the Bel 103 modems and a minicomputer.
 
Last edited:
I found this: https://www.serial-com-port.com
as well:
Serial communication in virtual environment
Virtualization typically does not allow working with ports of the host machine. With the help of the software though you can share RS232 to Ethernet and you can use them in the virtual environment. You may share COM port to Ethernet and use interfaces for serial communication in virtual machine without any problems.

This https://www.serial-com-port.com/articles/com-port-in-virtual-machine.html is confusing.
 
After that I installed the manufacturer software on that virtual pc.
However, when I connected the computer with the virtual OS to the eqipment, the software began to communicate (virtual com port in windows XP are linked to the com port of the host computer) for a while, it's progress bar more or less confirm communication are established with the equipment, but then it suddenly fails.


You might need an intermediary machine. Like a serial server.

What are the communications parameters?
 
The question I want to ask in this regard: Do you have experienced that Virtualbox have issues with the com port, and that shifting to another virtual software have resolved that issue ?
When I last swapped my notebook PC, from a Panasonic CF-30 to CF-31, needed for the larger RAM capacity, I found it did not support XP - which is also essential for some machine tool / PLC programming software.

For that, I installed Centos linux on another drive and then XP using the included virtualbox setup. That appears to work fine.

The CF series Toughbooks have physical RS232 ports included, so it's not having to work through a USB layer as well.

Just getting a cheap CF-30 off ebay would be a simple way around any problems, if you don't need a high definition display - which anything from XP era likely does not anyway.

The CF-30 Mk5 I had could run anything from Dos & Win 3.11 [using bootit bare metal for a bootloader, to get around the SATA drive] up to Win 10. The hard drive or SSD in these is in a swappable caddy to the system can be changed in seconds.

(There are just no XP type drivers for the later Intel chipset in the CF-31, unfortunately. Someone has created one for the SATA side of the new chipset, but not for USB - I could get it to boot, after a lot of effort, but no keyboard or mouse/trackpad functionality so no use.)
 
Ok, thanks for the tip.

However, reading about this software I get the impression is that the intended function is to have a sort of remote serial port, and accessing this over ethernet.

If this is going to work, then the host OS and guest OS have to be able to see each other over the network. And the host OS must be able to act as a kind of a server for the rs232 port.
 
One problem is, I don't know if the machine you have to connect to is a Windoze something or are we talikging some sort of embedded thing with an RS232 port?

I can;t visualiize what you have except a virtual XP and a virtual environment.

Where do the physical ports come into play or is it virtual to virtual?

The host OS?

I;d like to know what is the communication parameters e.g.
9600
8N1
No parity
hardware flow control using RTS/CTS

i think it's all important.

The host OS probably doesn't have a physical RS232 port unless provided by USB?

I've been doing some more research for me.

You have some sort of real port technology or RFC2217. The real port technology is the closest to the real thing. RFC2217 is close, but may not be fast enough

I want to know communications parameters.
if the machine your connected to is a Windows something or an embedded something with a serial port?
Can you change the baud rate?
What kind of flow control?
Any USB to serial ports?

or me, so far I managed to connect to the EKI-1524. Next step is to place it on the network and put a loopback connecor on it.

Draw a diagram of the serial connections.

Can't help unless you provide info?

I fixed all sorts of stuff because I knew what questions to ask. An Auger/SIMS, I knew nothing about, but i fixed it asking the right questions. The operator was my hands. I controlled his hands. he was also the safety system.

Did I know how to operate the controls? No

I maintained a Scanning Electron Microscope, ISI Alpha 9, to the component level. We did eventually get one under a maintenence contractand therefore I really want needed. It also had a real EDAX unit. The other one did too, but you had to do everything the hard way. There was another SEM JEOL T-200 I worked on too.

I had no training - I just fixed the things. I added EBIC (Electron Beam Induced Current) to the T-200 because it was possible. I designedthe sample holder and a faraday cup to measure the beam current. I could operate a Phillips SEM, the Alpha-9 and the T-200; i just never got trained on the Amray. The Alpha-9 had an EDAX detector (Energy Dispersive Analysis of X-rays) and it was done the hard way with a muti-channel analyzer.

The Auger/SIMS was an SEM too. Pictures was not what it was designed for. It was designed to do analysis. You could ion mill and look at the material removed. It was the only SEM we had with an ION pump.

it got harder to fix stuff as time went on and I didn't fix everything. One job I engineered everything and I didn't put any of it together.
it was instrumentation for a demand-side management study that got published although I wasn;t an author. I just got special tanks along with the person that built it. It was pre-ethernet and the house was remote.

The solar inverter was there for show and didn't work. I found out what was wrong. The array parameters were such that the inverter would start, but shutdown because the array wasn't sized right. "they" reconfigured the arrays and it worked. I was underimmense pressure and other managers wanted my time.

We had what was called Matrix-management where I had a supervisor that was in charge of me as a resource, so my time was alloted to other managers who had control of my time for their projects. Really cool management style.
 
Hi folks.

I have an update for this as I was able to get a working solution.

The solution is : Because of random luck I found a USB-RS232 adapter laying around. I was also able to get the driver for this device for Windows XP.

The nice thing about VirtualBox (and probably most other virtualization software) is that the software can be set up to take control over any single usb device that is plugget into the host machine. This also include this RS232 adapter.

This was the solution for me, Windows XP (guest OS) was indeed fully able to detect the USB-RS232 adapter just as if it was a real piece of hardware directly connected, and I was able to install the driver files.
In the end I was able to get the software on the XP virtual computer to talk to the equipment and the work was done.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top