Closed robertoostenveld closed 6 years ago
It seems that the actual code is here where it sends OPENBCI_BOP (0x41), followed by the sample number.
In the loop() of DefaultBoard.ino I see that board.sendChannelData() is called, which calls sendChannelDataSerialBLE on line 1289
Might it be that the inconsistent format is due to me not having updated the RFduino firmware on the dongle and the board itself?
Let me answer my own question. The issue was indeed due to the OpenBCI firmware being incompatible with the firmware of the RFduino.
I have flashed the latest RadioHost32bit and RadioDevice32bit firmware from the OpenBCI_Radios repositories following the instructions. I first tried it with Arduino version 1.8.3, but I could not get the RFduino recognized by the Arduino IDE. It did work with Arduino 1.5.8, which luckily still worked on my computer. With the new firmware on host and device radio, the binary protocol again matches the description and the OpenBCI GUI shows the data as expected.
I just updated my Cyton to the latest version of the firmware (DefaultBoard). It seems that the data format has changed, most visible in the first channel that now shows the sample number.
Using the OpenBCI_GUI v2.1.2 (Jan 2017) I see
Note the first channel, which seems to be the sample number (which is reset every 256 samples, i.e. about every second).
Using my own code, I see
The first byte is as expected, the 2nd byte is not consistent with documentation here, the 3rd byte now seems to contain the sample number.
If there is indeed a change in the binary data format, that would explain why existing software is now broken.