Page 1 of 1

Can't get Crazyradio via

Posted: Mon Jan 12, 2015 5:53 am
by 16PooleN
I am trying to connect to the Crazyradio from a Windows application. I am using the CrazyflieDotNet.Crazyradio.Driver library. The code to access the Crazyradio driver appears to be failing:

IEnumerable<ICrazyradioDriver> crazyradioDrivers = null;
crazyradioDrivers = CrazyradioDriver.GetCrazyradios();
if (crazyradioDrivers == null)
Console.WriteLine("CrazyradioDrivers = null");
if (crazyradioDrivers != null && crazyradioDrivers.Any())
return crazyradioDrivers.First();
throw new Exception("No Crazyradio USB dongles found!");

When I run, an exception appears to be thrown by CrazyradioDriver.GetCrazyradios():
Value cannot be null.
Parameter name: crazyradioUsbDevice

The cfclient program connected to the Crazyradio driver just fine, and to the Crazyflie.

Thanks for any help.

Re: Can't get Crazyradio via

Posted: Mon Jan 12, 2015 9:29 am
by arnaud
I just tried and saw the same behavior on Windows 10 using visual studio community edition. I do not know how to solve it though, maybe you can try posting a ticket on the github repos to get help from the original developer?
Sorry this is not much help but I can confirm that the problem does not come from the crazyradio hardware or driver.


Re: Can't get Crazyradio via

Posted: Mon Jan 12, 2015 9:47 am
by arnaud
I could go a bit further in the program by adding this line:

Code: Select all

diff --git a/CrazyflieDotNet/Source/CrazyflieDotNet.Crazyradio/Driver/CrazyradioDriver.cs b/CrazyflieDotNet/Source/Crazyindex 149e863..4905b8a 100644
--- a/CrazyflieDotNet/Source/CrazyflieDotNet.Crazyradio/Driver/CrazyradioDriver.cs
+++ b/CrazyflieDotNet/Source/CrazyflieDotNet.Crazyradio/Driver/CrazyradioDriver.cs
@@ -546,7 +546,8 @@ public static IEnumerable<ICrazyradioDriver> GetCrazyradios()

                                foreach (UsbRegistry crazyRadioUsbDevice in crazyRadiosRegDeviceList)
-                                       crazyRadioDrivers.Add(new CrazyradioDriver(crazyRadioUsbDevice.Device));
+                    if (crazyRadioUsbDevice.Device != null)
+                                           crazyRadioDrivers.Add(new CrazyradioDriver(crazyRadioUsbDevice.Device));
Even though I have only one Crazyradio plugged, two where found and the first one had .Device set to null. This patch just ignore the wrong device. It seem to crash later though but at least it found and start communicating with a Crazyflie 2.0.

Re: Can't get Crazyradio via Windows application

Posted: Fri Jan 23, 2015 5:24 am
by 16PooleN
I have (I think) a Crazyflie 1. I only see one CrazyRadio identified in the device manager, and also in the registry. As you pointed out, it doesn't look like it has a device name. Is this a problem and how can I address it? My code is currently not searching the registry, but using the CrazyradioDriver.GetCrazyradios() function.

Re: Can't get Crazyradio via

Posted: Tue Oct 13, 2015 8:57 pm
by shmedium
I sorry for the very late reply (i've been away past 6 months on a thru hike).

I am the developer. Sorry for the years of little work. I ran into a wall/bug and did not have the spirit to look into it until a fellow developer (possibly on this forum) contacted me and asked for some info and he found some bugs.

I have since fixed some bugs and have working commander packets. I can fly the copter via a wired ps3 controller.

It is still only a console view. To use PS3 controller, you must install motion joy driver software.

Here is a small demo video of it flying

You may be getting the error because you may not have a windows driver for the dongle. Please read my updated readme file on github for how to do that.