openbci-archive / OpenBCI_LSL

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

Connect fail to the board in the GUI #5

Open rodrigohubner opened 8 years ago

rodrigohubner commented 8 years ago

Hi everyone!

I can't connect the software to the board on GUI mode. When I click on the "Connect Board" buttom, the follow message show on the terminal:

$ python openbci_lsl.py Detecting board settings... /dev/ttyUSB0 False

-------INSTANTIATING BOARD------- Connecting to V3 at port /dev/ttyUSB0 Traceback (most recent call last): File "/home/rhubner/BCI/OpenBCI_LSL/lib/gui.py", line 298, in connect_board self.lsl.board.disconnect() #close the serial AttributeError: 'StreamerLSL' object has no attribute 'board'

The configuration in the GUI seems correct. My port is /usb/ttyUSB0 and daisy is set to 'false'.

The error showed doesn't related to the 'self.lsl.initialize_board(port=port,daisy=daisy)', but the line 298 (self.lsl.board.disconnect() #close the serial). So, I couldn't understand why the 'initialize_board' fail and why the object 'self.lsl' lost the reference.

294 try:
295   self.lsl.initialize_board(port=port,daisy=daisy)
296 except:
297   self.lsl.board.disconnect()  #close the serial
298   self.console.setText("  Error connecting to the board")
299   print("Error connecting to the board") 
300   return
gabrielibagon commented 8 years ago

Which did you enter in the "Port" field - "/dev/ttyUSB0" or "/usb/ttyUSB0"? Double check to make sure that the port you're entering is the correct one. I was able to recreate your error when I typed the wrong port into the GUI.

Otherwise, could you check if the program works for you in Command Line mode? Type python openbci_lsl.py --stream to check.

I realize that the try/except statement is a little problematic in this bit of code, thanks for bringing that to my attention.

rodrigohubner commented 8 years ago

I review this yesterday...

The command python openbci_lsl.py --stream works fine. I think the problem occurred only GUI interface.

The error appears because the object "port" is a <class 'PyQt4.QtCore.QString'>. I changed it to <type 'str'> and solve it, but I got another problem... The object "self.outlet_eeg" isn't found in the "send" method at the streamerlsl.py.

I think when you're going pass the "self.send" method to run in the thread, the "self" member is missing references...

Look my trace:

-------INSTANTIATING BOARD-------
Connecting to V3 at port /dev/ttyUSB0
Serial established...
OpenBCI V3 16 channel
On Board ADS1299 Device ID: 0x3E
LIS3DH Device ID: 0x33
$$$
Current streaming: 8 EEG channels and 3 AUX channels at 250.0 Hz

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 757, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/rhubner/BCI/OpenBCI_LSL/lib/open_bci_v3.py", line 173, in start_streaming
    call(sample)
  File "/home/rhubner/BCI/OpenBCI_LSL/lib/streamerlsl.py", line 100, in send
    print self.outlet_eeg
AttributeError: 'StreamerLSL' object has no attribute 'outlet_eeg'
alt0xFF commented 7 years ago

bump. i have exactly the same problem. has there been any solution?

rodrigohubner commented 7 years ago

Hello @alt0xFF This problem is only the first! I've been trying to fix all the problems until it was possible to execute ... But finally, at the time of execution, the graphics do not appear... Then I gave up! There are also many problems with style, etc. I think this module has been abandoned!