openyou / emokit

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

Headset bought in 06/2011 not working properly #4

Closed eskel closed 12 years ago

eskel commented 13 years ago

Hi, first of all - thanks a lot for work done!

Second, I bought mine headset at end of June and have following issues:

(EDITed with new information about behaviour)

Python script:

  1. Device HID ID was changed, filter = hid.HidDeviceFilter(vendor_id=0x21A1, product_name='Brain Waves') will not return any device. If product_name='Brain Waves' is removed, two devices are returned (see bottom for full info).
  2. When number 1. is fixed, when dequeue method is called, len(self.packets) always returns 0. Method handle in set_raw_data_handler(handle) is never called. Seems to me that python code is not receiving any data from HID device. I tried both HID devices.

Do you have any idea if this problem can caused by pywinusb, wrong key (but decryption is never called so this is probably not the cause) or anything else?

C library:

  1. The HID device with data is now with count 1 not 0 as in code (epoc_open(d, EPOC_VID, EPOC_PID, 0) needs to be changed to epoc_open(d, EPOC_VID, EPOC_PID, 1)).
  2. Data are now pouring from epoc_get_next_frame(), but it seems that decryption key (I tried all four of them available) is incorrect. I imported resulting stream into EEGLab and channels looks random.

If I can some help to resolve this issues, please let me know, E.

HID device (vID=0x21a1, pID=0x0001, v=0x0003); Emotiv Systems Inc.; EPOC BCI, Path: \?\hid#vid_21a1&pid_0001&mi_00#7&e2b2427&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Path: \?\hid#vid_21a1&pid_0001&mi_00#7&e2b2427&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Instance: HID\VID_21A1&PID_0001&MI_00\7&E2B2427&0&0000 Port (ID): 2976 Port (str): USB\VID_21A1&PID_0001&MI_00\6&2A34355C&0&0000

HID device (vID=0x21a1, pID=0x0001, v=0x0003); Emotiv Systems Inc.; 00000000000, Path: \?\hid#vid_21a1&pid_0001&mi_01#7&15ac199b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Path: \?\hid#vid_21a1&pid_0001&mi_01#7&15ac199b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Instance: HID\VID_21A1&PID_0001&MI_01\7&15AC199B&0&0000 Port (ID): 3072 Port (str): USB\VID_21A1&PID_0001&MI_01\6&2A34355C&0&0001

eskel commented 13 years ago

Hi, I figured out the key for my consumer headset version 1.5.1.

The key is: const unsigned char HEADSET_151_KEY[KEYSIZE] = {0x4D,0x00,0x47,0x54,0x38,0x10,0x31,0x42,0x4D,0x00,0x47,0x48,0x38,0x00,0x31,0x50};

In C library, epoc_open() function call must be changed from epoc_open(d, EPOC_VID, EPOC_PID, 0) to epoc_open(d, EPOC_VID, EPOC_PID, 1) to connect and work properly.

Please add to master branch, if you like to.

Best, E.

eskel commented 13 years ago

Here is detailed howto for figuring my consumer key:

qdot commented 13 years ago

Nice! I'll add this info to our readme, and add the key to the code. Thanks so much for finding this!

Will close this out myself once I get those two things done.

eskel commented 13 years ago

Many thanks for maintaining this software - good work!

dimokaramanlis commented 13 years ago

Thank you qdot for the work on EPOC.

Are there any news concerning eskel's problems while using the Python script?

I tried to run the filter = hid.HidDeviceFilter(vendor_id=0x21A1, product_name='Brain Waves') command in Windows, but the list is always empty, even when I remove the "Brain Waves" name. I tried the same thing in Linux, but it seems that there's no problem.

Can I somehow get rid of this problem without having to use Linux?

Thanks for your time

perl-girl commented 13 years ago

eskel,

Thank you for the step by step instructions on how to get the key! I was finally able to get my headset working with the emokit. My headset is pretty much brand new, so I wonder how often they're changing the key now...

qdot commented 13 years ago

Just wanted to let you know, I am keeping an eye on this, but I'm so massively swamped in other projects right now that I probably won't be able to update things for a while. If anyone who forked wants to add documentation, keys to code, etc..., please feel free to pull request and I'll try to bring things back in. I've talked to Daeken a bit about trying to figure out the key gen stuff once and for all, but, well, we're both kinda in the same situation time-wise at the moment.

qdot commented 12 years ago

Key crack now in repo.