openyou / emokit

Open source driver for accessing raw data from the Emotiv EPOC EEG headset
http://www.openyou.org
Other
522 stars 236 forks source link

Help with raw data file creation #104

Closed giganscudo closed 10 years ago

giganscudo commented 10 years ago

Hi!

I tried to install emokit on Ubuntu 12.04 x64 running in Virtual Box using the instructions from the zip file (INSTALL.md). I have been successful in compiling it using cmake, tried to run contact.exe and it gives me contact quality. I tried to run emokitd.exe and it does nothing. With that, I guess it's safe to say that I have successfully built it.

But I don't understand why it is not giving me the raw data file. When I tried to connect Epoc to my machine (with the control panel as my verifier to see whether it's connected or not), there is no /dev/eeg/ folder created, therefore no file created. I tried to use Cygwin for Windows 8 as well, (hoping that there may be a change, lol), but to no avail. There is still no raw data created. When I connect the device to my laptop, it shows the hidraw(x) and using cat, it gives me a kinda-garbage text flowing endlessly until I detach the device. I'm pretty much clueless now. I'm not really experienced with this.

Actually, my question would be, what should I do next after building this? Am I missing something? Any suggestions to solve this will be very much appreciated. :)

olorin commented 10 years ago

It does appear that you've built it correctly (if you can get contact quality readings), but why do the files you built on an Ubuntu VM end with .exe?

Please do the following:

giganscudo commented 10 years ago

My bad, it's not a .exe file, I got it shuffled up.

Jun 10 23:30:09 roswell kernel: [10778.293970] usb 1-2: new full-speed USB device number 3 using ohci_hcd
Jun 10 23:30:09 roswell kernel: [10778.752122] usb 1-2: New USB device found, idVendor=21a1, idProduct=0001
Jun 10 23:30:09 roswell kernel: [10778.752125] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 10 23:30:09 roswell kernel: [10778.752127] usb 1-2: Product: EPOC BCI
Jun 10 23:30:09 roswell kernel: [10778.752129] usb 1-2: Manufacturer: Emotiv Systems Inc.
Jun 10 23:30:09 roswell kernel: [10778.752130] usb 1-2: SerialNumber: SN201404228918GM
Jun 10 23:30:09 roswell kernel: [10778.766638] hid-generic 0003:21A1:0001.0002: hidraw1: USB HID v1.11 Device [Emotiv Systems Inc. EPOC BCI] on usb-0000:00:06.0-2/input0
Jun 10 23:30:09 roswell mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:06.0/usb1/1-2"
Jun 10 23:30:09 roswell kernel: [10778.783731] hid-generic 0003:21A1:0001.0003: hidraw2: USB HID v1.11 Device [Emotiv Systems Inc. EPOC BCI] on usb-0000:00:06.0-2/input1
Jun 10 23:30:09 roswell mtp-probe: bus: 1, device: 3 was not an MTP device
Jun 10 23:30:55 roswell emokitd: emokitd running; decrypted EEG data will be written to /dev/emokitd.

The emokitd is created but it's a named pipe. What does this do?

root@roswell:/home/roswell/Desktop/emokit-master/bin# ps aux | grep emokitd 
root      2024  0.0  0.0  23172   516 ?        SLl  Jun10   0:00 ./emokitd
root      2823  0.0  0.0  13592   928 pts/8    S+   00:23   0:00 grep --color=auto emokitd
root@roswell:/home/roswell/Desktop/emokit-master/bin# strace -f emokitd
strace: emokitd: command not found
root@roswell:/home/roswell/Desktop/emokit-master/bin# strace -f -p 2024
Process 2024 attached with 2 threads - interrupt to quit
[pid  2025] rt_sigtimedwait(~[RTMIN RT_1], NULL, NULL, 8 <unfinished ...>
[pid  2024] read(5, 

I'm not pretty sure why it stops there.

execve("./emokitd", ["./emokitd"], [/* 38 vars */]) = -1 EACCES (Permission denied)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8001 (flags O_WRONLY|O_LARGEFILE)
close(3)                                = 0
write(2, "strace: exec: Permission denied\n", 32strace: exec: Permission denied
) = 32
exit_group(1)                           = ?

Does this mean it just exits? I don't understand the EACCES, I am running as a root, but I still have this error.

I made sure that I have a consistent connection with my device, verified through the control panel. (I'm having issues with my connection, but it's a different issue altogether.)

Upon looking at new issues, I have a similar problem with issue #105 , contact quality also shows 0, 8, 16, 24 (I thought it's normal, because I don't wear the device when I'm troubleshooting this.), and not also generating raw data stream file.

Please help :(

olorin commented 10 years ago

That actually looks like it's working fine to me. Try running cat /dev/emokitd | od with the device on and see what you get.

giganscudo commented 10 years ago

Hi, I don't have an access to my device at the moment, but I'll post the results later.

giganscudo commented 10 years ago

Hi, I have tried what you have suggested and... It's not showing anything. How come? :(

[BTW, the contact quality shows the right values (~thousand-ish values) after I properly wear the device.]

giganscudo commented 10 years ago

Well, as it turns out, it seems that the udev file is not working for me, so I needed to modify it (it's showing EPOC BCI in the name instead)

Last question though, can I save my raw data as a .csv file? Thanks :)