Static IP Network Configuration - Camera

Caution

The correct instructions for network configuration will depend on your SDK version. Choose your SDK version in the top left drop-down.

Open Zivid Studio and click CamerasAll Cameras to open the camera menu.

../../../_images/studio-cameras-menu.png

Click Configure on the camera that you want to configure.

../../../_images/studio-cameras-configure.png

Select the manual network configuration mode, and enter your desired IP address and subnet mask. Make sure the IP address is not colliding with anything else on your network. Click Apply to apply the configuration to the camera.

../../../_images/studio-cameras-configure-applying.png

The CLI tool ZividNetworkCameraConfigurator allows you to change the camera network configuration of one camera at a time. This tool is installed alongside the Zivid SDK on Windows, and with the Zivid Tools package on Ubuntu.

  1. Open a terminal/Command Prompt.

  2. Connect the camera.

  3. Verify that your camera is found by running:

    ZividListCameras.exe
    
    ZividListCameras
    
  4. Set the camera with current IP <host> in static IP mode with a specific IP address <ip>, subnet mask <mask> and gateway gateway. Make sure the IP address is not colliding with anything else on your network.

    ZividNetworkCameraConfigurator.exe set-config <host> --static --ip <ip> --subnet-mask <mask> --gateway <gateway>
    
    ZividNetworkCameraConfigurator set-config <host> --static --ip <ip> --subnet-mask <mask> --gateway <gateway>
    

    For example, changing the static IP from 172.28.60.5 to 172.28.60.6:

    ZividNetworkCameraConfigurator.exe set-config 172.28.60.5 --static --ip 172.28.60.6 --subnet-mask 255.255.255.0 --gateway 172.28.60.1
    
    ZividNetworkCameraConfigurator set-config 172.28.60.5 --static --ip 172.28.60.6 --subnet-mask 255.255.255.0 --gateway 172.28.60.1
    

The SDK provides the functions to configure the camera network configuration.

  1. Connect to your camera.

    Go to source

    source

    auto camera = zivid.connectCamera();
    
    Go to source

    source

    var camera = zivid.ConnectCamera();
    
    Go to source

    source

    camera = app.connect_camera()
    

  2. Set the mode to manual.

    Go to source

    source

    auto mode = Zivid::NetworkConfiguration::IPV4::Mode::manual;
    
    Go to source

    source

    var mode = Zivid.NET.NetworkConfiguration.IPV4Group.ModeOption.Manual;
    
    Go to source

    source

    mode = zivid.NetworkConfiguration.IPV4.Mode.manual
    

  3. Define the IP address and the Subnet Mask.

    Go to source

    source

    address = Zivid::NetworkConfiguration::IPV4::Address{ inputAddress };
    subnetMask = Zivid::NetworkConfiguration::IPV4::SubnetMask{ inputSubnetMask };
    
    Go to source

    source

    address = inputAddress;
    subnetMask = inputSubnetMask;
    
    Go to source

    source

    address = input_address
    subnet_mask = input_subnet_mask
    

  4. Create a network configuration object.

    Go to source

    source

    Zivid::NetworkConfiguration newConfig(Zivid::NetworkConfiguration::IPV4(mode, address, subnetMask));
    
    Go to source

    source

    var newConfig = new Zivid.NET.NetworkConfiguration()
    {
        IPV4 = {
            Mode = mode,
            Address = address,
            SubnetMask = subnetMask,
        }
    };
    
    Go to source

    source

    new_config = zivid.NetworkConfiguration(
        ipv4=zivid.NetworkConfiguration.IPV4(
            mode=mode,
            address=address,
            subnet_mask=subnet_mask,
        )
    )
    

  5. Apply the new network configuration to the camera.

    Go to source

    source

    camera.applyNetworkConfiguration(newConfig);
    
    Go to source

    source

    camera.ApplyNetworkConfiguration(newConfig);
    
    Go to source

    source

    camera.apply_network_configuration(new_config)
    

If you are configuring IP addresses of multiple cameras, repeat the steps with a different IP address for each camera. For each camera, remember to use an IP address within the same subnet range of its interfacing network card.

Network configuration for two Zivid cameras connected to two separate network interface cards.

For two cameras using individual network cards use e.g. 172.28.60.5 and 172.28.61.5.

Network configuration for two Zivid cameras connected via switch to single network interface card.

For two cameras connected to the same network card using a switch, use e.g. 172.28.60.5 and 172.28.60.6.

You have now configured the camera(s) with a specific static IP address.

If the camera(s) IP is in a different subnet range than the PC, it will be inaccessible and you may not connect to it. If so, go to Static IP Network Configuration - PC to configure the IP of your PC. Otherwise, go to straight to Connecting to the camera.