Title: Redirecting input beween (virtual) comports and virtual machine. Post by: Flaps on January 05, 2022, 02:05:59 PM Hi Group
I've previously had a working solution to my problem but unfortunately my setup was deleted and I cannot for the life of me remember how it was done let alone fix i now. I received expert and extensive help from the official aggsoft support who made it work. Anyway, - I need to communicate with a balance by means of a software which runs in a winXP virtual machine (VM). My balance is connected to a serial port (Currently COM4) well - a usb port emulating a serial port) under Win10 and this serial port is linked to "COM1" in the VM. Using Termite (under the virtual machine) I can send balance commands and receive responses - no problem here. However, I need to format the data response from the balance before it is passed back to my program. In order to do that I've tried to set up virtual ports (COM2 and COM5), so that COM2 is linked to "COM1" of the virtual machine and COM2. COM2 is set to redirect whatever it receives (the balance command) to COM4. COM4 is set up to parse the balance response and redirect the output back to COM2. However, I can see that the command sent via VM COM1 to COM2 actually arrives on COM2 and that it is also redirected from here to COM4. However, for some reason the balance does not respond to the command (return a value) in this setup. If I link COM4 directly to the VM Com1 the balance responds immediately. As I said I've had this up and running before so I know it's possible - ANY assistance would be greatly appreciated. Title: Re: Redirecting input beween (virtual) comports and virtual machine. Post by: Flaps on January 13, 2022, 06:04:29 PM Solution
Created 2 connected virtual ports : COM3 & COM4. Balance is connected to COM5. My program sends the balance command to COM3 (which is paired with COM4). COM4 redirects "FULL_DATA_PACKET" to COM5 where the balance is connected. COM5 receives a response from the balance, parses it and redirects it back to COM4 (paired with COM3). All serial communication from my virtual machine (the old WinXP in Oracle Virtual Box) happens via linking COM1 on the VM to COM3 on the Win10/win7 boxes. I had a lot of help on this - hope it might help someone else. |