So Ale, this is the contents of the file you sent me... I was looking at the MindWave parsing stuff. They have a "Dummy" data generator for testing - which is very nice. Looking at that I thought I could figure out what to expect from the MindWave device.
In the dummy generator they are creating 2 bytes AA & AA ... THE SAME MAGIC NUMBER MRL & MRLComm.ino USE !! .. what are the odds? ;)
Anyway I don't see the signature in the file.. but I do see the pattern of 3F 3F .. it might be because they changed it .. or it was re-interpreted do to type casting .. I'll look into this later..
It goes MAGIC | MAGIC | SIZE | 2 BYTE SIGNAL QUALITY | 2 BYTE ATTENTION | 2 BYTE MEDITATION | CHECKSUM
In the packet 04 seems correct - dunno what its sending but its 2 bytes short from the dummy one.. looks to have a checksum on the end to (purple square)
The Matrix Revisited
Neo would be proud.
Boy I get dizzy if I look at that too long.
So - what I guessed seems
So - what I guessed seems like its correct .. I found that they occasionally send more data - don't know in what context this occurs.. perhaps "blink" ? But there is a larger message with Magic Number & Size (Green) .. this time they are sending 32 bytes with the Red checksum at the end
RED - Magic & Check Sum
GREEN - Size
ORANGE - Data .. might be a blink in there ;)
@ grog whoo hooo...so the
@ grog whoo hooo...so the blinky is hidden in the long message?
So if data length is > 4 ->
So if data length is > 4 -> blinky detected -> close hand
Tell me what is the next step
Tell me what is the next step grog..
Right now we have seen just
Right now we have seen just data ...
But what we want to see is .... "cause" ----- and ----> "effect"
We want the details of the protocol which I think is this document
http://wearcam.org/ece516/mindset_communications_protocol.pdf
And we'll use some of the Java code they gave us.
The documentation is strange. It's has a lot of "detail" but a diagram would have been much better (and much shorter)
Ehi grog... I downloaded and
Ehi grog... I downloaded and tested this app on my phone and it works great !!!
https://play.google.com/store/apps/details?id=res.juanhg.hellomindwave
Searching on Google I ve found it s open source !!!
Maybe we can see inside this app to learn how him parse the data coming from the Bluetooth
https://github.com/juanhg/MindWaveEye
Ehi maybe I found another
Ehi maybe I found another interesting stuff :
A java socket library
http://crea.tion.to/thinkgear-java-socket/
https://github.com/borg/ThinkGear-Java-socket
The parsing makes sense, but
The parsing makes sense, but the data is still goofy .. it's 3F 3F - try to do a session as before and write the rx.data file with this update ...
https://drive.google.com/file/d/0BwldU9GvnUDWRFhqdW83X3pvbE0/edit?usp=s…
in it I'm saving data with the bits shifted over .. lets see if that makes a difference...
Got it ... That was it ...
THERE IT IS 2 AA AA !
been looking at the Matrix too long... The Blonde looked funny...
Now its time to run it through the parser...
GAAHHHHH !
This thing is crap ! ... The checksum is messed up and the instructions are absolutely inane !
I give you an example :
i compiled mindwavetest by
i compiled mindwavetest by fivedots and then i tried to run it :
This is how the folder looks like after the compiling :
Bitness issue - he has a 32
If if found the dll (first challenge) - and still blew up - then it's probably a
bitness issue - he has a 32 bit dll I think - on a 64 bit jvm - make no worky
JNI is a PITA - that's why I wanted the pure Java parsing to work .. really there is no reason why it should not work in Java.. if the code was correct.. which I do not believe it is...
Tried a different hex editor
Tried a different hex editor - but it still did not get me what I wanted.. I wanted to just copy the hex values out. doesn't seem that much to ask for
Here's a 32 byte "blinky" data packet .. mebbe its a blink
and a 32 byte "no blinky" data packet
Whoosh .. that took some
Whoosh .. that took some work.. but I extracted all the 32 byte packets out of the blinky file - fortunately there was a nice text editor that actually let me copy .. without it would be even more PITA
Here's Blinky