Muse Communication Protocol Implementation


#1

Hi,

I’m developing the firmware for an embedded system which will connect to Muse and retrieve data from Muse.
My system is running a simple task scheduler which is written in C, and it is not possible to use LibMuse.
Is there any open-source implementation of MCP (in C or other programming languages), or I will need to write it myself?

Thanks,
Kelvin

edit: I can handle the serial communication, but the Bluetooth Packet Structure http://developer.choosemuse.com/prot…cket-structure looks like a lot of work for me


#2

I don’t know who did it, but check out https://musesharp.codeplex.com/

I’ve been writing an Arduino version myself using an HC-05 for bluetooth. It’s mostly just a pain figuring out the bit shifting as some things are little and some big endian. Right now I’m just pulling out the battery, temperature and accelerometer data, so I’ve not got to the hard stuff yet!


#3

Thanks for pointing to the useful link and sharing your progress.
As for myself, I’ve spent a hard time struggling with the TI Bluetooth stack for MSP430 and I’ve just managed to get the SPP up a few days ago. It’s still buggy, though.
Maybe we can add the link to Muse# project in the FAQ, just in case someone might need it.


#4

Hi Kelvin,

You can find my code here:

In muse.c, you will find a simplified interface, in muse_pack_parser.c, you will find my implementation of the decoding algorithm.

If you go there:

And look for muse_pack_parser_testbench.c, you will find a sequence of tests to validate the decoding algorithm.

Feel free to ask if you have any questions,
Fred


#5

I’m also trying to implement it for Arduino. How is your project going?

I got everything but I haven’t uncompressed compressed packets yet, I’ve just been using the uncompressed ones.

And, I haven’t converted the raw mv data to anything like frequencies yet.