It operates on top of a normal IP networkstack, the connections are simple TCP/IP socket connection.
Default port is 15740 (same as the ISO standard number for PTP).
There are 2 connections used:
The participants communicate in packets, their layout is:
| Length | Variable | Notes |
|---|---|---|
| 4 | length (little endian) | Length of the whole packet including the header |
| 4 | type (little endian) | Type, listed below |
| length - 8 | data | specific on type |
Observed types:
| Type | Direction | Name | Next reply(s) | Payload |
|---|---|---|---|---|
| 1 | I->R | Init_Command_Request | 2 or 5 |
|
| 2 | R->I | Init_Command_Ack | 5 or MAINLOOP |
|
| 3 | I->R | Init_Event_Request | 4 or 5 |
|
| 4 | R->I | Init_Event_Ack | EVENTLOOP |
|
| 5 | I->R | Init_Fail | End of communication |
|
| 6 | I->R | Cmd_Request | 9 -> A/C or 7 |
|
| 7 | R->I | Cmd_Response | MAINLOOP |
|
| 8 | R->I | Event | EVENTLOOP |
|
| 9 | R<->I | Start_Data_Packet | 10,12 |
|
| 10 | R<->I | Data_Packet | 10,12 |
|
| 11 | I->R | Cancel_Transaction | 7 ? | (Untested yet.)
|
| 12 | R<->I | End_Data_Packet | 7 ? |
|
| 13 | R<->I | Ping | 14 |
|
| 13 | R<->I | Pong | EVENTLOOP |
|
State transitions:
Initial Phase:
Command Connection:
| 1 | -> 2 | -> MAINLOOP |
| \ 5 | -> EXIT | |
Event Connection:
| 3 | -> 4 | -> EVENTLOOP |
| \ 5 | -> EXIT | |