Rachel Insler wrote:
I have not used Brian Stankiewicz's MEX file for controlling the CMU
box. I have used the Keyspan serial adapter with a CMU box and here is
one thing that can go wrong with that: Back in the days when Macs had
buit-in serial ports, they had two built-in serial ports and each port
always had the same name on all Macs. Because on any Mac a program
could reliably find serial ports with those names, some Mac software
which controls the CMU box assumes that two serial ports exist and that
they have the conventional names. Even though the Keyspan adapter adds
two serial ports, those added ports are not given the same names as
built-in ports. Consequently, when some CMU box programs try to use a
serial port, they can not find one; They use a name which labels a
non-existing port rather than discovering the names of existing ports
and choosing from among them.
So here are some things to try:
1- The KeySpan control panel has an option to emulate one of the two
conventional ports. I think the old built-in port names are "printer"
and "phone" and the Keyspan adapter will only emulate the printer
port. So if the CMU MEX file expects to find the CMU box on the
printer port, then you are in luck. Set a Keyspan serial port to
emulate the printer port, make sure that you have the serial cable
connected to that port on the Keyspan adapter, and go.
2- Maybe the CMU MEX file lets you select the port name. In which case,
just choose the name of a port on the Keyspan adapter.
3- If he CMU MEX will not let you select a port name, then at least the
documentation might tell you which serial port it does use. If so, then
you could with certainty either verify that a fixed port name within the
CMU MEX file is the problem or rule it out as a possible cause.
4- If the MEX file insists on using the phone port, and the Keyspan
adapter will only emulate the printer port, then what ? Someone has
to find the port name string in the C source for the CMU box MEX file,
change the name to something matching one of the ports on the Keyspan
adapter, then recompile. I think I recall that Brian Stankiewicz.
mentioned in February that the CMU MEX project was a Symantic C project,
which makes that change a bit harder for those of us using the
CodeWarrior compiler or any other. If you can determine that the
problem is port naming, then I suggest contacting Brian about that.
Best,
Allen
>>Hi Rachel,
>>
>> ... one of the grad students had a question about a Psychtoolbox
>> function. The same question had been posted to the forum several
>> months ago by someone else with no reply, so, knowing that I had
>> worked with you, the grad student asked me if I could forward the
>> question to you to see if you a) knew the answer or b) knew whom we
>> might be able to direct the question to.
>>
>> The relevant posting is below:
>>
>> --- In psychtoolbox@y..., "kmuess" <muesseler@m...> wrote:
>> Hello!
>> I failed to use a new CMUBbox with a new USB Mac (via Keyspan
>> adapter) and the Mex files by Brian J. Stankiewicz. The error
>> message is always
>>
>> ??? Error in bbox
>> On line 1 ==> CMUBbox('Init');
>>
>> Brian has started a new position at UT Austin and promised to
>> take care of the problem in future, but I wonder if anybody else
>> already observed this error messages and found already a
>> solution for it.
>> Thanks
>> Jochen Muesseler
>> Munich
>> --- End forwarded message ---
>>
>> Itamar (the grad student) has encountered the same problem, using
>> newer computers and button boxes, although the function has worked
>> with older equipment. We were wondering if a fix had been developed
>> by someone to use a USB CMU Button Box with the Psychtoolbox?
>>
>> Barring that, we were wondering if there was a function that reads
>> directly from the serial port with very accurate timing?
>>
>> Thanks in advance for any help, advice, or steering in the right
>> direction you may be able to offer us.
>>
>>
I have not used Brian Stankiewicz's MEX file for controlling the CMU
box. I have used the Keyspan serial adapter with a CMU box and here is
one thing that can go wrong with that: Back in the days when Macs had
buit-in serial ports, they had two built-in serial ports and each port
always had the same name on all Macs. Because on any Mac a program
could reliably find serial ports with those names, some Mac software
which controls the CMU box assumes that two serial ports exist and that
they have the conventional names. Even though the Keyspan adapter adds
two serial ports, those added ports are not given the same names as
built-in ports. Consequently, when some CMU box programs try to use a
serial port, they can not find one; They use a name which labels a
non-existing port rather than discovering the names of existing ports
and choosing from among them.
So here are some things to try:
1- The KeySpan control panel has an option to emulate one of the two
conventional ports. I think the old built-in port names are "printer"
and "phone" and the Keyspan adapter will only emulate the printer
port. So if the CMU MEX file expects to find the CMU box on the
printer port, then you are in luck. Set a Keyspan serial port to
emulate the printer port, make sure that you have the serial cable
connected to that port on the Keyspan adapter, and go.
2- Maybe the CMU MEX file lets you select the port name. In which case,
just choose the name of a port on the Keyspan adapter.
3- If he CMU MEX will not let you select a port name, then at least the
documentation might tell you which serial port it does use. If so, then
you could with certainty either verify that a fixed port name within the
CMU MEX file is the problem or rule it out as a possible cause.
4- If the MEX file insists on using the phone port, and the Keyspan
adapter will only emulate the printer port, then what ? Someone has
to find the port name string in the C source for the CMU box MEX file,
change the name to something matching one of the ports on the Keyspan
adapter, then recompile. I think I recall that Brian Stankiewicz.
mentioned in February that the CMU MEX project was a Symantic C project,
which makes that change a bit harder for those of us using the
CodeWarrior compiler or any other. If you can determine that the
problem is port naming, then I suggest contacting Brian about that.
Best,
Allen
>>
>>
>> ... the impetus for my writing to you (though I did want to say hi :)
>> ) was that one of the grad students had a question about a
>> Psychtoolbox function. The same question had been posted to the forum
>> several months ago by someone else with no reply, so, knowing that I
>> had worked with you, the grad student asked me if I could forward the
>> question to you to see if you a) knew the answer or b) knew whom we
>> might be able to direct the question to.
>>
>> The relevant posting is below:
>>
>> --- In psychtoolbox@y..., "kmuess" <muesseler@m...> wrote:
>> Hello!
>> I failed to use a new CMUBbox with a new USB Mac (via Keyspan
>> adapter) and the Mex files by Brian J. Stankiewicz. The error
>> message is always
>>
>> ??? Error in bbox
>> On line 1 ==> CMUBbox('Init');
>>
>> Brian has started a new position at UT Austin and promised to
>> take care of the problem in future, but I wonder if anybody else
>> already observed this error messages and found already a
>> solution for it.
>> Thanks
>> Jochen Muesseler
>> Munich
>> --- End forwarded message ---
>>
>> Itamar (the grad student) has encountered the same problem, using
>> newer computers and button boxes, although the function has worked
>> with older equipment. We were wondering if a fix had been developed
>> by someone to use a USB CMU Button Box with the Psychtoolbox?
>>
>> Barring that, we were wondering if there was a function that reads
>> directly from the serial port with very accurate timing?
>>
>> Thanks in advance for any help, advice, or steering in the right
>> direction you may be able to offer us.
>>
>>