[SOLVED] Virtual Machine XBox 360 Controller Problem

Post here to get support
Post Reply
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

[SOLVED] Virtual Machine XBox 360 Controller Problem

Post by rmirwin2 »

Hello all!

Running the cfclient from terminal, I'm having trouble getting either 2013.4 or 2013.4.1 to work with a MS Wireless XBox 360 Controller within the virtual machine running on VMware.

The stand-alone PC client works perfectly, so I know the controller and dongle are working fine. Within VM, I can see the device is connected, along with the radio. I can see the device's status light flash as any buttons are pushed.

On starting cfclient under "Input Device" and Devices, I see four (4) XBOX 360 Wireless Receiver objects. Obviously that's wrong.

Within "Configure Device Mapping", if I pick the top XBOX Wireless Receiver object, I can set up the controller as expected by detecting each button and then save the configuration. Naturally, I can connect to the Crazyflie and get all the readbacks as expecte.

Problem is I can never get any change of values off of 0% in the Flight tab.

I have tried updating the virtual machine client (following rm -r * inside the crazyflie-pc-client directory) using the latest cfclient download offered in the repository. The About gives the identical version message to that offered by the standalone PC client, but clearly something is not well!

Any ideas what's wrong or what to try next?

All help appreciated!

Rich
Last edited by rmirwin2 on Fri May 24, 2013 5:52 pm, edited 2 times in total.
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Virtual Machine XBox 360 Controller Problem

Post by marcus »

Hi Rich,

Could you paste the cfclient output from the console just after starting it up?

/Marcus
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: Virtual Machine XBox 360 Controller Problem

Post by rmirwin2 »

Hello Marcus,

No output is produced in the console window upon start up of cfclient.

I do see output directed to the Terminal. This reads:

bitcraze@bitcraze-ubuntu:~/projects/crazyflie-pc-client$ python bin/cfclient
Info: Using config path: /home/bitcraze/projects/crazyflie-pc-client/lib/../conf
Info: sys.path= ['/home/bitcraze/projects/crazyflie-pc-client/lib', '/home/bitcraze/projects/crazyflie-pc-client/lib/../conf', '/home/bitcraze/projects/crazyflie-pc-client/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
INFO:cfclient.cfclient:Disabling STL printouts
INFO:cfclient.utils.config:Dist config read from /home/bitcraze/projects/crazyflie-pc-client/lib/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/bitcraze/projects/crazyflie-pc-client/lib/../conf/config.json]
INFO:cfclient.utils.input:Parsing [Generic_OS_X.json]
INFO:cfclient.utils.input:Parsing [PS3_Mode_2.json]
INFO:cfclient.utils.input:Parsing [PS3_Mode_1.json]
INFO:cfclient.utils.input:Parsing [xbox360_mode1.json]
INFO:cfclient.utils.logconfigreader:Parsing [stabalizer.json]
INFO:cfclient.ui.tabs.FlightTab:Changed flightmode to Normal
Saving Xbox 360 Wireless Receiver
Saving Xbox 360 Wireless Receiver
Saving Xbox 360 Wireless Receiver
Saving Xbox 360 Wireless Receiver

Only when I connect to the Crazyflie does anything appear in the Console:

ng!
SYS: Build 33:f1be268c43c5 (tip) CLEAN
SYS: I am 0x872034535356854966FFF54 and I have 128KB of flash!
IMU: MPU6050 I2C connection [OK].
IMU: HMC5883 I2C connection [OK].
IMU: MS5611 I2C connection [OK].
MPU6050: Self test [OK].
HMC5883L: Self test [OK].
MS5611: Self test [OK].

Likely none of the console message relates at all to the Input device issue.

Thanks for your consideration!
Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Virtual Machine XBox 360 Controller Problem

Post by marcus »

My bad, I meant the terminal output...not console.

Could you paste the output of running this command in the terminal?

Code: Select all

ls /dev/input/js*
/Marcus
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: Virtual Machine XBox 360 Controller Problem

Post by rmirwin2 »

Yes, suspected that so the terminal output was included.
The first node listed in the ls command is the VMware virtual mouse.
The next four are to the XBox controller

bitcraze@bitcraze-ubuntu:~$ ls -l /dev/input/js*
crw-r--r-- 1 root root 13, 0 May 19 23:32 /dev/input/js0
crw-rw-r--+ 1 root root 13, 1 May 19 23:45 /dev/input/js1
crw-rw-r--+ 1 root root 13, 2 May 19 23:45 /dev/input/js2
crw-rw-r--+ 1 root root 13, 3 May 19 23:45 /dev/input/js3
crw-rw-r--+ 1 root root 13, 4 May 19 23:45 /dev/input/js4
bitcraze@bitcraze-ubuntu:~$

As expected, all but js0 are eliminated when the receiver is removed from USB.
Last edited by rmirwin2 on Sun May 19, 2013 10:55 pm, edited 1 time in total.
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: Virtual Machine XBox 360 Controller Problem

Post by rmirwin2 »

I did briefly try the VirtualBox VM and couldn't get the Wireless XBox 360 controller to work there either.

Having no luck so far, I went back to VMware, looked around, and found this page:

xbox360 wireless controller on Ubuntu/Steam with xboxdrv.

Essentially the xpad kernel driver is replaced with the xboxdrv driver.

I've used this now successfully to map the Wireless XBox 360 controller to the application. Only one device shows up in cfclient, the XBox Gamepad (userspace driver).

The only issue is that to use this one has to go to superuser to start the xboxdrv before starting cfclient. Probably that is fixable.

I'm not sure if this issue should be considered "Solved" since it seems only like a work-around for whatever is wrong in the default xpad configuration in VMware. Let me know what you think!

This is inconvenient, but at least least the development environment in VMware is now working and I can try on some of the excellent experiments here!

Rich
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
Post Reply