How can I make PC-client using USB dongle?

Firmware/software/electronics
Post Reply
theMinss
Beginner
Posts: 3
Joined: Thu Jul 03, 2014 10:37 pm

How can I make PC-client using USB dongle?

Post by theMinss »

Hello,

I want to make windows PC-client program using visual studio 2008 c++.

I thought the usb dongle is port control device, because I have made other widows program.

But windows OS recognize the usb dongle as usb device, I can not control the usb dongle.

How can I make PC-client using USB dongle?

plz, give me key words or any suggestion..
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: How can I make PC-client using USB dongle?

Post by arnaud »

Hi,

We use libusb to access the dongle from Python the the official client. You have many option depending of which library you want to use.
- LibUSB can be used from VisualStudio: http://wiki.bitcraze.se/projects:crazyradio:protocol
- Microsoft provides a similar library called winUSB: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Both library will give you access to low level USB operation that you can use to communicate with the dongle. The Crzyradio USB protocol is described in our wiki: http://wiki.bitcraze.se/projects:crazyradio:protocol. You can look at the python driver for reference: https://github.com/bitcraze/crazyflie-c ... zyradio.py

Depending of what library you chose to use you will need the correct driver for the dongle. The tool we use to install libusb driver can also install winusb driver: http://wiki.bitcraze.se/projects:crazyr ... dows_zadig

There is at least one Crazyflie C++ client on github that has a driver using libusb: https://github.com/Saqoosha/ofxCrazyfli ... yradio.cpp

Arnaud
theMinss
Beginner
Posts: 3
Joined: Thu Jul 03, 2014 10:37 pm

Re: How can I make PC-client using USB dongle?

Post by theMinss »

Thank you for your helping.

I found my USB dongle using VID/ PID.

Before i send a message, i use this method "libusb_claim_interface" and then I god this error message using "libusb_set_debug" as bellow.

libusb: error [winusbx_claim_interface] could not access interface 0:


how can i solve this problem?

I used this site library : https://github.com/fairlight1337/libcflie
theMinss
Beginner
Posts: 3
Joined: Thu Jul 03, 2014 10:37 pm

Re: How can I make PC-client using USB dongle?

Post by theMinss »

Thank you for helping me.

I solved the problem.

I missed type the channel number. ;;;

"0/10/250k" is very important.
bootstrap
Beginner
Posts: 2
Joined: Thu Apr 02, 2015 8:56 am

Re: How can I make PC-client using USB dongle?

Post by bootstrap »

Could you please share your success with us.Could you please post your visual studio 2008 project files.I want to develop a console application to send commands and control the crazy flie 2.0 using it RF dongle connected to USB.
Post Reply