Skipped Bytes when using pyOpenBCI [resolved]
Hello,
I'm writing a Python script to connect to the Cyton via the dongle, and stream data from the headset. The eventual idea is to upload the script to something low power like a Pi, so I'm trying to work around using the GUI.
When streaming, I can connect fine over the COM3 port and send commands to the board. When I start streaming, though, I occasionally get terminal prompts (script is running in Windows Command Prompt) along the lines of either:
a) "Skipped 133 bytes before start found" - the number varies, though 32 turns up a lot. This is the same size as one packet, but that might be a coincidence
b) "ID:<12> instead of <192>", which is then followed another a) type prompt
Does anyone know what causes these messages? And, if I get them, does that mean those packets were dropped by the system? I'm trying to check for dropped packets using board.packets_dropped, but that number seems to be incremented by checking the packet number coming in so I'm not sure if it catches every possibility.
Thanks for reading. I'm happy to post code if that would help.
NB as a gauge of the problem, when streaming for 70 seconds I get about 10 or so of these messages. Also, I'm using a Daisy module if that affects anything.
Comments
Zach, hi.
The 'pyOpenBCI' repo is deprecated. That is why it is in the folder 'openbci-archive',
https://github.com/openbci-archive/pyOpenBCI
The current recommendation is to use Brainflow,
https://brainflow.org/
https://brainflow.readthedocs.io/en/stable/Examples.html
Regards, William
Hi William,
Thanks for replying so fast. I'll switch over the code to the new library.
As a point of interest, did you ever find a reason for that error message, or was unsolved at the time of archiving pyOpenBCI?
Thanks,
Zach
It's possible the old repo was not handling "stop bytes" correctly. See list here,
https://docs.openbci.com/docs/02Cyton/CytonDataFormat#binary-format