Dev1an / Swift-Atem

Blackmagic Design Atem network protocol implementation in swift 5.1 using NIO 2
MIT License
59 stars 27 forks source link

Package XYZ already read #13

Closed adamtow closed 3 years ago

adamtow commented 3 years ago

Sometimes when I connect to the ATEM (mostly with the simulator), the switcher continually sends the connection the "package XYZ already read" message to the console (they never stop).

Other times, the controller connects to the switcher without any problem and the console just outputs messages normally.

Is this something to be concerned about?

Dev1an commented 3 years ago

This means that the library receives the same packet more than once. It can be caused by bad internet connection: for example when the acknowledgements sent by the library (for example from your iOS device) arrive too late at the other endpoint (for example the Blackmagic switcher). When the hardware receives no acknowledgement in time it retransmits its data. (Even though we have already received it)

When you say “they never stop”, do you mean the same package id always reappears or is it always another ID? In the first case that would probably point to a bug in my library or on the ATEM, in the second case that means that the library just never catches up it’s delay (or that the connection stays weak) and continues to be too late to deliver acknowledgements.

adamtow commented 3 years ago

The package IDs are incrementing and don't appear to repeat. The library never seems to catch up to the delay, so there's this constant stream in the Console.