thank you for your answers. Now It sometimes works, but sometimes I get
another error. In the thread part of the debugger window you can read:
Stefan,
You are sending too much data. You only need to send 2 bytes.
buf = malloc( 2 + sizeof(PTPPassThroughPB)
- 1 );
...
passThroughPB->dataSize = 2;
...
msgPB.message.dataSize = 2 + sizeof(PTPPassThroughPB) - 1;
--Dino
On Feb 15, 2005, at 2:13 PM, Stefan Hanshans wrote:
Hello Dino,
Since I have found no documentation about
the pass through mode, I could not figure out how the PTPPassTroughPB
structure should be filled for successfully setting properties and always
get error 0x4051.
Getting properties or property descriptions
is no problem.
This is what I tried (of course without
success):
buf = malloc( 64*1024 + sizeof(PTPPassThroughPB) );
if ( buf
)
{
passThroughPB =
(PTPPassThroughPB *)buf;
memset( buf, 0, 64*1024 + sizeof(PTPPassThroughPB) );
passThroughPB->commandCode = kSetDeviceProp;
passThroughPB->numOfInputParams = 1;
passThroughPB->params[0] = 0xD00A;//CANON_FlashMode;
passThroughPB->numOfOutputParams = 0;
passThroughPB->dataUsageMode = kPTPPassThruSend;
passThroughPB->dataSize = 64*1024;
memset( &msgPB, 0, sizeof(
ICAObjectSendMessagePB ) );
msgPB.object
= curDevice;
msgPB.message.messageType = kICAMessageCameraPassThrough;
msgPB.message.startByte = 0;
msgPB.message.dataPtr = buf;
msgPB.message.dataSize = 64*1024 + sizeof(PTPPassThroughPB);
msgPB.message.dataType = kICATypeData;
err =
ICAObjectSendMessage( &msgPB, NULL );
free( buf );
}
Where do I have to put the data I'm sending
in? And where the data type? Do you have an example for me?
Thanks
Stefan
Am 15.02.2005 um 22:34 schrieb Dino
Tang:
Hi Stefan,
The PTPPassThrough mechanism is there to do
exactly what you were asking for. We have a sample app in the SDK that
demonstrates the pass through mechanism. You should be able to do
anything that the device supports via the pass through mechanism.
Cheers.
--Dino
On Feb 15, 2005, at 9:28 AM, Stefan
Hanshans wrote:
I've found out how to read device
properties using the sample PTPPassThroughTester application, but how can I
set properties?
Is this possible with the PTPPassTroughPB
structure defined in the file PTP.h of the sample code?
If so, which values have to be set, if I,
for example, would like to set the property FlashMode (0xD004) of a Canon
PowerShot camera to value 0x02 of type UInt8 (0x0002)?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden