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

Issue with setup of USB device #5

Open
IsomanGJ opened this issue Feb 13, 2017 · 6 comments
Open

Issue with setup of USB device #5

IsomanGJ opened this issue Feb 13, 2017 · 6 comments

Comments

@IsomanGJ
Copy link

Just trying to setup on my PC. Have one ant stick plugged in which I know is working. Tried running a couple of demos but they fail on “new AntTransceiver(0);” part of line with

Exception in thread “main” java.lang.NullPointerException
at javax.usb.UsbHostManager.getServicesName(UsbHostManager.java:96)
at javax.usb.UsbHostManager.initialize(UsbHostManager.java:32)
at javax.usb.UsbHostManager.getUsbServices(UsbHostManager.java:24)
at org.cowboycoders.ant.interfaces.AntTransceiver.doInit(AntTransceiver.java:141)
at org.cowboycoders.ant.interfaces.AntTransceiver.(AntTransceiver.java:125)
at org.cowboycoders.ant.interfaces.AntTransceiver.(AntTransceiver.java:114)
at virtualride.AcknowledgedDemo.main(AcknowledgedDemo.java:196)

Any Ideas? Thanks

Logged above on website and you asked me to put it here.

You replied:
What operating system are you using? Does the
the vendorId, deviceId pair of your usb stick correspond to 0fcf and 1008 respectively

Answer:Windows 10
If I look at the device details device manager I see this: USB\VID_0FCF&PID_1009

which I suspect means it's 1009.

On the back of that tried
new AntTransceiver(1)
and
new AntTransceiver(1009)

but got same effect. Sorry - not exactly sure what value I'm supposed to be passing and can't find a document to tell me.

Thanks in advance

@jovial
Copy link
Collaborator

jovial commented Feb 14, 2017

The zero in new AntTransceiver(0) refers to how many devices to skip whilst walking through all of the enumerated devices; zero would just return the first one found. This is useful if you have multiple matching devices on the same machine. The list of devices that produce a match comes from AntDeviceId.

However, it doesn't look like it gets far enough to actually search for these devices. It looks like this is most likely a problem with javaxusb. You might want to try a later version and report back if the behaviour changes.

@IsomanGJ
Copy link
Author

HIi Jovial, thanks for that. Downloaded a newer version (didn't realise I had an older version) and that seemed to work. Got errors further on but it got me over that one at least. Thanks

@IsomanGJ
Copy link
Author

Like I said it gets a bit further but now falls over on the following:
USB error 3: Unable to claim interface: Access denied (insufficient permissions)

when I run: node.start();

Operating system is windows 10. Thanks again in advance

@jovial
Copy link
Collaborator

jovial commented Feb 17, 2017

I believe you have to follow this guide:

https://github.com/libusb/libusb/wiki/Windows#How_to_use_libusb_on_Windows

@IsomanGJ
Copy link
Author

It does look to me like i have the latest driver and I know that the device does work as I use it through Zwift. Anything else you can think of? Thanks in advance

@IsomanGJ
Copy link
Author

Hi Jovial, Actually it did seem to work if I switched USB driver to libusdk from libusb. So I think it's working now. Thanks for your help

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

2 participants