7

I'm having trouble for a few weeks now trying to access the serial port of my computer when working on the guest OS Windows XP Pro via VirtualBox. The host OS is Ubuntu 10.04 LTS and I'm using VirtualBox 5.0.18. In its settings, I've set up the serial port as on this screenshot:

enter image description here

...but then I can't run the virtual machine:

enter image description here

I've already asked the VirtualBox forum but they replied it was more a Ubuntu problem than a VB one, so I'm asking for help here!

The thing I'm trying to do is to back up an old device (from the early 2000s or late 1990s), which back-up software can only be opened on Windows. I've managed to install and open it on my XP guest OS, but it cannot communicate with the peripheral device.

Excuse me if I'm not always intelligible, I'm not used to run Ubuntu and I'm French, so my English may not be perfect!

Thanks in advance though :)

Lucas

6

Your user is not in the group that has access the serial port. You can either run Virtualbox as root (Not recommended ), or add your user to the group.

sudo usermod -a -G dialout <username>

You might have to logout and login again to make this work.

Cheers

10
  • Thanks! Done. Now the virtual machine works but the peripheral device is still not recognised...
    – Lucas
    May 24 '16 at 15:23
  • I take it you've installed the Virtualbox guest additions?
    – Bram Koert
    May 24 '16 at 15:27
  • Yes I did just after intalling VirtualBox...
    – Lucas
    May 24 '16 at 15:32
  • Okay. So just for clarification: Windows XP has the Guest Additions, you have enabled the serial port but XP still doesn't see a virtual type 16450 serial port? Or has it detected it, but isn't connecting with the old device?
    – Bram Koert
    May 24 '16 at 15:45
  • Now, Windows is unable to run (blue screen and automatic reboot, I can't do anything). I don't know why...
    – Lucas
    May 24 '16 at 15:46
3

First check the actual permissions on your host system. Something like:

~ ls -l /dev/ttyS0

Mine is:

crw-rw---- 1 root dialout 4, 64 2016-05-24 07:34:52 /dev/ttyS0

This means thay either I need to be root (first 'rw-' from left) or I need to be in the dialout group (second 'rw-' from left). Try from command line a check with command id like:

~ id uid=1000(enzo) gid=1000(enzo) groups=1000(enzo),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),127(sambashare)

In this case I cannot access that serial port. So I can add myself to dialout group:

~ sudo usermod -a -G dialout enzo where enzo is your very userid as shown above by command id Then you need to logout and log back in in orderto have this change effective.

1
  • ls -l /dev/ttyS0 returns crw-rw---- 1 root dialout 4, 64 mai 24 16:59 /dev/ttyS0 id returns uid=1000(manivelles) gid=1000(manivelles) groupes=1000(manivelles),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),125(vboxusers)
    – Lucas
    May 24 '16 at 15:30
1

I use a USB adapter im my Dell Inspiron.

$ lsusb | grep Serial

Bus 001 Device 012: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
$ dmesg | grep pl2303

[13131.366817] usbcore: registered new interface driver pl2303

[13131.366830] usbserial: USB Serial support registered for pl2303

[13131.366847] pl2303 1-2:1.0: pl2303 converter detected

[13131.367526] usb 1-2: pl2303 converter now attached to ttyUSB0

So I changed /dev/ttyS0 to /dev/ttyUSB0 and it works like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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