Confusion on lost packets... could be a software issue?

noorienoorie United States

Hello @wjcroft and the wonderful OpenBCI community! I'm a new (beginner) member and a recent high school grad on a gap year working on my EEG project using the Ultracortex Mark IV.

I’ve been trying to access the headset's data stream by way of LSL, but I am a bit confused about the number of samples I have been getting when saving the file. I am trying to capture data for the periods of time when a user is watching a video, for example a two minute video I assumed would have approximately 15,000 samples per channel at a sampling rate of 125Hz. Even though I made sure to turn the toggle from file to network the samples have been closer to 9,000. I double checked the sampling rate and it seems to be at 125Hz as well as collecting data from the two minute interval.

I think it may be from the code I have written: https://github.com/necode2/attempting_collection_eeg/blob/main/2_collectingEEG.ipynb
I've been trying to reference documentation and found a few helpful videos from UCSD who talk about building a simple data collection framework.

All I have been attempting to do up until this point is:

  • connect to stream
  • create markers
  • access my stimuli
  • have a loop that goes through stimuli file and
  • launches stimuli
  • sends a start marker
  • records for duration of stimuli
  • sends ending marker
  • share shape of file
  • saves file to a designated location
  • and then asks the user if they would like to proceed with the next stimuli.

To answer any quick questions regarding packet loss:

  • My dongle is plugged into a USB-C to USB adapter
  • I have less than a 10 ft line of sight between the dongle and the board (generally closer to 1-3 feet)
  • I do fully re-charge the battery after a few hours of use.

I would truly appreciate any pointers or help anyone can provide, and apologies for all the trouble. Thank you.

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Noorie, hi.

    Your other alternative to accessing via LSL, is to use the Brainflow library. It has a simpler interface and less complexity in components. It also talks directly to the board, instead of requiring the use of the OpenBCI_GUI Networking widget. The GUI is internally using the Brainflow library to access the board.

    https://brainflow.org/
    https://brainflow.readthedocs.io/en/stable/Examples.html

    Have you tried using the GUI 'Packet Loss' widget, to run some trials and see if your radio connection is solid? (Minimal packet lossage.) Some users have mentioned that certain usb-c adapters work better than others. Another common suggestion if lossage is happening, is to use a usb-a extension cable to position the dongle closer to the Cyton mainboard.

    Regards, William

  • noorienoorie United States

    I see, thank you so much William! After some trial and error, I think Brainflow ended up working best! I may try using a usb-a connector for LSL in the future :)

Sign In or Register to comment.