Post

Replies

Boosts

Views

Activity

Reply to When using requestSendPTPCommand to send both commands and data simultaneously, the response timeout occurs and the length of the command and data in the response is 0, need help pls.
struct { uint32_t length; uint16_t type; uint16_t code; uint32_t transactionId; uint32_t Param1; } __attribute__((packed)) ptpCommand; ptpCommand.length = 16; ptpCommand.type = 2; ptpCommand.code = 0x9205; ptpCommand.transactionId = 3; ptpCommand.Param1 = 0xD25A; NSData sendCommand = [NSData dataWithBytes:&ptpCommand length:16]; unsigned char specialData = 1; NSData sendData = [NSData dataWithBytes:&specialData length:1]; [cam requestSendPTPCommand:sendCommand outData:sendData completion:^(NSData* responseData, NSData* ptpResponseData, NSError* err){ }]; I don't know if specialData needs to be placed in sendData or sendCommand. I have tried various data structures, but none of them work
1w