The hemokit package

[Tags: library, mit, program]

This package allows reading raw data from the Emotiv EPOC EEG devices.

It is inspired and based on the code of the Emokit project (, but entirely written in Haskell.

It contains an extensive, well-documented library for connecting to devices, decrypting the stream, and parsing the relevant data out.

Data can be read from a given device via HIDAPI-hidraw or a dump file; reading from multiple devices is supported and when only one EEG is to be used, the correct device is automatically selected.

There is also an executable, hemokit-dump, that can print out

in both their plain form and as JSON, and optionally serve any of this via Websockets.

[Skip to ReadMe]


Versions0.4.0, 0.4.1, 0.4.2, 0.5, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6
Change logNone available
Dependenciesaeson (>=, base (==4.*), base64-bytestring (>=, bytestring (>=, cairo (>=0.12.4), cipher-aes (>=0.2.0), conduit (>=1), deepseq (>=1.2), deepseq-generics (>=0.1), gtk (>=0.12.4), hemokit, hidapi (>=0.1.2), mtl (>=2.1.2), network-simple (>=, optparse-applicative (>=0.11), pretty-show (>=1.0), robot (>=, split (>=0.2.2), svgcairo (>=, text (>=, time (>=1.4), transformers (>=, vector (>=0.9), vector-fftw (>=, websockets (>= [details]
Copyright2013 Niklas Hambüchen <>, Patrick Chilton <>
AuthorNiklas Hambüchen <>, Patrick Chilton <>
MaintainerNiklas Hambüchen <>
Home page
Bug tracker
Source repositoryhead: git clone git://
Executableshemokit-headmap, hemokit-fft, hemokit-dump-conduit, hemokit-dump, hemokit-mouse
UploadedWed Aug 19 03:36:56 UTC 2015 by NiklasHambuechen
Downloads2019 total (23 in last 30 days)
0 []
StatusDocs available [build log]
Last success reported on 2015-08-19 [all 1 reports]




fftEnable apps that use FFT. Needs fftw installed.EnabledAutomatic
headmapBuild the headmap. Needs GUI libraries installed.EnabledAutomatic
mouseBuild the app that controls the mouse with the gyroscope. Needs Xorg and related libraries installed (so it only works on Linux for now).EnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees

Readme for hemokit-0.6.6


Haskell library and tool suite for the Emotiv Epoc EEG, inspired by the Emokit code.

It currently only works on Linux and Windows - patches for other platforms are welcome, they should be trivial.


You can download pre-built binaries here, or build it yourself via cabal install hemokit.

Library Features


Hemokit comes with example programs to

Note that we have to use sudo in most of the cases because the HIDAP-hidraw implementation reads directly from a device file.

hemokit-dump - Examples

hemokit-dump can print EEG data, format it as JSON, serve it via TCP or Websockets, and read from real devices and dump files.

Connecting with other Programs

t = tcpip('', 1234);
data = fscanf(t, '%d');