Emotiv EPOC EEG Headset Hacked

Cody Brocious has created Cody’s Emokit project, an open source library for reading data directly from the Emotiv EPOC EEG headset. The Emotiv headset is a consumer EEG headset. In common slang, it’s a brain-computer interface. When you buy an Emotiv headset, you are told only to use Emotiv software with the device. Now, Emokit shakes up the status quo.

H+: So, why did you get into Emotiv hardware in the first place?

CODY BROCIOUS: A consumer-grade EEG headset is a game changer. In a lot of ways, the Emotiv EPOC is really novel. We have projects like OpenEEG where people can build these, but you have to invest $750 or more just to get something functional. At that point, there’s not much you can do unless you are into research. The average consumer isn’t going to be processing raw brain data. Since the Emotiv is at the right price point, what it does — and this is what’s big about it — makes it so that consumers can pick it up and start using cool apps that developers make up. That’s quite new in the brain-computer interface space. And in an open development environment, there are some really cool apps — some that we can’t imagine — and I think this is going to lead to something that we’ve never seen before. We’ve never had access to this equipment at the consumer price-point before, and now with Emokit and OpenViBE, there are a lot of possibilities for apps, from controlling your music with an Apple iPod in your pocket, or even robotics research. We’ve never really had this before. You can even imagine this starting to work with smartphones like the Apple iPhone or Android phones.H+: How does Emokit work?

CB: Emokit — there’s not much to it. The library itself is dirt simple. Emokit proper — the actual library — talks to the EEG device using pywinusb and python-hid, depending on whether you are on Windows, OS X or Linux. Physically, the setup involves the Emotiv device, which transmits data over bluetooth, and the bluetooth dongle. Emokit gets a connection to the bluetooth-enabled device using a standard HID interface, and once it gets a connection, it gets 32 byte reports from the device that are encrypted. It decrypts them using standard AES, and once it decrypts them, it parses out the gyro data, a counter which seems to be for timing and it also parses out the actual sensor data. And then it just sends it to a queue that you can read from whatever you want, like a rendering interface. At the moment I am rendering with pygame, which beginning python programmers use to write video games.

H+: How would people use it?

CB: You instantiate the Emotiv object from Emokit, set the ID for the headset, then there’s a function that gives you a generator. You iterate over the generator to pop off data.

H+: That sounds simple.

CB: Yeah.

H+: What has Emotiv’s response been so far?

CB: I posted the announcement copy on their forums. They took it down within 2 hours, give or take a few minutes. There’s been a lot of hits. On the forum thread at the Emotiv forum there were 30 views by the time it was taken down. And then it was deleted. I figured most likely these people are viewing other news sites and they are going to hear about it that way, so it’s not a big deal. Overall, their forum moderator’s response is fairly typical.

H+: How do you think Emotiv will respond?

CB: As for how Emotiv is going to respond to any of this, there are a few different possibilities. They will probably just ignore Emokit. There is the possibility that they decide that fighting it in any way (like by ignoring it, which is a passive method of fighting) is not the way to go. As a result, they might relax the reigns on their software, or they might even put themselves behind this in some way. One way they might do that is by linking to it, in some way, or they might get involved in development. I find that scenario doubtful. There’s also the possibility that they will try to litigate or strong-arm me into taking it down, which won’t happen. They may well try, but it won’t be going down. They can do whatever they feel like, of course.

It’s clear that Emotiv is a company in the consumer brain-computer interface market. Basically, here’s what I would tell Emotiv. From a technical standpoint, the combination of Emokit and the OpenViBE toolkit is pretty ideal. OpenViBE is well known. It’s well respected and it’s quite established. From a business standpoint, Emotiv is spending a lot of money on software and they are limiting themselves as to who is going to buy it right now with their price point. There’s no way that open source developers will spend $750 for a toolkit that they can’t talk about. The lower price point is far better from a business standpoint because a lot more people are going to buy it if people can hack it and play around with it. A lot of people have been telling me that Emokit is exactly what they wanted, and they are now going to go buy an Emotiv. They’ve been holding out on buying Emotiv units.

Overall, the entire Emotiv EPOC system is very basic. Another company can come along and replace Emotiv pretty easily. They are missing out on a huge opportunity here, and time and again we see companies locking stuff down instead of harnessing developers. People like us are pushing this out to people, saying, “Hey go buy this, it’s cool, look at what you can do with it.” And the companies are missing out entirely on all of the benefits of social media and collaboration. Their current business plan is poor, to put it nicely. I think they are totally missing out.

H+: Who should buy an Emotiv?

CB: That’s a good question. At this point, if the Emokit project goes the way I want it to in the next week or two — then anyone who is interested in trying something new, interested in experimenting with something new, should pick it up. This includes budding transhumanists. Once the OpenViBE stuff is in place, it’s going to be wide open for hacking, by anyone.

H+: Who would be interested in using Emokit?

CB: Emokit is really simple. The target programmer is just about the average programmer. Your average programmer can understand the internals of Emokit if they wanted to. I think that people are going to use the OpenViBE module to talk to the Emotiv, and once that module is in place, you can use the drag-and-drop GUI to do things like raising and dropping a TIE-fighter. So that’s cool. The whole point of using OpenViBE though is so that you can pipe the Emotiv into any other software trivially, like games. Basically it’s like adding in new keyboard shortcuts or hotkeys. Once you have the Emotiv module for OpenViBE, there’s a ton that you can do with drag-and-drop programming and tying it into other code using a simple protocol. I bet that most people are going to use it that way.

Share this:

18 Comments

Friendly
April 10, 2013, 5:26 pm

Hello,
i’m not sure if i understand it right. Can i use the Emotic Epoc headset consumer edition with the openvibe software because of this hack or is it only a project to make it possible in the future?

I have been looking for screenshots showing a visual representation of brainwave changes (eeg) when supplied with a stimulus from a device like a nova pro. I am also looking for similar screenshots that show brainwave changes when a subject is asked questions. I am looking for software that will do this and save results in 10-20 second intervals and allow a researcher to come back to a marked spot and analyze.

Hey, I have been contemplating getting there hardware for some time now and i have a few questions i just don’t trust ‘them’ to answer since when i contacted them last well they where more than rude. I am very interested in developing for there hardware and don’t now if i should go the epoc route or the eeg route could some one give me a side by side of the differences as a developer? Are there any other similar companies? Has anyone else had these battery issues? Thank you : )

I have also had battery issues on the Epoc. Namely, my battery died. So when I tried to charge it, there would be a red then green flick on the led, and that was it. I was offered to purchase a new headset, since mine was out of warranty. At this point I saw a 3.7v, 600 mAh battery with a pcb (protective circuit board built in). Now looking for a local supplier – but may have to purchase a bunch to buy from an alibaba distributor.

Thanks for writing this. I really feel as though I know so much more about this than I did before. Your blog really brought some things to light that I never would have thought about before reading it. You should continue this, I’m sure most people would agree you’ve got a gift. Thanks for sharing…brain waves technology

Really nice information. It’s very helpful. I just need high res HMD to finish my set off for what I want to do. I just got a few more web cams for the winter run also, to take video of the fun/chaos I’ll be doing again. I wish I could have gotten a pic of the reaction of the company reps when they saw 3 EEG systems overlapping right after they said it wouldn’t work ROFL. I was like done, gone, it works, now I want to see others doing thing’s I wouldn’t think of. Though as you see it will not be shown on there forums. Thanks for sharing with us.
<a href="http://www.emotiv.com/"neural interface

I wondered how long this was going to take. I predicted by years end. You’re several months early.

WAY TO GO CODY!

Now, let’s see how long it will be before we begin seeing SL BCI plugins.

Or even better, since there are already apps to allow an Epoc to connect to an iPhone, let’s see how long before it gets crossed with the “AR Drone” iPhone app to allow for a thought controlled quadcopter RTU.

Good job cody, I fear they will come after you P. They didn’t like the first batch of us asking for unix porting. We got some harassment from the rep’s on it’s a no no type thing. I love the set but noticed some bug’s right off the bat. I really love the mesh of Emoitve epoc and OCZ NIA set’s, as they fit together nice. But both company’s have a stick up their @$$ so to say. Emotive is like the ferrari but with a ford or chevy engine as I put it to them. Yes they are trying to lock people out, and force them to go threw the main site to develop ROFL, with no unix support to boot. OCZ NIA has a similar thing of no support or DEV kit even, due to some contracting with brain gate if memory serves me right. Epoc, OCZ NIA, Neurosky all over lap with different pickup algorithms and pickup spots. The mesh of all 3 is a neat thing to play with, though I like separating the set’s on different computers and different functions set up on each. I just felt like I couldn’t talk about some of it due to the company PR line of no not allowed thing. I actually have a few gripes about the Emotive engine and set up for development, but figure I would just stay quiet for a while with the tinkering modding type stuff, till the storm hit’s like you, only we need more people to. Tip of the hat, I hope they don’t come after you P. as they where threatening to do to some of us at first. I want them to make money, but I also want them to loosen up with the development crowd, and open source crowd. They will still sell set’s, just not forced to sell the wetware product threw the main site with them taking a share of the profit from such or charging for what would be free otherwise. The first week and batch I bought all 3 set’s of EEG’s and overlapped them before they knew what to do LOL. I’ve gone some what silent after that and due to some of the response they had. I wonder if they erased my post’s P. The combinations of possibility’s are awesome, I’m still going threw some of them as I find them. Emotive and OCZ NIA are backwards in the approach they have for a business model and the reality of life in a development community, so to say. neurosky is ok for development but lacking in other way’s from the product. I love the visualization of multi-tasking to a point of total brain taxation and brain crashes/fart’s/crunching/collapsing/hay wiring. I just wish I could show more people than just a few local friends. That why I need more of you/your type, to not draw attention to me in the end. After the thing of threatening to send lawyers out I stopped posting on the emotive site, and went dark so to say. You did what they said they would send lawyers out for, just so you know. I’ll try to keep track of you to a point to see if that is true. I hope not, but I would like to know if so. Beyond the radar I seem to tread so often, and in very grey area’s that have no rules yet, to boot. I suggest the OCZ NIA with the Epoc set, I love it, and they fit together so good. Notice the heart rate pickup when you put the Epoc on a head vein? To much about the products to even post here, sry. P. Good work though I hope to see a lot more soon.

My set up is Emotive epoc, OCZ NIA, neurosky, on my head and P5 glove or keyboard or mouse on right hand and N52TE on the left hand or keyboard or mouse. I set up 10 computers in 1 room, but can only do 4 at most at a time. Though the combinations of functions I still fumble threw. I like 3 way some what with the touch screen in the middle. But I still have a lot to go threw before the winter crunch session I’m planning to do. I just need a high res HMD to finish my set off for what I want to do. I just got a few more web cam’s for the winter run also, to take video of the fun/chaos I’ll be doing again. I wish I could have gotten a pic of the reaction of the company rep’s when they saw 3 EEG systems overlapping right after they said it wouldn’t work ROFL. I was like done, gone, it works, now I want to see others doing thing’s I wouldn’t think of. Though as you see it will not be shown on there forums. Some games the epoc doesn’t work with, as it messes with the key layer they have on the set. I.E. bad design flaw. I so wanted to do a Q4 ( quake 4 ) video, but couldn’t with out altering some stuff they shunned at the time. Keep up the good work P. And I hope they don’t come after you. The trigger system was the tricky thing to set up at first with the right ns lag and key to map to, I took the first 2 week’s to refine it, and still play with it some. Old school pic of all 3 overlapping http://i869.photobucket.com/albums/ab251/LaboriousCretin/Picture037.jpg and separated on to 3 comps http://i869.photobucket.com/albums/ab251/LaboriousCretin/Picture049.jpg or http://i869.photobucket.com/albums/ab251/LaboriousCretin/Picture046.jpg and a link to out of box old school video on a multiplayer map getting used to epoc and OCZ mix before going online to play star wars with carmina burana http://www.youtube.com/watch?v=3jjqED1u5jA or my ghost in the shell run that was small enough for you tube HAWKS with diva for the P5 multi tasking test with visual distractions http://www.youtube.com/watch?v=N28VFzW7TEs . As you see I went their and then some Some of the best video’s Are to long to put up on you tube with the free account sry. I just recently got a video editing program for crunching the video into a faster play and shorter time frame to post on you tube. The games they give( emotive) as a demo where to weak and short. Hope this gives you some ideas. I would love to see other peoples ideas on this technology too. Neural boot camp and beyond P.

Even though this thing sounds like something the average person would probably never use currently, something tells me that they will be more common. The fact that even it can be hacked tell you that there is interest!

Unfortunately Emotiv is going to change the encryption for all new EPOC units. So the game of cat and mouse will continue.

I can’t imagine it would be too difficult to clone the EPOC hardware though. It’s basically just some electrodes, amplifiers, multiplexers, and a microcontroller. It would be nice to see an open hardware design for a 16-channel EEG, including CAD drawings for the circuit boards and plastic pieces.

The battery of the Epoc Emotiv can’t be replaced with a new one when it will end it’s life. You have to open (break) the headset and make some difficult soldering…….creating a headset with incredible interference/noise signals.

The Emotiv doesn’t give any instruction to help the consumer to change the battery. They say that the less costly solution is to trash the Epoc (and purchase a new one obviousely

So you have to purchase one headset every 2-3 years (the life of the battery).

Why didn’t they create a headset with a easy-removable battery?…..

Also you can’t find this information on their descriptions…..it’s a terrible secret!

Join Humanity+

Joining Humanity+ as a Full, Plus or Sponsor Member enables you to participate in Humanity+ governance and decision-making - an important role in the growing Transhumanist movement. It also, of course, gives you the opportunity to support us in the work Humanity+ does!