Skip to content

jabituyaben/DreemEEG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

The Dreem band streams EEG data when you need to check the band is fitting correctly. You can use this feature to stream data from what I think is 4 channels of EEG, the major caveat to this is that the data is only 8 bit. There's actually a lot more data that gets sent but I've only looked at the larger arrays that are EEG.

I use the ConnectDreem script to stream the data from the band using bluetooth and then the parseDreem script to process the bin file that is created - in this example it just shows the different indexes and their size and then displays a spectrogram from one of the EEG channels. The graph that you see in the Live EEG part of the Dreem app actually takes into account all 4 channels and shows the delta signal between the front and rear sensors, I've not looked into which channel relates to which sensor yet. The data that's sent from the band is separated by a kind of index for the different arrays and they come in at somewhat random order so I just create a dict with the indexes and then the values between these, which are 3 8bit numbers - at least for the EEG signal anyway. Some of the other arrays might be a different bit-length but I doubt it.

The streaming script doesn't have any disconnect handling in it so if you wanted to run this for longer you'd need to build that in, for me it usually lasts around 10-15 minutes before bluetooth does what bluetooth does and cuts out. If it only lasts 20 seconds or so then you've sent something in the gatt writes that the band didn't like so it won't trust you. Easiest thing to do is get the android app and then look at the bluetooth HCI logs and literally just copy the BLE write order as you see it in there - it shouldn't be too different to what I've got so you can look out for a similar order.

The scripts were made quick and as a POC, I don't get the time to refine these to be super user friendly but hopefully it's mostly self explanatory and brief anyway.

About

realtime but kinda low quality EEG data export from the Dreem & Dreem 2 band

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages