Closed guysoft closed 8 years ago
Hi,
emokitd isn't expected to produce any output. Anything in your syslog? What happens when you run strace -f -e read=all emokitd
?
Here is the output of strace -f -e read=all emokitd
(too long to paste in a comment).
running as root.
http://nopaste.dk/p62653
Does this tell you anything?
Indeed. Please ensure emokitd runs with privileges sufficient to access a) /var/run/emokitd.pid b) log to syslog c) access the relevant USB device. (I usually just run it as root, though that shouldn't be necessary).
Its running as root. Is there anything else I should set? (Note the comment was updated, first time was indeed without root)
Thanks; that does look odd. Which version of hidraw did you install? Which distro/kernel are you running? Developer or consumer headset?
Hey,
I followed this install manual.
Kernel:
Linux 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Hidraw is a kernel driver so I assume it has the same version number as the kernel?
Indeed, sorry, I meant hidapi, not hidraw. In the hidapi source tree there's a a directory called 'test_gui' or something like that; are you able to run it, see the two epoc devices, and request a feature report?
Hi,
I have the same problem, for some reason I get the traceback from the gevent library. I tried to run the Hidapi test gui (hidapi-hidraw-testgui), and two Epoc devices are listed.
What is the version of the library used in development? Perhaps they changed the API in the meanwhile.
Do you have any other ideas of what could cause this?
Most recent tested version of hidapi is 0.7.0, git commit 776ec62dfc2cd394a298f03dbf27a96506544410[0].
I'll spin up an Ubuntu VM at some point and try and reproduce this; let me know if you have any luck.
[0] https://github.com/signal11/hidapi/commit/776ec62dfc2cd394a298f03dbf27a96506544410
Thanks for the quick reply!
I tried checking-out your version, but still no luck (the same problem). Why do you suspect the problem is in Hidapi? The stack trace (both mine and from other users) is referring to gevent and greenlet libraries.
Although, from the same traceback I would probably conclude that the 'setup[0]' object is equal to None, and that greenlet.py does not efficiently handle this case (why it's None in the first place, I got no clue since I haven't looked at the code).
In case it's useful, I am running Ubuntu 13.10, 64bit.
Thanks again. It would be cool to see this functioning :-)
Ok, solved it. Here's what you do.
For the C version: The same thing as in Issue #63 (https://github.com/openyou/emokit/issues/63). Open up the include/emokit/emokit.h file, and change EMOKIT_VID and EMOKIT_PID variables to the correct Vendor and Product IDs. For some reason, it appears that Epoc changed this numbers at some point. In my case, I used: const static uint32_t EMOKIT_VID = 0x1234; const static uint32_t EMOKIT_PID = 0xed02;
You can check if you have the same or different VID and PID e.g. by using hidapi/testgui/hidapi-hidraw-testgui (download from github and compile). In my case, I had 2 devices listed: 1234:ed02 - Emotiv Systems Pty Ltd Receiver Dongle L01 (usage...) 1234:ed02 - Emotiv Systems Pty Ltd Receiver Dongle L01 (usage...)
If it still doesn't work, there are two more things to do: 1) Open emokit.c file, and find the line: int r = emokit_open(d, EMOKIT_VID, EMOKIT_PID, 0); Change the zero to one, like so: int r = emokit_open(d, EMOKIT_VID, EMOKIT_PID, 1); This means that we are trying to use the wrong one of the two listed devices.
2) Use sudo to allow for required privileges.
For the Python version: It appears that not only have they changed the VID and PID, but also the string of the company name. Open file python/emotiv.py, and find the function: getLinuxSetup There is a line: if "Emotiv Systems Inc." in manufacturer: From the device listing, you can see that the name of the manufacturer is now "Emotiv Systems Pty Ltd" (try printing it to stdout). So, to fix the problem, change the above line to something like: if "Emotiv Systems" in manufacturer:
Thats it! :)
Thanks to @isovic I am able to confirm that his solution also works on Ubuntu 14.04.
Thanks to @isovic, as update, it doesn't full work in Raspberry, the modules "Ctype" for C programming cannot be installed, also "Psyco" :
"Could not find a version that satisfies the requierements psyco/ctypes"
But in /python "example.py" works great with those changes.
Another problem in Raspberry Pi is, when you want to get info from the EPOC it says "NoneType object has no attribute gyroX"
I know that its becasue "gyroX" return 'None'
It's something with "emotiv.py" when it starts
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/emokit-0.0.1-py2.7.egg/emokit/emotiv.py", line 353, in setup
self.setupPosix()
File "/usr/local/lib/python2.7/dist-packages/emokit-0.0.1-py2.7.egg/emokit/emotiv.py", line 456, in setupPosix
self.serialNum = setup[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
<Greenlet at 0xd3b5d0: <bound method Emotiv.setup of <emokit.emotiv.Emotiv object at 0xc04770>>> failed with TypeError
if someone know how to fix it!
Psyco not required. Pull the latest version @dracog71. Seems like the initial problem was fixed and latest version weakened those requirements so closing.
Hello, I compiled emokit and ran
emokitd
which returns no output, it just runs and exists.When I try executing example.py I get:
lsusb output:
Bus 003 Device 006: ID 1234:ed02 Brain Actuated Technologies Emotiv EPOC Developer Headset Wireless Dongle
dmesg output: