Re: Firmware development in Windows
Posted: Mon Jul 29, 2019 10:32 pm
Hi,
Yes, am running cfloader natively under Windows, and use the libusb-win32 (v1.2.6.0) driver...
But, I finally succeeded to flash! The issue seems to be related to my USB.
I only have a single USB port (Surface Pro 4) so I use a USB hub. Apparently, it does not work through the USB hub (at least natively under Windows)... If I connect the crazyradio *directly to the USB port*, then the first time it also fails (with the same error message as I posted earlier), but if I try immediately for the second time, it then starts and succeeds. BTW, I observe the same behavior when trying to flash from the Crazyflie PC client, the first time it gives an error, the second time is ok.
Interestingly, just the datalink works fine through the USB hub. Although, sometimes (quite often actually, am running at 2M as recommended with the LPS deck) the connection breaks due to "Too many packets lost".
And, even more interestingly, when running things from the VM, the flashing works fine *through the USB hub*, directly on the first attempt...
So while I now have a working workflow (thanks a lot theseankelly!!!), it is still a bit puzzling, and also a bit annoying as I have to disconnect the hub everytime I want to flash.
Why would the Crazyradio performance be worse in Windows than in the VM (running on the same machine on the same Windows intallation...)? Driver issue? Or USB port settings?
One thing I have noticed: while in the VM the radio device stays connected all the time, in Windows when I start flashing via cfloader (or via the PC client), I hear the sound of disconnecting and connecting USB device in Windows...
Yes, am running cfloader natively under Windows, and use the libusb-win32 (v1.2.6.0) driver...
But, I finally succeeded to flash! The issue seems to be related to my USB.
I only have a single USB port (Surface Pro 4) so I use a USB hub. Apparently, it does not work through the USB hub (at least natively under Windows)... If I connect the crazyradio *directly to the USB port*, then the first time it also fails (with the same error message as I posted earlier), but if I try immediately for the second time, it then starts and succeeds. BTW, I observe the same behavior when trying to flash from the Crazyflie PC client, the first time it gives an error, the second time is ok.
Interestingly, just the datalink works fine through the USB hub. Although, sometimes (quite often actually, am running at 2M as recommended with the LPS deck) the connection breaks due to "Too many packets lost".
And, even more interestingly, when running things from the VM, the flashing works fine *through the USB hub*, directly on the first attempt...
So while I now have a working workflow (thanks a lot theseankelly!!!), it is still a bit puzzling, and also a bit annoying as I have to disconnect the hub everytime I want to flash.
Why would the Crazyradio performance be worse in Windows than in the VM (running on the same machine on the same Windows intallation...)? Driver issue? Or USB port settings?
One thing I have noticed: while in the VM the radio device stays connected all the time, in Windows when I start flashing via cfloader (or via the PC client), I hear the sound of disconnecting and connecting USB device in Windows...