BCI2000 + USBamp error:: bci2000_v2

Forum for software developers to discuss BCI2000 software development
Locked
mike
Posts: 10
Joined: 01 Sep 2005, 09:39

BCI2000 + USBamp error:: bci2000_v2

Post by mike » 05 Sep 2007, 10:58

Hi,

I am working in the MPI of Tuebingen trying to make the bci2000_v2 version work with the gUSBamp. I have the following error:

5/09/2007 12:27:48 - BCI2000 started
05/09/2007 12:27:49 - Waiting for configuration ...
05/09/2007 12:27:49 - Waiting for configuration ...
05/09/2007 12:27:49 - Waiting for configuration ...
05/09/2007 12:28:43 - Operator set configuration
05/09/2007 12:28:43 - Parameter "Source->DeviceIDMaster": Value is 0,
exceeds lower range (1).
05/09/2007 12:28:43 - gUSBampADC::Preflight: Could not detect any
amplifier. Make sure there is a single gUSBamp amplifier connected to
your system, and switched on.

I am sure that there is not an error with the USBamp since I can use it with a very old version in the same computer. The version of the gUSBampADC.cpp is:

////////////////////////////////////////////////////////////////////////////////
// $Id: gUSBampADC.cpp 1469 2007-08-15 15:45:26Z mellinger $
// Author: schalk@wadsworth.org
// Description: BCI2000 Source Module for gUSBamp devices.

Somebody has a suggestion?? Whatever would be very welcome since I am very pressed with the experimentation...

Thanks in advance!

Javier

mike
Posts: 10
Joined: 01 Sep 2005, 09:39

Continuation...

Post by mike » 05 Sep 2007, 12:26

I have done debugging and the problem seems to be in the function:

// **************************************************************************
// Function: DetectAutoMode
// Purpose: This function determines whether the system can be configured automatically.
// This is the case when there is exactly one amplifier connected.
// Parameters: N/A
// Returns: 0..15 ... USB ID of the one connected amplifier
// -1 ... no amplifier detected
// -2 ... more than one amplifier detected
// **************************************************************************
int gUSBampADC::DetectAutoMode() const
{
int numdetected=0, USBport=-1;

for (int cur_USBport=0; cur_USBport<16; cur_USBport++)
{
HANDLE hdev = GT_OpenDevice(cur_USBport);
if (hdev)
{
numdetected++;
GT_CloseDevice(&hdev);
USBport=cur_USBport;
}
}

if (numdetected > 1) return(-2);
if (numdetected == 0) return(-1);
return(USBport);
}

// ************************************************

With the USBampgetinfo the similar function and call GT_OpenDevice works fine. However, when I use the BCI2000 it always return NULL. Does somebody have a clue ... .

Thanks in advance to everybody!

Javier

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

USBamp

Post by gschalk » 05 Sep 2007, 22:56

Hi,

Can you try to type in the amp's serial number in the DeviceIDMaster parameter instead of 'auto' ?

Does this help?

Gerv

mike
Posts: 10
Joined: 01 Sep 2005, 09:39

Not working

Post by mike » 06 Sep 2007, 04:01

Hi,

thanks a lot for your quick help. I have tried to type in the DeviceIDMaster the: (1) Serial number returned by gUSBampinfo and (2) the ID written in the gUSBamp. Both solutions gave me a similar same error:

06/09/2007 10:05:25 - Operator set configuration
06/09/2007 10:05:25 - Parameter "Source->DeviceIDMaster": Value is 0, exceeds lower range (1).
06/09/2007 10:05:25 - gUSBampADC::Preflight: the MasterDevice has to be one of the DeviceIDs.
06/09/2007 10:05:25 - gUSBampADC::Preflight: Could not detect any amplifier. Make sure there is a single gUSBamp amplifier connected to your system, and switched on.
06/09/2007 10:05:25 - gUSBampADC::Preflight: Could not find appropriate pass band filter in gUSBamp. Use gUSBampgetinfo tool.
06/09/2007 10:05:25 - gUSBampADC::Preflight: Could not find appropriate notch filter in gUSBamp. Use gUSBampgetinfo tool.


06/09/2007 10:05:47 - Operator set configuration
06/09/2007 10:05:47 - gUSBampADC::Preflight: Parameter "Source->DeviceIDMaster": Value is 319058, exceeds high range (16).
06/09/2007 10:05:47 - gUSBampADC::Preflight: the MasterDevice has to be one of the DeviceIDs.
06/09/2007 10:05:47 - gUSBampADC::Preflight: Could not detect any amplifier. Make sure there is a single gUSBamp amplifier connected to your system, and switched on.
06/09/2007 10:05:47 - gUSBampADC::Preflight: Could not find appropriate pass band filter in gUSBamp. Use gUSBampgetinfo tool.
06/09/2007 10:05:47 - gUSBampADC::Preflight: Could not find appropriate notch filter in gUSBamp. Use gUSBampgetinfo tool.

Another suggestion?

Thanks a lot,

Javier

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

g.USBamp

Post by gschalk » 06 Sep 2007, 10:03

Javier,

This looks like a bug in the USBamp source module in v2. I will test and fix it as soon as I can.

Gerv

mike
Posts: 10
Joined: 01 Sep 2005, 09:39

Post by mike » 06 Sep 2007, 10:11

Thanks a lot!

Javier

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

USBamp ...

Post by gschalk » 07 Sep 2007, 12:41

Javier,

There was a small bug in the USBampSource for v2. This is fixed. SVN is currently down, but I will email you the source.

Gerv

mike
Posts: 10
Joined: 01 Sep 2005, 09:39

Post by mike » 08 Sep 2007, 04:30

Thanks a lot!

mike
Posts: 10
Joined: 01 Sep 2005, 09:39

Problem found

Post by mike » 08 Sep 2007, 05:23

Hi,

I think I have found the problem. There is a compatibility problem between the BCI2000_v1, BCI2000_v2 and the old gUSBamp (the one that I have on my table). This is because in the gUSBampADC.cpp function there is a call to GT_GetImpedance. This function comes with the new versions of the ampis but is not present in the old versions. Then, when you try to recompile BCI2000 with the libraries and headers of the old ampis you have a compilation error.

Javier

lmwalton
Posts: 3
Joined: 15 Oct 2010, 10:35

Re: BCI2000 + USBamp error:: bci2000_v2

Post by lmwalton » 02 Jan 2012, 16:01

I'm having the same issue with BCI2000 V3 and g.tec's usbamp v3. Is there any way for me to resolve this issue?

System log:
2012-01-02T12:51:22 - BCI2000 Started
2012-01-02T12:51:23 - Waiting for configuration ...
2012-01-02T12:51:23 - Waiting for configuration ...

Connection info:
Protocol version: 0
Name: SignalSource
Address
Messages received: 0
Messages sent: 0

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: BCI2000 + USBamp error:: bci2000_v2

Post by gschalk » 02 Jan 2012, 19:32

Do you have an old version of BCI2000 that has the USBamp.dll in the prog directory? Either try to delete this or get the most recent version of BCI2000, and copy it into a fresh directory. Also, I assume that you installed the USBamp drivers and C API.

Gerv

lmwalton
Posts: 3
Joined: 15 Oct 2010, 10:35

Re: BCI2000 + USBamp error:: bci2000_v2

Post by lmwalton » 02 Jan 2012, 21:28

I am using the most recent version of BCI2000 (downloaded today via the website). There was no old version. I don't think the usbamp c api is installed though so that may be the problem. I'm contacting g.tec to obtain the c api as I no longer have it on hand.

Locked

Who is online

Users browsing this forum: No registered users and 23 guests