brainflow-dev / brainflow

BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
https://brainflow.org/
Other
1.32k stars 332 forks source link

Add autodiscovery of serial ports #187

Open Andrey1994 opened 3 years ago

ankur-gupta-29 commented 1 year ago

Hi I want to solve this problem .can you want little help from you.How can I proceed for this issue.and explain little more about this problem .

Andrey1994 commented 1 year ago

Sure and thanks!

There are some boards where we have to provide serial port via BrainFlowInputParams struct, e.g. cyton, freeeeg32, ganglion

If its not provided we return an error.

Instead error we can try to find serial port automatically, and it should be done for all 3 OSes

MaxMascini commented 1 week ago

Any updates on this issue?

I've tinkered on it a bit and while searching through serial ports I keep getting an issue when trying to connect immediately after finding a compatible port where i often get:

[2024-11-13 18:12:43.919] [board_logger] [error] board doesnt send welcome characters! Msg: BOARD_NOT_READY_ERROR:7

Sometimes it connects successfully, but the issue I'm having is for hyperscanning purposes where I'm trying to scan ports for and connect two boards within the same script. Occasionally both will successfully connect, but it is very inconsistent.

Any ideas?

This is using OpenBCI Cyton Board(s), Windows 11, brainflow==5.14.0.

Update - instead of connecting to every available port to find those compatible, I instead opted to assume that if the port matches the VID/PID of the board it is compatible. This makes it much faster however the issue mentioned above is still occurring. - Is there a place where all of the Brainflow compatible device PID/VIDs can be accessed for this purpose?