openbci-archive / OpenBCI_LSL

An application for establishing an OpenBCI stream through the Lab Streaming Layer (LSL)
54 stars 32 forks source link

Establishing a serial connection in Windows #10

Open lithiumgold opened 6 years ago

lithiumgold commented 6 years ago

When I run:

python openbci_lsl.py --stream

it outputs the following:

-------INSTANTIATING BOARD------- Traceback (most recent call last): File "openbci_lsl.py", line 56, in main(sys.argv[1:]) File "openbci_lsl.py", line 40, in main lsl = streamerlsl.StreamerLSL(GUI=False) File "C:\Program Files\MATLAB\OpenBCI_LSL\lib\streamerlsl.py", line 46, in init self.initialize_board(autodetect=True) File "C:\Program Files\MATLAB\OpenBCI_LSL\lib\streamerlsl.py", line 59, in initialize_board self.board = bci.OpenBCIBoard() File "C:\Program Files\MATLAB\OpenBCI_LSL\lib\open_bci_v3.py", line 77, in init port = self.find_port() File "C:\Program Files\MATLAB\OpenBCI_LSL\lib\open_bci_v3.py", line 599, in find_port raise OSError('Cannot find OpenBCI port') OSError: Cannot find OpenBCI port

Where can I find the [port] for my device? I have a Ganglion.

Also, how do I change the init function in open_bci_v3.py to establish a serial connection in Windows?

Paul-Cochet commented 3 years ago

Hi, I am currently encountering this issue as well, is there any fix for it?

I tried looking for the problem's source. I believe the problem is not with this code. I tried isolating the serial function calls and they returned nothing. Since the serial python lib is not the problem, that means the port isn't open.

This means that the problem is coming from how the port was opened (I used the GUI). Here is what I did: I turned on the headset (cyton, not daisy, already set up), started my session (on cyton), started the data stream, went to networking, changed it to LSL, selected FFT for the first stream channel, and started it.

I could really use help on this as I am quite lost on what to do next.

work07 commented 3 years ago

Turn off the OpenBCI, plug out dongle, connect back dongle again, then turn on OpenBCI.