-
Notifications
You must be signed in to change notification settings - Fork 236
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
Seeing 2 devices when there's only 1 connected on windows/linux+libusb #39
Comments
That is because there are two interfaces in the dongle (They appear as hidraw0, hidraw1 for example). Looking to your udev rule it seems that you are interested in the first one which is called "Emotiv RAW DATA". So we can filter out all other interfaces except that. Am I wrong? |
The udev rule is broken in multiple ways right now. It's set up for the first python libraries we had, which assumed daemons and what not to exist on the system. Even so, we should be able to do something smarter now that we're on hidapi. |
I guess this is not 100% the same issue, but still... Using ubuntu11 (installed all dependencies, mcrypt, cmake, hidapi w/o problems) I get two devices, but running e.g. contact I get
BTW: everything works fine in windows, using emokit-java. |
I have a working version of the udev rules working with epocd on my other laptop; now that epocd's been incorporated into master I'll look into integrating my changes and getting device selection working (I'm at pyconau at the moment, so it'll be a couple of days). |
I realize that I'm perpetuating an off-topic discussion, but... @wijjj: have you checked that you have read permissions on hidraw? I had the same problem, stepped through the debugger, and found I lacked permissions for a call to open() in the hid library. Try cat-ting on the /dev/hidraw file as a check or run with sudo... might help. |
Whenever we run hid_enumerate on windows or linux using libusb, we get a device count of 2 even when there's only one device available. This means that if we try to connect to device index 0 instead of device index 1, we don't actually read anything (epocd example hangs on "Starting read").
CURRENT WORKAROUND:
If you are seeing 2 devices in count when you only have 1 connected, try changing emokit_open's device index (the last argument of the function) to 1 instead of 0. Opening the 2nd device that we see tends to make emokit work. That said, we're still looking to fix this so that doesn't need to happen.
The text was updated successfully, but these errors were encountered: