Problem connecting to NeuroSky MindSet with high COM port

Making & changing hardware drivers in Acquisition Server
Post Reply
cycon
Posts: 11
Joined: Mon Apr 19, 2010 2:50 am
Location: San Francisco, CA
Contact:

Problem connecting to NeuroSky MindSet with high COM port

Post by cycon »

Hey all-

Thanks for adding NeuroSky MindSet support to the recent OpenViBE release!

I downloaded the pre-compiled binaries for Windows, but ran into a problem with the acquisition server detecting my MindSet. As you can see from the attached image below, my MindSet receives a high COM port under Windows XP - COM41 in my case. However, OpenViBE only appears to search as high as COM16, and I can't manually tell it to look any higher in the Device configuration menu as the dropdown doesn't display correctly.

I am using the Toshiba Bluetooth stack under Windows XP (32 bit SP3), as the Toshiba stack is what is distributed by NeuroSky with the MindSet's driver disk.

I figured this should be an easy patch to contribute and using a copy of Visual Studio 2008 Express have successfully compiled from latest SVN trunk (r2258), however the NeuroSky MindSet is not listed in my newly-compiled acquisition server. Is there some special setting I need to enable to build the driver?

Finally, I attempted a build under Linux (this time using source from the pre-packaged 0.7.0-svn2254 release), but noticed a warning message that the MindSet was only supported under Windows. I haven't delved into it too far myself, but they do publish a document covering the serial communications protocol for coding directly to the Bluetooth device, instead of depending on any platform-specific libraries. Was that used or considered for the current acquisition server driver?


Cheers

Steve Castellotti

OpenViBE COM Port Issue
OpenViBE COM Port Issue
openvibe-mindset.jpg (150.38 KiB) Viewed 18135 times

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Problem connecting to NeuroSky MindSet with high COM port

Post by lbonnet »

Hi steve !

Indeed, the Neurosky Driver only checks COM port from 1 to 16. There is 2 main reasons for that choice :
- The neurosky installation guide asks to use the lowest COM port available.
- The driver has to scan "all" COM ports to check if 1 or more MindSet are connected. But there is a problem : if I check a lot of COM Ports, it takes a long time. Some COM ports are returning a connection available, but fail on the status request. It happened to you on COM7 and COM8. These COM ports have no MindSet connected of course, but it takes some times to check it.

I chose to limit the scan to COM port 1 to 16, for the initialisation to be reasonable in time, without limiting the number of MindSets you can connect.

I will certainly discuss this problem with my co-workers, to see if a better solution exists.
For now, to use The Neurosky Driver, you have to install your device Dev B on COM port < 17.

Best regards

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Problem connecting to NeuroSky MindSet with high COM port

Post by lbonnet »

Hello,
For now, to use The Neurosky Driver, you have to install your device Dev B on COM port < 17.
I am not really sure I was clear there :)

You have to delete the previous "MindSet" connection in the Bluetooth manager. Then try to add a new connection, the way it's shown in the MindSet user manual. When you're asked for a COM Port number, be sure to select a port < 17.

I hope this will be much more clear.

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

cycon
Posts: 11
Joined: Mon Apr 19, 2010 2:50 am
Location: San Francisco, CA
Contact:

Re: Problem connecting to NeuroSky MindSet with high COM port

Post by cycon »

lbonnet wrote:
For now, to use The Neurosky Driver, you have to install your device Dev B on COM port < 17.
I am not really sure I was clear there :)

You have to delete the previous "MindSet" connection in the Bluetooth manager. Then try to add a new connection, the way it's shown in the MindSet user manual. When you're asked for a COM Port number, be sure to select a port < 17.

I hope this will be much more clear.
Haha, no I understood what you meant and had no trouble getting OpenViBE to recognize the MindSet after doing exactly that. The Toshiba stack picked COM40 by default for whatever reason (and won't let you change it without deleting the old entry) but that's no big deal.

cycon wrote:I figured this should be an easy patch to contribute and using a copy of Visual Studio 2008 Express have successfully compiled from latest SVN trunk (r2258), however the NeuroSky MindSet is not listed in my newly-compiled acquisition server. Is there some special setting I need to enable to build the driver?

Finally, I attempted a build under Linux (this time using source from the pre-packaged 0.7.0-svn2254 release), but noticed a warning message that the MindSet was only supported under Windows. I haven't delved into it too far myself, but they do publish a document covering the serial communications protocol for coding directly to the Bluetooth device, instead of depending on any platform-specific libraries. Was that used or considered for the current acquisition server driver?
Any thoughts on these questions?

Any idea why the MindSet driver didn't build by default under Windows when starting from SVN? Do I need to drop the ThinkGear Communications Driver from NeuroSky into the tree somewhere?

As an aside I am currently working my way through implementing the MindSet Communications Protocol for directly parsing from the Bluetooth serial device so I can get my own project completely supporting the hardware under Linux. Even though similar work has obviously already been completed for the OpenViBE acquisition server, might my driver be of use in gaining Linux support if the current OpenViBE driver does not in fact support the platform for some reason?


Cheers

Steve Castellotti

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Problem connecting to NeuroSky MindSet with high COM port

Post by lbonnet »

Hi steve... and sorry for the late reply !
I figured this should be an easy patch to contribute and using a copy of Visual Studio 2008 Express have successfully compiled from latest SVN trunk (r2258), however the NeuroSky MindSet is not listed in my newly-compiled acquisition server. Is there some special setting I need to enable to build the driver?
If the driver is flagged unstable, you need a setting to see it in the acquisition server :
openvibe.conf :

Code: Select all

AcquisitionServer_ShowUnstable = true
However Im pretty sure the neurosky driver is not flagged unstable at this revision (2258) so maybe there is another problem...

Are you sure that the build script you are using compiles your modified acquisition server ? If you modified your local trunk (e.g. C:\openvibe-repository\openvibe-applications\acquisition-server\trunc\), it should be compiled by the default build script, but if you created a specific branch (e.g. C:\openvibe-repository\openvibe-applications\acquisition-server\branches\steve-driver\) you need to set its path in the init-env script.

Other idea...
To compile the acquisition server with the neurosky driver, you must have a variable defined, called TARGET_HAS_ThirdPartyThinkGearAPI. This variable is set only if the cmake script FindThirdPartyThinkGearAPI.cmake has found the neurosky libs and headers. If it found the API, a message should be printed in the console at build time. Please send us the build log, we can check that !

I hope this helps...
Finally, I attempted a build under Linux (this time using source from the pre-packaged 0.7.0-svn2254 release), but noticed a warning message that the MindSet was only supported under Windows. I haven't delved into it too far myself, but they do publish a document covering the serial communications protocol for coding directly to the Bluetooth device, instead of depending on any platform-specific libraries. Was that used or considered for the current acquisition server driver?
Indeed, this version of the driver is based on neurosky API, that works only under windows. I didn't look at the protocol specifications, and I don't think I will have time for that now. But it seems like a nice contribution to make for the project ;)

Finally, I have some news for the Emotiv EPOC driver... I am currently finalizing the code, to be sure to have a stable signal and no bug remaining. So far everything seems fine, but we need some extra-testing to be sure ;-)

Best regards

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

cycon
Posts: 11
Joined: Mon Apr 19, 2010 2:50 am
Location: San Francisco, CA
Contact:

Re: Problem connecting to NeuroSky MindSet with high COM port

Post by cycon »

lbonnet wrote:Indeed, this version of the driver is based on neurosky API, that works only under windows. I didn't look at the protocol specifications, and I don't think I will have time for that now. But it seems like a nice contribution to make for the project ;)
That must be it right there - I didn't place the NeuroSky API headers in any place the OpenViBE build process would have been aware of.

I've finished up my work on reading directly from the serial device, and have released a software package that allows NeuroSky's JSON server for their hardware to now work under Linux. I'm currently adding a friendly GUI on top and then will package it all for various distributions.

Getting that driver to work with OpenViBE might make a nice follow-up project, especially if it brings support for that hardware to Linux. I will have to brush up on my C++ though, perhaps writing a Python wrapper or extension which might make an interesting project in and of itself.

I will let you know how it goes either way, I may run into questions along the way![/quote]
lbonnet wrote:Finally, I have some news for the Emotiv EPOC driver... I am currently finalizing the code, to be sure to have a stable signal and no bug remaining. So far everything seems fine, but we need some extra-testing to be sure ;-)
Hey that's excellent news!

I would be happy to help test prior to a release if you want to message me directly (or through the forums is fine too).


Cheers

Steve Castellotti

Franck Dernoncourt
Posts: 1
Joined: Sun Jul 22, 2012 1:56 am
Contact:

Re: Problem connecting to NeuroSky MindSet with high COM por

Post by Franck Dernoncourt »

I have the same issue as cycon: I have downloaded openvibe-0.14.3-svn3350-src and compiled it, however the NeuroSky MindSet is not listed in my newly-compiled acquisition server.

I set "AcquisitionServer_ShowUnstable = true" in openvibe.conf (actually it was already set to true) and added "ADD_DEFINITIONS(-TARGET_HAS_ThirdPartyThinkGearAPI)" in \openvibe\openvibe-applications\acquisition-server\truncCMakeLists.txt.

In \openvibe\local-tmp\openvibe-applications\acquisition-server\trunc\CMakeFiles\OpenViBE-acquisition-server-dynamic.dir\src\neurosky-mindset I can see that ovasCConfigurationNeuroskyMindset.obj and ovasCDriverNeuroskyMindset.obj were created. Yet, no NeuroSky MindSet is listed in the newly-compiled acquisition server:

Image

The build log is enclosed to this post.

Any idea how to have the NeuroSky MindSet listed in the newly-compiled acquisition server?

Thanks for your help,
Franck
Attachments
OVbuildLog.log
Build log
(209.55 KiB) Downloaded 357 times

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Problem connecting to NeuroSky MindSet with high COM por

Post by yrenard »

Franck,

you have to download and install Neurosky SDK properly before the build. Check the cmake-modules to have a clue how the SDK files are looked for.

Best regards,
Yann

Post Reply