-
Notifications
You must be signed in to change notification settings - Fork 5
Keep Alive Messages
If no data transfers occur, Host and Device continuously exchange messages I call "Keep Alive Messages". I guess the purpose of those messages is simple: Each device want to know as soon as possible if the counterpart is not able to communicate any more.
Thus, short keep-alive-messages are sent from Host to Device. Please see the following screenshot. You can go to the full sheet by clicking on it!
How to read the sheet:
- Colours: Each color represents one of the channels
-
- 0x1 (green),
-
- 0x2 (pink),
-
- 0x80 (yellow)
- Column A is the packet number of the current USB port sniffing session
- Column B shows the time from the beginning of the USB port sniffing session
- Column C is the time gap showing when the last message was sent on the same channel
- Column D for debugging purposes - please ignore
- Column E shows data send from Host to Device
- Column F shows data send from Device to Host
Let's take a look on line 4 (packet number 14243): Since it is yellow, it is a keep-alive message for channel 0x80 sent from Host to Device (column E). Since the Device seems to be busy responding to messages on other channels it cannot immediately respond to this message. The reply is sent in line 9 (packet number 14529). In the meantime, Host is sending further keep-alive messages on other channels:
- line 5 for channel 0x2
- line 8 for channel 0x1
Answers are provided as soon as possible. Line 7 is the reply to line 5, whereas 12 is the response top line 8.
As you can see in column C the time gap between sending two keep-alive messages from the Host is a little bit more than 1s.
Data-transfers do always interrupt the mechanism described above. If for example, the last reply for channel 0x80 was received 0.5 seconds in the past and a data transfer on the same channel occurs, no periodic keep-alive messages are sent (but replies confirming that we received data packets). After the data transfer, the mechanism switches back into the 1s delay function. Thus, 1s second after the last data packet was received, another keep-alive message will be sent on that particular channel.