Page 2 of 2

Re: Connect virtual serial port to physical serial port

Posted: 28. Apr 2016, 18:01
by stagnette
Yes, that's it. I can wait for Don as well.

But if there is another way to install Windows, using virtualisation or not, I'm in!

Re: Connect virtual serial port to physical serial port

Posted: 28. Apr 2016, 19:30
by mpack
Configuring a serial port in the guest should be quite straightforward. You enable it in the VM settings, the main thing you need to provide is the name of the host port (e.g. "/dev/tty0" or whatever your Linux distro calls it).

Beyond that, I'm unsure of what your question is. I assume you have some kind of USB-RS232 adapter and want to use it to talk to the device. Unfortunately RS232 is 1960s tech and very far from plug and play. You kind of need to know how to use it. What year does the device come from? How about a photo of the connector it has on it, and do you still have the user manual for the device?

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 15:06
by stagnette
The thing is that I don't have a clue about how to know the name of the host port, and what "port mode" I have to choose.
Here is a photo of the port (https://framadrive.org/index.php/s/X8uuvCgrqt9V2qS) I want to connect to the computer (via the proper cable). I think the device dates back to the 1990s. I do have the user manual but they are in French so I don't think it could help you helping me. It only says that I have to use COM1 and PORT A.

Documentation:
User manual: https://framadrive.org/index.php/s/UJPuzV1joZfXnQW
Serial Port: https://framadrive.org/index.php/s/TKufkBaYGxkkXOQ

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 15:35
by mpack
stagnette wrote:The thing is that I don't have a clue about how to know the name of the host port, and what "port mode" I have to choose.
I can't tell you how to find out what ports are available on your host - I don't use Linux hosts. Frankly, tuition on how to operate your host OS is beyond my remit. I can show you how I do it on my XP host, which is that I open the device manager, find the "Ports" branch, and note the name of any available serial ports.
Image1.png
Image1.png (41.25 KiB) Viewed 2516 times
Looking at your photograph, I see two 9 pin male D connectors. That's a bad sign, as normally the PC (DTE) end has a male connector, the other (DCE) end has a female connector, and you would use a "straight through" cable to connect the two ends (pin 1 to pin 1, pin 2 to pin 2 etc). Looking at the port description from the user manual it looks like the device is wired as a DCE but only has the wrong gender connector. Hence you'll need a straight though 9 pin cable and a "gender bender" for the device end of the cable.

In the VM settings the "Port Mode" should be "Host Device", and the "Path/Address" should be set to the name of whatever host serial port you want the VM to use, e.g. "/dev/ttyS0". Tick the enable checkbox then leave all the other settings alone. The port will be seen as "COM1" inside a Windows guest OS.

DTE = Data Terminal Equipment. In the 1960s this was a terminal or teletype, but these days its the PC.
DCE = Data Communications Equipment - a modem or other device that the terminal communicates through or with.

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 16:37
by stagnette
The path seems to be /dev/ttyS0 but Virtualbox reacts as if I didn't have the permissions needed... (https://framadrive.org/index.php/s/iK2AADnrwZvnQq9)

Concerning the cable, I already have the right one!

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 16:50
by Perryg
As the warning shows you must have the group added to your user to be able to use it. IIRC that would be the dialout group.

Code: Select all

usermod -aG dialout <USER_NAME>
But look it up to be sure.

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 17:00
by stagnette
It returns "Permission denied"...

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 17:02
by Perryg
Permissions do not change until you log out or reboot.

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 17:12
by stagnette
I know, and I already did it (after writing "sudo usermod -a -G vboxusers manivelles"). But maybe there is something else to do? (I'm quite a novice)

Re: Connect virtual serial port to physical serial port

Posted: 3. May 2016, 17:20
by Perryg
Well this error is host based and you should travel to the forum of the host OS to get this part sorted out. Like I said I don't have/use serial ports these days and the dialout group may not be the only one you need. Perhaps the tty group as well but not sure. Once you resolve the permissions it should work as far as I remember. But don't just add groups willy-nilly. It can cause security issues and it would be better to do it right the first time.