My digital countryside

EN Emuārs par darbiem, nedarbiem u.c. lietām, kuras gribas publiski pierakstīt.
lv en

VirtualBox and USB to Serial on Linux Ubuntu 18.04

Sometimes we need to get to use some old rig and for that we need quite old software. Somotimes also recent chine radio config software is quite exotic and better runs on older windoze, like WinXP.

It seems for me useles to keep dedicated PC for that - it takes some place and care. It could be solved with dual boot approach to keep them on the same Linux Ubuntu hardware, but then it is not possible to work at the same time in both systems. Then there is Wine (windowz environment emulator) - that works but there is enough cases when not. And I have failed yet to pair Wine with USB to serial converter.

So the virtual machine seems for me the best solution and that also works with USB to Serial converters.

In my case I am using Linux Ubuntu 18.04 with VirtualBox virtual machine.

But there is some tips & tricks to get it work:

Ja šamā nav tad uzinstalējam:

1) I we have not yet, than let’s install VirtualBox by typing in terminal window:

sudo apt install virtualbox

2) In this step we can install our legal WinXP copy by using install CD .img file, or setting CD drive. How to do that ask Duck. But it is possible also to do it later.

3) To use USB devices, than we also need VirtualBox Extension Pack:

sudo apt install virtualbox-ext-pack

4) If we like to access through VirtualBox our USB devices, than we need also to bellong to vboxusers group:

sudo usermod -a -G vboxusers $USER

5) Now let’s connect USB to Serial converter and check if system recognizes them by using terminal command:

lssub

If our USB device list is loong, than we can use command abowe before and after connecting of USB to serial converter and compare outputs. We should see something like that:

usermy@usermy-desktop:~$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 413c:2111 Dell Computer Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 004: ID 0d8c:0014 C-Media Electronics, Inc. 
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 002: ID 03f0:a407 Hewlett-Packard 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The line we need is this:

Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

6) In VirtualBox Manager open USB settings of our virtual machine (Settings->USB) and make sure that we have checkbox on Enable USB Controller and radio button USB 2.0 (EHCI) Controller.

VirtualBox USB settings

7) Here we also add USB Device filter under USB Device Filters by using one of one of buttons on the rigt side. The name we can choose, but Vendor ID and Product ID we need to fill with values from step 5. I.e. these two strings after ID that is separated by collon an in this example they are 067b un 2303. Other filter form fields could be left intact / empty.

USB filter settings

8) Now when running WinXP virtual mcahine and adding USB2Serial converter, there will be standart WinXP notification about new USB device and that it needs to install driver. So now we choose the the way windows get the driver and install it. Finaly we can open Windows Device Manager and check if we can see which COM port is used and proceed with f.ex. radio programming software installation and radio configurations.