Dev1an / Swift-Atem

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

ATEM Looses connection #14

Closed MHDallas closed 3 years ago

MHDallas commented 3 years ago

I have created a controller to manage the camera settings on a ATEM 2 M/E Production Studion 4k. The controller application is running on MacOS 10.15.7. I have tried ATEM Software versions 8.1, 8.2, 8.2.1, 8.5 and 8.6 I have also used Swift-ATEM versions 1.1.1 and the master from 3/4/2021 The only difference is the Swift-NIO was upgraded from 2.18.0 to 2.26.0.

The application interfaces with a camera shader via TCP connections to adjust camera GAIN using ATEM CameraControl Commands. I added my own extensions for CameraControl. Just connecting to the ATEM (no connection from the shader yet), the app runs for about 2 minutes and then gets:

After the disconnect, the real console is unresponsive until I stop my controller app.

Initial Connection debug logs, before the disconnect: Trying to connect to ATEM: 172.18.0.240... channel active reconnecting connected, now retreiving initial state connected using id [129, 4] Version: 2.30 InCm [1, 0, 0, 0]

MHDallas commented 3 years ago

I forced Swift-Nio back to 2.18.0. Same results.

Dev1an commented 3 years ago

Thanks for your detailed explanation. Can you send a package capture (for example using Wireshark) of these two minutes (From before connection to after disconnection)?

MHDallas commented 3 years ago

In an effort to get clean Wireshark captures, I tried to remove other network traffic and direct connected to the ATEM Using this configurations, ….. I could not get it to fail again.

I believe the issue was the console running an old version of the ATEM Software.

Background: Many years ago we purchased an CCU-Lite from Skaarhoj as a shader for our cameras. When we upgraded our ATEM a year later, the CCU-Lite would not work. Skaarhij stated they no longer supported the CCU-Lite - offered to sell us another device. We have been stuck on ATEM v7.2 ever since.
My solution was to write an Arduino application for the CCU-Lite to monitor the encoders and buttons and then send TCP commands to an application running on macOS. This application would then send the appropriate commands to the ATEM. This is the application I have been testing. During my test, I upgrade the Production Studio to the latest ATEM software; however, did not bother upgrading the console. After upgrading both, everything seems to work fine.

Thank you for the quick response and great library!!

On Mar 9, 2021, at 12:20 AM, Damiaan Dufaux notifications@github.com wrote:

Thanks for your detailed explanation. Can you send a package capture (for example using Wireshark) of these two minutes (From before connection to after disconnection)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Dev1an/Swift-Atem/issues/14#issuecomment-793448193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZQIQNSKNTMFESLWUIJJV3TCW42BANCNFSM4Y2LSNNA.