Phonegap / Cordova Bluetooth library


#1

Hi all,

I want to build an app connected to the Muse.
As i’m not familiar with native app development I want to build something using Cordova / Phonegap. I’ve seen posts before so I know there’s no plugin yet. As a start I’m trying various bluetooth plugins, till now i could not connect to the Muse successfully. I’ve tried https://github.com/randdusing/BluetoothLE and https://github.com/don/BluetoothSerial.
Is there anyone that knows a good bluetooth plugin?
And, does the Muse work with Bluetooth or Bluetooth LE?

Thanks,

Peter


#2

I believe the Muse works with Bluetooth 2.0, but not with every bluetooth interface. But if the device is only a couple of years old this should not be a problem. A bigger problem is the protocol. The documentation says that iOS doesn’t support a high enough bitrate, which I find peculiar, but then again I am no iOs expert. So anyway, the samples are “compressed” using a couple of different variable bitlength encoding schemes.

I am trying to write a parser in Python, but so far my Parser is certainly doing something wrong, because it always has too many bits left over from a packet. But I imagine this protocol will be even more delightful to implement in javascript!


#3

Hi - kinda late to this thread but I wondered if you had gotten further. I’ve gotten the Muse to connect via the BluetoothSerial package and can get the version and status information out of the headset. But now I’m on to reading data in Javascript. I’m still not positive that a Javascript application will be able to keep up but I wondered if you had methods for parsing the raw data. I’ve been using https://musesharp.codeplex.com/ as a coding basis but, while it is nicely object oriented, it doesn’t translate as well as into Javascript as I’d like. I’m mostly struggling with parsing compressed data.

I don’t know if the Muse folks read these posts but it would be great to open source some code. I’m not looking for, as I’ve seen it put, “secret sauce”. I’m looking for a nice implementation on how to get raw data out. Yes, the docs are ok but a reference implementation would be incredibly helpful. This is especially true for the compressed data.


#4

Hi, I’m new to Muse, and signed up for this community. Although this thread is old I’d really like your advice.

A couple of us have successfully connected Muse over Bluetooth to an android device using Matt Triff’s cordova-muse plugin:

The plugin was last updated about a year ago. However it uses libmuse v1.0.1, whereas libmuse 5.8.0 was released in May. Those of you who know the Muse, do you think it’s reasonable for us to use it, given that it seems to work but uses an older API?

It seems that a cordova app enabling use on both IOS and Android would be good for Muse. I notice they have code built on Unity available to developers. Any chance they will undertake development of an updated cordova plugin (at least for android if not for IOS)?

Thanks in advance for your advice!


#5

Hi,

Thanks for all of your interest in developing for the Muse headband. We would like to support our developers as much as we can but currently all of our resources are dedicated to providing SDK support for desktop platforms. In the short term, we will not be able to provide a cordova plugin for muse but we would definitely explore this in the long term. However, if anyone has the time and passion to update mtriff’s repo to support our latest SDK, we will be glad to help answer any questions you guys have.

Best Regards.