Possible to run OpenXC in Ubuntu VM with Win10 host?

54 views
Skip to first unread message

Jerry Trantow

unread,
Dec 14, 2017, 2:57:55 PM12/14/17
to OpenXC
I am just getting started with OpenXC and the Ford VI. I thought I would avoid the Win10 unsigned usb driver problems by using a Ubuntu VM.  I created a VM with the latest Ubuntu and went through the OpenCV installs (python2.7, pip, openXC, libusb) I installed vi-firmware-type5-FORDBOARD-ctv7.2.0-csv7.0.0.bin and the red and green LEDs started working. So I think all of that went ok.

I used lsusb in the Ubuntu VM 

jjt@ubuntu:~/openxc-python$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1bc4:0001 Ford Motor Co. 
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

However, the OpenXC scripts don't seem to recognize the VI??? 

jjt@ubuntu:~/openxc-python$ sudo openxc-control version
Skipping USB device: [Errno None] Unknown error
Traceback (most recent call last):
  File "/usr/local/bin/openxc-control", line 11, in <module>
    load_entry_point('openxc', 'console_scripts', 'openxc-control')()
  File "/home/jjt/openxc-python/openxc/tools/control.py", line 142, in main
    interface = interface_class(**interface_kwargs)
  File "/home/jjt/openxc-python/openxc/sources/usb.py", line 69, in __init__
    raise DataSourceError("No USB vehicle interface detected - is one plugged in?")
openxc.sources.base.DataSourceError: No USB vehicle interface detected - is one plugged in?

The Ford VI is simply connected to the usb connector and both red and green LEDs are on. It is not connected to a vehicle at this point, but I just want to try some of the openxc version. Shouldn't this work?

Eric Marsman

unread,
Dec 14, 2017, 3:49:05 PM12/14/17
to OpenXC
Hi Jerry,

Yes, this should work if you pass USB control from the host to the VM. What did you use to setup your VM? You can use the same VirtualBox/Vagrant setup that we use for vi-firmware development and it should work.

If you programmed the VI with type5 firmware and it is not plugged into a vehicle, then the VI will turn off b/c it can't detect any CAN traffic. This is the red light. You should get a blue LED. For desktop testing, use the emulator firmware from the github vi-firmware releases download. This will allow the device to be powered over USB and will generate random data for you to test your USB drivers & setup.

Regards,
Eric

Jerry Trantow

unread,
Dec 26, 2017, 5:26:06 PM12/26/17
to OpenXC
I set up the Ubuntu VM using VMWare and the latest distribution. The Ubuntu VM had control of the Ford Vi as it showed up in lsusb output. I will give the vi-firmware development VM a try.

I have a bunch of CAN data from some vehicle testing that has already been done. I would like to run this data through the Ford VI and into our custom code without getting the vehicle back in the lab. Basically, some other engineers dumped all the CAN messages during several test conditions this summer and we would like to use this data. I have a CAN adapter and I can play the data back. The current implementation doesn't have the same timing between messages but each message is valid. I can connect using to the Ford VI (using Android BT) when it's plugged into my 2016 Silverado (limited data) or my wife's 2016 Escape. But on the bench it's timing out and not catching any of the messages from my program sending CAN messages. My program is currently dribbling out  CAN messages (< 1 message per second). On my bench, I see one blue and one red led on when I get a BT connection and then I assume I time out and the LEDs go off. In the vehicles, I see at least two blue LEDs and I see the messages coming in.


Thanks for your help!

Jerry Trantow

unread,
Dec 26, 2017, 11:51:11 PM12/26/17
to OpenXC
I followed the "Development Environment Setup" instructions for VirtualBox and Vagrant. When I do the "vagrant up" it starts having problems around the pip install??? This is with VirtualBox 5.2.4, Vagrant 2.0.1, and forking the vi-firmware master. 
vagrantUp.txt

Jerry Trantow

unread,
Dec 27, 2017, 11:18:23 AM12/27/17
to OpenXC
Looks like the Vagrant problem has already been reported. 

vagrant fails to load pip #402


What's the work around?

Eric Marsman

unread,
Jan 2, 2018, 11:34:09 AM1/2/18
to OpenXC
Hi Jerry,

Happy New Year! As you noted, there is an issue. It is not resolved yet. I agree with your assessment. I could not find a good work around and haven't had a chance to test a new Ubuntu yet. We can continue the discussion there. 

With your new Ubuntu VM, have you been able to access the VI through USB? It should be possible, but we really recommend just doing it in your native OS. It's simpler. 

Regards,
Eric
Reply all
Reply to author
Forward
0 new messages