I am debugging ImageCaptureCore to communicate with external cameras.
When I called the PTP function below to send a command and add data, the response timed out for more than 5 seconds. After waiting for a period of time, I obtained the response. However, the response callback function obtained responsivData.length as zero and ptpResponseData.length as zero too.
- (void)requestSendPTPCommand:(NSData *)ptpCommand outData:(NSData *)ptpData completion:(void (^)(NSData *responseData, NSData *ptpResponseData, NSError *error))completion;
data is below: Wrote 1 = 0x1 bytes PTP:send data: (hexdump of 1 bytes) [ ] I/PTP (14564): 0000 01 - .
When I called the PTP function below to send a command and add data, the response timed out for more than 5 seconds. After waiting for a period of time, I obtained the response. However, the response callback function obtained responsivData.length as zero and ptpResponseData.length as zero too.
What were the full contents of ptpCommand (6 bytes) and ptpData (if applicable)? More generally, what command were you trying to send and what did you expect to happen?
I haven't looked at the PTP spec in any great detail, but what your describing sound like what happens if you sent the device a command it didn't handle "well".
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware