enhanced ptpip text. ptp/ip uses two tcp connections.

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8504 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2006-01-17 09:16:36 +00:00
parent e2d240ce70
commit 2d72be4f49
2 changed files with 26 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
2006-01-17 Marcus Meissner <marcus@jet.franken.de>
* ptp-parse.pl: parse binary SnoopyPro / usbsnoop logs too.
* PTPIP.TXT: enhanced. PTP/IP uses actually 2 tcp/ip connections.
2006-01-16 Marcus Meissner <marcus@jet.franken.de>
* library.c: Added progress bar support for

View File

@@ -9,11 +9,11 @@ The layers communicate in packets, their layout is:
4 byte length (little endian)
4 byte type (little endian)
type: 1 - init
2 - init reply (success)
type: 1 - startup cmd pipe
2 - startup cmd pipe ok
3 - startup event pipe
4 - ack event pipe
5 - init reply (error)
3 - startup camera
4 - ack camera
6 - (to ) ptp command
7 - (from) ptp ack
@@ -22,21 +22,26 @@ The layers communicate in packets, their layout is:
b - (to ) cancel transaction
c - (from)
d - (to ) keep alive / ping
e - (from)
e - (from) keep alive / pong
State transitions:
Initial Phase:
1 (initiator) -> 2 -> 3 -> 4 -> PTP traffic
-> 5 -> 5
PTP Phase:
Any (device->initiator) block can be of type 8 (PTP interrupt) (I think).
Command Connection: 1 (initiator) -> 2 -> PTP traffic
\> 5 -> exit
Event Connection: 3 (initiator) -> 4 -> EVEN traffic
\ 5 -> exit
command flow:
PTPSTART -> 6 -> 7 -> PTPSTART
\
9 -> A/C -> 7 -> PTPSTART
PTP Traffic:
START -> 6 -> 7 -> START
\
9 -> A/C -> 7 -> START
EVENT Traffic:
START -> 8 -> START (EVENT)
\
13 -> 14 -> START (PING/PONG)
The packet types are:
@@ -49,13 +54,13 @@ TYPE 1 (Init_Command_Request)
TYPE 2 (Init_Command_Ack)
payload 4+sizeof(GUID)+(1+lstrlenW(cameraname))*sizeof(WCHAR) bytes.
4 byte ID
4 byte ID (session id, to be used for event startup)
16 byte GUID (MAC is used here, and repeated)
xx byte WCHAR Camera Name with terminating \0
TYPE 3 (Init_Event_Request)
payload 4 bytes.
4 byte ID (from INIT REPLY)
4 byte ID (from Init_Command_Ack)
Can get type 4 or type 5 reply.
@@ -69,7 +74,6 @@ TYPE 5 (Init_Fail)
-> might mean busy / access denied.
TYPE 6 (PTP COMMAND):
payload n bytes.
2 bytes PTP command