how should my LabVIEW program interact with Ganglion BLED112
Hello, I'm programming on LabVIEW a custom program that will work directly with Ganglion board measurements. I'm looking to skip the OpenBCI GUI to get the measurements with the least latency, the least software running and the least processing power spent on the acquisition part.
So far, I've found a toolkit for LabVIEW to enable BLE compatibility using BLED112; but the scan example in the toolkit isn't detecting my powered led blinking Ganglion board and definietly is a bit outdated with respect BLED112 drivers it expects to find. That and (I suspect) the custom nature of Ganglion's BLE communication.
The toolkit is not that well commented in the aspect that it explains bits of what it does but as if the user understands how BLED112 works, what it takes as a string through the COM port, what each element means and what of what of that is what is sends through BLE. Or how does the BLED112 composes what it received into the COM port string it sends back.
So I'd like some links or explanations on how my program should interface with the BLED112 dongle to find and establish connection with the Ganglion board. I confess my understanding of BLE protocol is still lacking, and the BLED112's COM port -> BLE comms transition is making the process of understanding it a bit more confusing; yet as far as I've got my understanding is that most of the standards of the protocol were dropped for the Ganglion board, leaving just the basic BLE communication structure and working on that towards a specific purpose custom BLE... well that's my understanding so far, sorry if this is too long, I'd appreciate any help, guidance, links or pointers to get a better grasp on the BLE aspect of Ganglion's entire process.
Thank you
Comments
Eduardo, hi.
My suggestion is that you try to network with Github user 'maltesen', by posting on this thread,
https://github.com/sccn/labstreaminglayer/issues/21
He is attempting to connect his LabVIEW (new) driver, to LabStreamingLayer. If that is completed, you would be able to receive the data stream of Ganglion via the GUI. The GUI can create an LSL output stream from Ganglion. This sounds like the easiest approach provided you can coordinate with him. More background on LSL here,
https://github.com/sccn/labstreaminglayer/wiki
re: BLED112 docs. There is a documentation list available with all commands.
https://www.silabs.com/products/wireless/bluetooth/bluetooth-low-energy/bled112-bluetooth-smart-dongle
And the source for our driver is in the Hub,
https://github.com/OpenBCI/OpenBCI_Hub/blob/master/src/background.js
If you had a Cyton instead of Ganglion, there is already a LabVIEW toolkit available for that, see the search box.
https://openbci.com/forum/index.php?p=/discussion/274/labview-openbci-toolkit
Regards, William
Thank you, I'll check the resources you linked, I'll add another answer later with my results
So far I was able to interface with the BLED112 dongle with the specific document:
https://www.silabs.com/documents/public/reference-manuals/Bluetooth_Smart_Software-BLE-1.8-API-RM.pdf#[{"num":429,"gen":0},{"name":"XYZ"},0,712.61,0]
Once more thank you for the links and I'm moving forward into trying to establish connection with the Ganglion board. If I have any trouble on that part, that would be out of this thread's subject. This thread can be closed, thank you.
Eduardo, did you try reaching out to Github user 'maltesen' ? LSL is used by many engineers in the BCI field.
Feel free to continue to post in this thread regarding any LabVIEW capabilities.
I just asked maltesen on that Github issue thread, if he has any updates. His last post was in May.
Eduardo, check out Maltesen's latest post on Github,
https://github.com/sccn/labstreaminglayer/issues/21#issuecomment-531658711
https://github.com/maltesen/liblsl-LabVIEW
For comparison, also see the Github referenced here for Cyton serial port LabVIEW,
https://forums.ni.com/t5/Example-Program-Drafts/LabVIEW-OpenBCI-Toolkit/ta-p/3495333?profile.language=en
https://github.com/rcassani/OpenBCI-Toolkit-LabVIEW
My guess is that tweeking Maltesen's code is going to be much much easier than doing a BLED112 driver from scratch.
Regards, William
Thank you, I'll check it out, I'll probably implement it later on, for now I'm sending directly the codes I need depending on the context, I'm short on time and can't properly check the code you recommended at the moment. If I get the time to expand into a full application, I'll give the code you shared the time it deserves to understand it and implement it.
As a side note, I experimented a bit with the SDK from BLED112's description page and got educated in the difference between an attribute handle and an attribute UUID, so now I'm fully able to communicate with the ganglion board as intended and explained in Ganglion's SDK official page.
Great, let us know if you post your code at Github or elsewhere.
By "post your code", I'm referring to EITHER your code for direct access to the BLED112 serial port from LabVIEW (and decoding data stream / sending commands) -- or implementing what LabVIEW calls a "toolkit" that gives full GUI dataflow access to the OpenBCI device element and channel streams.
We would appreciate your making any of these LabVIEW techniques available for Ganglion users, since currently only the Cyton LabVIEW toolkit is available. Open source code access could enable other LabVIEW users of Ganglion.
Thanks,
For now the code is too specific for my application to be of use for that many, I'll publish everything and share it here once it's complete regardless.