D2XX dongle EEPROM communications area, possible uses
Hey guys!
Finally unpacked my board and am eager to start the experimentation.
I use EEG amps in neurofeedback and software that i have used during the last couple of years is BioExplorer, mostly due to the abundance of designs and help from people using it.
I've read a few posts on this forum that in order for BioExplorer to work with OpenBCI, there must be an OpenEEG emulation implemented.
Now, my questions are:
- Is there anyone who is successfully using OpenBCI with BioExplorer?
- I know that OpenEEG protocol has a limit of only 6 channels. But i remember reading somewhere in the yahoo groups, that BioExplorer only reads first two channels of OpenEEG. May there be workarounds for this limitation?
Cheers!
P.S. I know that there are a few threads on software and BioExplorer is mentioned in some of them. But my questions were more specific to this software, so i decided to open a new thread.
Comments
avoid having multiple device drivers for different computer software.
That continually broke, and since I was under pressure to ship, I just
abandoned it. I still think that it could be possible to write the Host
code to have multiple formatting (driver) options, but it's not working
yet.
Joel, very interesting coincidence! This would seem like exactly a potential solution for the OpenEEG compatibility mode.
I also found an API call in the FTDI VCP / D2XX driver, that allows the programmer to alter certain dongle (usb port) EEPROM location variables. In other words, this could be a "communications" area where a control panel app on the laptop, puts certain values in this location to indicate it wants either default mode OpenBCI operation, or emulation of OpenEEG.
I'll look around again and find that FTDI documentation reference. This looks like an ideal way of altering the operation of the dongle WITHOUT needing to reprogram it. Just change some of the operation parameters.
William
http://www.ftdichip.com/Support/Documents/AppNotes/AN_233_Java_D2xx_for_Android_API_User_Manual.pdf
Although that is Java / Android specific, I think the same D2xx calls are available in other D2xx libraries. The functions listed on page 57 are:
Retrieves the amount of additional space available in the device EEPROM. This space (the user
area) can be used to store application specific data.
Returns:
The number of unused EEPROM bytes available to the user. Negative value for error
public byte[] eepromReadUserArea(int length)
Retrieves the contents of the device EEPROM user area. The number of bytes returned matches the
user area size returned from eepromGetUserAreaSize()
Parameters:
length - The length of word is read
Returns:
An array of bytes containing the user area data from the device EEPROM.NULL for error.
public int eepromWriteUserArea(byte[] data)
Writes data to the device EEPROM user area. Once written, the data can be retrieved with a call to
eepromReadUserArea(int).
Parameters:
data - The data to be written to the device EEPROM user area. The data is truncated if the size of
data is greater than the space available in the EEPROM user area.
Returns:
if write success will return length of data , else 0
So the question is, can this eeprom user area be accessed also from our code running on the dongle? If so, it could store switches and settings that control which protocol emulation is being performed. (OpenBCI or OpenEEG). And could also control how the 24 bit samples are shifted (scaled down) to fit into the (for example) 10 bit OpenEEG sample words.
One big sticking point is: OpenEEG runs at 256 sps and we are 250 sps. So that is a pretty large monkey wrench. :-( Chip had his OpenEEG emulation running and talking to Brainbay at one point. But programs like OpenViBE, other BCI suites, and even Bioexplorer (with QEEG work) -- get significantly confused when you fake sample rates like this. May or may not be usable.