OS X + Ganglion + Python possible?
What I'm trying to do: live stream raw data from the Ganglion into a Python application on OS X via Bluetooth. I'm doing this so that I can run some ML on the signal to try and analyze user EEG activity.
Problem I'm running into: OpenBCI Python requires bluepy, which is Linux-only. From my research, people running virtual machines on OS X to get around this still can't properly connect.
Where do I go from here? Can I get around this and use OpenBCI Python with the WiFi shield? Would this be any different/easier on the Cyton? Is there some other way to get a live stream of the raw data from my Ganglion (or Cyton) on OS X so I can process it in Python?
Comments
https://github.com/OpenBCI/pyOpenBCI
The pyOpenBCI repo states: "Ganglion works on Linux only (Linux VM with enabled Bluetooth works as well)." So I would at least give that a try. Mac's differ in their Bluetooth hardware, so your friend's experience might be because of older Bluetooth hardware.
Unfortunately the pyOpenBCI does not support the BLED112 dongle yet.
Another approach you could take is to run the GUI on Mac to receive from Ganglion. Then use the Networking Widget in the GUI to output a LSL LabStreamingLayer stream. Python can then read LSL.
https://github.com/sccn/labstreaminglayer/wiki
This same approach could be used with Cyton or Wifi Shield.
Regards, William
@wjcroft Thanks for the info! Looking into this!
My understanding was that Python direct access to the BLED112 was in the queue somewhere. And if you search on the forum here, I believe one or more users were also considering giving it a try. Using the BLED112 Javascript code in the Hub as a template / inspiration.
https://www.google.com/search?as_q=bled112+python&as_sitesearch=openbci.com
This guy below has Python talking directly to the Hub process. Frankly I believe the LSL route is more viable.
https://openbci.com/forum/index.php?p=/discussion/2269/newly-available-python-client-using-openbci-hub-for-ganglion-on-windows-os
I'm seeing a LOT of issues in the OpenBCI Python repo.
Here it is, still open: https://github.com/OpenBCI/OpenBCI_Python/issues/115
Neither OpenBCI_Python nor pyOpenBCI repos understand how to speak to BLED112 directly.
My impression is that the LSL output stream from GUI, read by the LSL Python library functions, should be a viable solution.
Many thanks to you two. I’ll give the LSL avenue a try and report back if it works.
@alias123 This will work for now until the functionality is added to use a Python library with Ganglion.
It works
https://github.com/OpenBCI/OpenBCI_GUI/blob/master/Networking-Test-Kit/LSL/lslStreamTest_3Streams.py