• Version
  • Language
  • Product
  • Knowledge base
  • Camera
  • Motion
  • Zivid.com ↗
  • Downloads ↗
  • Webshop ↗
Logo

Getting Started

  • User Guide
  • Software Installation
  • Studio Guide
  • Quick Capture Tutorial

Academy

  • Camera
    • Capture Tutorial
    • GPU Access Tutorial
    • Point Cloud Capture Process
    • 2D Image Capture Process
    • 2D + 3D Capture Strategy
    • Capturing High Quality Point Clouds
    • Multiple Zivid Cameras
    • File Camera
    • Projector
    • Infield Correction
    • Warm-up
    • Detect Ethernet Link Changes
      • Introduction
      • Read Link Speeds
      • Interpretation by Topology
        • Direct camera-to-PC
        • Camera-to-switch-to-PC
        • Multi-switch-setups
      • What Happens If a Cable Is Damaged?
      • Samples
    • Firmware Update
    • Multithreading
  • Applications

Software

  • Integrations
  • Samples
  • Docker
  • API Reference
  • Capture Speed
  • Supporting Reference

Reference Articles

  • Camera Settings
  • Calculators
  • Hardware
  • General Camera Topics
  • General 3D Topics

Support

  • FAQ
  • Troubleshooting
  • Erratas
  • Contact Us
  • KB Version History
ZIVID KNOWLEDGE BASE
  • Zivid Camera
  • Camera
  • Detect Ethernet Link Changes

Detect Ethernet Link Changes

  • Introduction

  • Read Link Speeds

  • Interpretation by Topology

    • Direct camera-to-PC

    • Camera-to-switch-to-PC

    • Multi-switch-setups

  • What Happens If a Cable Is Damaged?

  • Samples

Introduction

Monitoring Ethernet link speed can help detect network degradations before the system underperforms or drops below target throughput. When link speed unexpectedly drops, it may indicate cable issues, connector problems, or an unintended topology change.

This tutorial shows how to read and monitor two Ethernet link-speed states per camera:

  • CameraState::Network::Ethernet::LinkSpeed (camera side)

  • CameraState::Network::LocalInterface::Ethernet::LinkSpeed (host side)

Read Link Speeds

Read link speeds by querying the APIs listed above for each camera in your monitoring loop.

The host-side link speed is read from the local interface and does not require a connection to the camera:

Go to source

source

// Reading the host-side (local interface) Ethernet link speed does not require a connection to the camera.
const auto localInterface = getUsersLocalInterface(camera);
const auto localInterfaceLinkSpeed = localInterface.ethernet().linkSpeed();

std::cout << "Camera " << camera.info().serialNumber()
          << ": local interface Ethernet link speed=" << localInterfaceLinkSpeed << std::endl;
Go to source

source

// Reading the host-side (local interface) Ethernet link speed does not require a connection to the camera.
var localInterfaceLinkSpeed = GetUsersLocalInterface(camera).Ethernet.LinkSpeed;

Console.WriteLine("Camera {0}: local interface Ethernet link speed={1}",
    camera.Info.SerialNumber,
    localInterfaceLinkSpeed);
Go to source

source

# Reading the host-side (local interface) Ethernet link speed does not require a connection to the camera.
local_interface_link_speed = get_users_local_interface(camera).ethernet.link_speed

print(f"Camera {camera.info.serial_number}: local interface Ethernet link speed={local_interface_link_speed}")

The camera-side link speed is read from the camera state and does require being connected to the camera:

Go to source

source

// Reading the camera-side Ethernet link speed requires being connected to the camera.
camera.connect();
try
{
    const auto cameraLinkSpeed = camera.state().network().ethernet().linkSpeed();
    std::cout << "Camera " << camera.info().serialNumber() << ": camera Ethernet link speed=" << cameraLinkSpeed
              << std::endl;
}
catch(...)
{
    camera.disconnect();
    throw;
}
camera.disconnect();
Go to source

source

// Reading the camera-side Ethernet link speed requires being connected to the camera.
camera.Connect();
try
{
    var cameraLinkSpeed = camera.State.Network.Ethernet.LinkSpeed;
    Console.WriteLine("Camera {0}: camera Ethernet link speed={1}",
        camera.Info.SerialNumber,
        cameraLinkSpeed);
}
finally
{
    camera.Disconnect();
}
Go to source

source

# Reading the camera-side Ethernet link speed requires being connected to the camera.
camera.connect()
try:
    camera_link_speed = camera.state.network.ethernet.link_speed
finally:
    camera.disconnect()

print(f"Camera {camera.info.serial_number}: camera Ethernet link speed={camera_link_speed}")

For the corresponding API, see NetworkConfiguration.

Interpretation by Topology

Direct camera-to-PC

If the camera is directly connected to the host NIC:

  • Camera link speed represents the direct cable segment between camera and host NIC.

  • Local interface link speed represents the same direct cable segment from the host side.

In this case, both APIs should report the same link speed, and any change in either API indicates a change in the camera-to-host connection.

Camera-to-switch-to-PC

If the camera and host are connected through one switch:

  • Camera link speed represents the camera-to-switch segment.

  • Local interface link speed represents the host-NIC-to-switch segment.

In this case, the APIs monitor different segments, and a change in either API indicates a change in the respective segment.

Multi-switch-setups

For multi-switch setups, these APIs only observe the first hop from each endpoint:

  • Camera LinkSpeed reports camera to first network device.

  • LocalInterface LinkSpeed reports host NIC to first network device.

  • Intermediate switch-to-switch segments are not monitored by these APIs!

In this case, a change in either API indicates a change in the respective segment, but changes in intermediate segments may go undetected.

What Happens If a Cable Is Damaged?

A damaged cable often does not fail immediately. Instead, the link can renegotiate to a lower speed, e.g.:

Condition

Link speed

Expected healthy link

link1Gbps

After degradation

link100Mbps

This reduction can be an early warning of cable or connector problems, even while communication is still possible. In practice, a link may drop during a disturbance and then reconnect at a lower negotiated speed. When the link comes back this way, throughput drops, and the risk of instability or future disconnects increases.

If your monitoring shows a sustained downgrade, inspect and replace cables on the affected segment.

Samples

The full samples where these APIs are utilized are available here:

  • AutomaticNetworkConfigurationForCameras.cpp

  • AutomaticNetworkConfigurationForCameras.cs

  • AutomaticNetworkConfigurationForCameras.py

Previous Next

© Copyright 2015-2026 Zivid AS, last updated: 14 Jul 2026, 15:55 CET.

Built with Sphinx using a theme provided by Read the Docs.

Links

  • Knowledge base
  • Products
  • Downloads
  • Webshop

Follow Us

  • Twitter
  • Facebook
  • LinkedIn
  • YouTube

Contact us

  • Zivid.com
  • Gjerdrums vei 10A
  • NO0484 Oslo, Norway
  • +47 21 02 24 72