-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protocol Advice #42
Comments
I think I figured it out enough to use it eventually. It looks like the Muse 2 and Muse S are BTLE devices. They dont' need pairing. They expose GATT characteristics under the primary service 0000fe8d-0000-1000-8000-00805f9b34fb . The control GATT characteristic has UUID 273e0001-4c4d-454d-96be-f03bac821358 and acts like a serial port. Data is available as property change notifications in dbus on linux, but not as raw reads to the value. Bytes are written to the serial port as an array, first the length of a command as a byte, then each ascii character. Some commands are, from muse-js: Data is streamed out via 'Value' property changes once the resume command is sent, i.e. the 3 bytes '\x03d\n'. characteristics seem to be: These are more fully enumerated in the muse-lsl source code and at Enigma644/ix-muse-player#1 (comment) . |
I can't figure out where the gyroscope multiplier comes from. Where would I find what IMU the Muse 2 uses? |
presets:
data channels (one for each gatt uuid):
There is also some old information on presets at https://sites.google.com/a/interaxon.ca/muse-developer-site/museio/presets . That site also enumerates the serial commands. |
Depending on your language there are different bluetooth libraries available. In python, there's a list at https://github.com/ukBaz/python-bluezero/wiki and the Bleak project looks promising: https://github.com/hbldh/bleak |
Playing around with accessing the data also, and having some problems. Not related to muse-js specifically, but you seem to have some idea of how to access the things in general so I thought I could maybe ask here.
I have tried to read up on dbus, but it is not completely clear to me how I should use this. Using
Do you have an example of how I would send this resume command? I tried the Maybe a simple example, such as how to show the battery status over dbus, would allow me to figure out the rest by myself. Thanks for any help, and sorry for maybe going off topic in the issue. Hard to find good resources on this. |
There's actually an official Muse page on this archived somewhere, but I don't know where. it could be fun to make a muse serial terminal, but there are so few commands, and they haven't been expanded (I decompiled the Muse app for the Muse S and didn't see any new commands, although they do take new arguments), so it makes more sense to just work on improving an interface like muse-lsl or muse-js |
Okay, yeah I have used muse-lsl and wanted to port it or make something similar in Julia. Then I realised I could not run muse-lsl anymore on my linux since it was using pygatt which complained that I didn't have gatttool or something along those lines. From what I could read gatttool was not used with BlueZ anymore so I assume it might get updated, but in the meantime I set out to understand how to create the communication from scratch (interesting learning more about bt). That is how I got into trying to use the commandline tools to just see if I can send simple commands and get responses. I feel like this might be a bigger task then I realistically have time for right now so might put it on ice, but will for sure try to come back to it at some point. |
it's not hard to make a commandline tool to do that |
Is anyone discussing how to code for these devices anywhere? Would this wiki be a place?
I'm trying to manually access my Muse S and I keep getting access error reading from the gatt data, or trying to bond. What am I missing?
The text was updated successfully, but these errors were encountered: