The first step is to install the VirtualBox 4.3.26 Oracle VM VirtualBox Extension Pack. Follow the instruction on that website.
The latest version is 4.3.26 currently. Make sure install the VirtualBox from this official website as well since the one in the Ubuntu repository is kinda out of date.
The second step is to Enable USB 2.0 (EHCI) Controller as shown below

The third step is to setup the serial ports for the virtual machine.
Go to the "Serial Ports" tag and check the "Enable Serial Port"
Choose "COM1" in the Port Number drop down menu, This is the port showing in the WindowsXP.
Choose "Host Device" in the Port Mode section
Type the ubuntu port in the Port/File Path. To figure out what is the Port Path of your current device, open your terminal (Ctrl+Alt+T), type
$ dmesg | grep tty
Usually the port path in Ubuntu might be "/dev/ttyUSB0" or "/dev/ttyACM0" etc..
The total configuration of step 3 is shown as follows

Now all the configuration is done, once you turn on the guest side windows, you will have the COM1 as a serial port. If you do not have the usb device connected to your Ubuntu, make sure you disable the serial port selection in the configuration, otherwise virtualbox will have errors saying "Failed to open host device '/dev/ttyUSB0'"
This is the how my windows guest looks like and now I can upload the code through this COM1 port to the Arduino chip just like what it does in the real windows environment.

No comments:
Post a Comment