Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settle on a USB communications library #42

Open
qdot opened this issue May 4, 2016 · 5 comments
Open

Settle on a USB communications library #42

qdot opened this issue May 4, 2016 · 5 comments

Comments

@qdot
Copy link
Member

qdot commented May 4, 2016

At the time libnifalcon was written, it was hard to find a usb/ftdi library that supported our async needs. That's probably changed in the past few years. Would be nice to settle on a single cross platform library that suits our requirements.

@agirault
Copy link
Contributor

agirault commented May 5, 2016

Are you talking about libusb1 for Unix vs libftd2xx for Windows?
Would be nice to have libusb1 for all systems. VRPN that I use to interface with the Falcon through LibNiFalcon uses libusb1 : https://github.com/vrpn/vrpn/blob/master/cmake/FindLibusb1.cmake

@FabienDanieau
Copy link

I agree, libusb seems to be a good option. If it works well with Windows now we won't need FTD2XX drivers anymore.

@agirault agirault mentioned this issue May 10, 2016
@agirault
Copy link
Contributor

agirault commented May 10, 2016

I have been testing with libusb1 on windows, managed to fix any linker issues etc. See #43

setFalconComm<FalconCommLibUSB>() is called instead of setFalconComm<FalconCommFTD2XX>() in the FalconDevice constructor.

Calling getDeviceCount() works successfully, but open() fails, and I get the following errors:

  • falconDevice->getErrorCode() : 2000
  • falconDevice->getFalconComm->getDeviceErrorCode() : -12

In FalconCommLibUSB::open(), the device is found (good vendorID and productID), but libusb_open() returns the error code -12.

@FabienDanieau do you have a windows machine you could test with?

@agirault
Copy link
Contributor

from @mcuee on libusb/libusb#185 (comment) :

In order to use libusb under Windows, you have to use a supported driver --
WinUSB for example and not FTDI vendor driver.

Yout toughts on that @qdot ?

@qdot
Copy link
Member Author

qdot commented May 12, 2016

OH. Now I remember why I did it this way. :|

I kept the FTDI driver in on windows for people that want to use software that requires either the Novint SDK OR libnifalcon.

Would be nice to keep both around. That said, the Novint SDK has a chance of disappearing/not working at any point these days, since it hasn't been updated in years, so being able to support libusb on windows would be nice. We can just create a Zadig installer for WinUSB drivers.

I guess the problem at that point is, given we'll have a platform will support both drivers, how do we have programs figure out which driver to use on windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants