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").
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.
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 CANNOT CONNECT: -3 (E_EMOKIT_NOT_OPENED). I added some output within emokit_open for now. This shows up when I run contact now:
CANNOT CONNECT: -3
Current epoc devices conneted: 2
opening dev: 1 (device_index)
path: /dev/hidraw0 (device_cur->path)
opening dev: 0
CANNOT CONNECT: -3
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.