Page 1 of 4

[SOLVED] Crazyradio on Win7/virtual machine

Posted: Sat May 04, 2013 11:54 pm
by alex
Hey guys,

just powered on my Crazyflie for the first time - everthing seems fine, motors are spinning up for a moment and LEDs are flashing!

But my Crazyradio shows some strange behaviour: Everytime I plug in the USB module, the red an green LEDs are flashing shortly and then stay dark completely. I installed the Win7 driver from the wiki.

I would like to use it in the Ubuntu virtual machine. What do I have to do to get the Crazyradio dongle running in the VM/on Win7? Except installing the Win7 driver and checking the USB dongle in the VM settings, of course.

Thanks again!

Alex

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 5:51 am
by atomicdog
You shouldn't need to do anything but attach the crazyradio USB device in virtual box.
Device -> USB devices

The Ubuntu VM already has the driver so you only need the win7 driver if your running the program on windows.
I've gotten it to connect using the VM.

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 8:09 am
by marcus
Hi alex,
alex wrote: But my Crazyradio shows some strange behaviour: Everytime I plug in the USB module, the red an green LEDs are flashing shortly and then stay dark completely. I installed the Win7 driver from the wiki.
This is normal. The red and green LED will light up when the dongle is powered and turn off once the USB dongle is enumerated. They will not light up again until you are communicating with the Crazyflie.
alex wrote: I would like to use it in the Ubuntu virtual machine. What do I have to do to get the Crazyradio dongle running in the VM/on Win7? Except installing the Win7 driver and checking the USB dongle in the VM settings, of course.
Like atomicdog wrote, you don't need to do anything else than to pass through the USB device to the VM. But by now the software/firmware for the Crazyflie inside the VM we provided is a bit old. So follow the instructions here to update to the latest versions.

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 10:04 am
by alex
Thank you for your responses. Nonetheless the Crazyradio doesn't seem to wake up. I started the most recent PC Client version and tried to connect to the Crazyflie. But there's no reaction from the Crazyradio and therefore no Crazyflie can be found. Something is wrong obviously.

Is there any way to see wether the USB dongle is being recognized by the Linux running in the VM? Sorry, maybe I am missing some essential step!? :oops:


Edit: Just googled and typed "lsusb" in the console window. This is the answer:

Code: Select all

bitcraze@bitcraze-ubuntu:~$ lsusb
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 021: ID 0489:e031 Foxconn / Hon Hai 
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
This means that the Ubuntu doesn't notice the Crazyradio dongle, right? But I ticked it in the VM's options, so what's wrong?

Edit 2: There is an option in the VirtualBox settings to emulate an USB 2.0 usb controller. If I check that, I am told to install the VirtualBox additions in the guest OS to support it. Would this help in any way?

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 12:17 pm
by atomicdog
I tried the lsusb command and it doesn't show the crazyradio but I'm still able to connect to the copter.

Code: Select all

bitcraze@bitcraze-ubuntu:~$ lsusb
Bus 001 Device 005: ID 1915:7777 Nordic Semiconductor ASA 
Bus 001 Device 006: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
So when you press the connect button what does it show?
mine shows...

Code: Select all

radio://0/10/250K
debug://0/0 - Debugdriver for UI testing
Edit 2: There is an option in the VirtualBox settings to emulate an USB 2.0 usb controller.
If you're talking about the "Enable USB 2.0 (EHCI) Controller" check box I don't have it checked and it still works.

Re: Problems installing PyUSB and running CF PC Client

Posted: Sun May 05, 2013 1:41 pm
by alex
My list simply shows

Code: Select all

debug://0/0 - Debugdriver for UI testing
No Crazyflie at all. :?

As said before, it seems like the VM doesn't recognize the Crazyradio - the lights flash shortly upon plugging it in but then stay dark. Is there a command to rescan USB devices in Ubuntu?

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 5:30 pm
by tobias
It might be the issue with the USB3 ports? http://forum.bitcraze.se/viewtopic.php?f=8&t=87.
If you have a USB2 port try plugging it into that.

Re: Problems installing PyUSB and running CF PC Client

Posted: Sun May 05, 2013 5:46 pm
by alex
My notebook doesn't have USB3, but thanks for the tip.

I'm going to do some trial and error searching this evening. Don't hesitate posting other possible suggestions... ;)

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 5:50 pm
by marcus
After inserting the dongle and then starting up the Bitcraze VM in VirtualBox, if you go to the menu Devices->USB Devices (in VirtualBox) what devices do you see?

Re: Crazyradio on Win7/virtual machine

Posted: Sun May 05, 2013 6:36 pm
by tobias
If the Crazyradio is detected/enumerated and the driver is working the Crazyradio should blink the red LED a lot when it is scanning for Crazyflies. Can you see if it does that?