openbci-archive/_DEPRECATED_OpenBCI-V2hardware

Python GUI connection sequence incompatible with 32bit board

Opened this issue · 5 comments

The python code never tries to write 'v' to the serial device during the connection sequence. After including a this in the EEGSensor.connect() function, a connection is made but a RuntimeError is thrown:

RuntimeError: Maximum number of bytes skipped looking for binary packet (3000)

This occurs after the program warns:

Had to skip N bytes before finding stop/start bytes
Message length is the wrong size! X should be Y.

Has anyone had success with the Python_GUI code using the 32bit board?

There's also https://github.com/OpenBCI/OpenBCI_Python

I have a 32-bit board, but haven't tried the python code yet.
(And when I do I will probably want to write an async version.)

Thanks keturn. I started exploring the 32bit board today. I also found: https://github.com/OpenBCI/OpenBCI_32bit to be helpful while trying to decipher the V3 protocol.

Perhaps we could begin by including some incompatibility warning in the README.md about using the python gui with the 32bit board?

There's also a decoder in https://github.com/OpenBCI/OpenBCI_Processing/blob/master/OpenBCI_GUI/OpenBCI_ADS1299.pde (the Processing GUI does work with the v3 32bit board), and protocol docs at http://docs.openbci.com/05-OpenBCI_Streaming_Data_Format, if you're looking for references.

I read the protocol doc. It needs updating. There are some control commands left out. For instance, filter on/off, channel X on/off, accelerometer on/off. Also, in one place the protocol doc describes the first byte in the packet header as fixed (0xA0) and goes on to say, "We are reserving the first byte to use as a packet check-sum in our protocol."

Hey guys,
First of all, thank you for the interest in OpenBCI!

I have updated the https://github.com/OpenBCI/OpenBCI_Python repo that holds the most current python code.
Definitely try to run these files and let me know if it works.

If you are interested in changing the settings on the board, a simple ser.write('c') should do the job. Make sure to do a time.sleep(0.05) after you write to give the system time to set its registers correctly.

As you can see we are still in the process of getting all the repos and code organized and categorized. Sorry about any confusion that might have caused. Thank you for your suggestions too!