DHCP Network Configuration - PC

Warning

Make sure you are familiar with DHCP before you configure this mode. It is easy to run into issues with DHCP. For example, running more than one DHCP server with overlapping address range on the same network.

Recall that the Zivid SDK looks at Cameras.yml to find cameras, see Zivid Two Network Configuration. There are two options to make a camera available to the Zivid SDK.

  1. You can list all the IP addresses that the DHCP can assign.

  2. You can list the hostnames assigned to the connected cameras. The hostname is by default zivid-<serial number> (e.g. zivid-2022C0DE). You can also assign a custom hostname when you enable DHCP mode on the camera, see DHCP or Link Local IP Network Configuration - Camera.

In the following guide we will refer to these two options.

The DHCP configuration depends on the static IP, or the name of the network interface. For simplicity we use a statically assigned IP address. Please follow the steps in Static IP Network Configuration - PC.

  1. Install a DHCP server. If the network already has a DHCP server running you can skip this step.

  2. Configure the DHCP server. The example here is based on the DHCP server implementation referred to in the previous step. The concepts should apply to alternative DHCP servers.

    1. Option: List IP addresses.

      Configure the settings in the dhcpsrv.ini file

      [Settings]
      IPBIND_1=172.28.60.2
      IPPOOL_1=172.28.60.3-172.28.60.10
      AssociateBindsToPools=1
      [General]
      SUBNETMASK=255.255.255.0
      
    2. Option: List hostnames.

      Configure the settings in the dhcpsrv.ini file

      [Settings]
      IPBIND_1=172.28.60.2
      [DNS-Settings]
      EnableDNS=1
      [General]
      SUBNETMASK=255.255.255.0
      DNS_1=$(IPBIND_1)
      
  3. Update Cameras.yml according to the DHCP configuration.

    1. Option: List IP addresses.

      __version__: 1
      Cameras:
          NetworkCameras:
              - NetworkCamera:
                  Host: 172.28.60.3
              - NetworkCamera:
                  Host: 172.28.60.4
              - NetworkCamera:
                  Host: 172.28.60.5
              - NetworkCamera:
                  Host: 172.28.60.6
              - NetworkCamera:
                  Host: 172.28.60.7
              - NetworkCamera:
                  Host: 172.28.60.8
              - NetworkCamera:
                  Host: 172.28.60.9
              - NetworkCamera:
                  Host: 172.28.60.10
      
    2. Option: List hostnames.

      __version__: 1
      Cameras:
          NetworkCameras:
              - NetworkCamera:
                  Host: zivid-two
              - NetworkCamera:
                  Host: zivid-two-alt-1
              - NetworkCamera:
                  Host: zivid-two-alt-2
              - NetworkCamera:
                  Host: zivid-two-2022C0DE
      

    Path to Cameras.yml

    mkdir %LOCALAPPDATA%\Zivid\API
    move %HOMEPATH%\Downloads\Cameras.yml %LOCALAPPDATA%\Zivid\API\
    

    Caution

    Zivid configuration files must use .yml file extension ( not .yaml).

  4. (Re-)start the DHCP server.

    Navigate to the folder where you extracted the executable, and double-click dhcpsrv.exe, or open Command Prompt and

    C:\dhcpsrv>dhcpsrv.exe -runapp
    

    You can verify that the DHCP server is running by checking your tray:

    Screenshot which shows that DHCP is running on Windows

Once you have configured both the camera and the PC you can open Zivid Studio and the camera will be found automatically.

Hint

The status LEDs at the back of the camera show the current link capacity.