Configure multiple camera streams

Last modified by Lev Andronov on 2025/05/18 17:04

Instructions on Host IP configurations for multiple camera connection

Camera detection

  1. Send link reset on all the links using "LinkReset()"
  2. Try to find cameras on both OR one of the discovery speeds (DISCOVERY_SPEED_1, DISCOVERY_SPEED_3) using "LinkSetSpeed()"
  3. Write a unique id to MasterHostId register (0x4008) of all links where LINK_STATE = LINK_STATE_MASTER to determine which links are associated to which camera using
    WRITE_DEVICE_REG(DEVICE_HOSTLINKID_REG, unique_id_for_each_camera );
  4. Read the DEVICE_HOSTLINKID_REG of all connected links and associate the links to each camera. i.e create a link mask for each camera where the DEVICE_HOSTLINKID_REG is the same. This will later be used to configure the stream arbiter and decoder.
  5. Change the camera speed to a higher speed (either default defined by the camera or your selection) using "DeviceSetDefaultSpeed()"
  6. Change the host links of a specific camera (found in section [.d]) to the new default speed using "LinkSetSpeed()"

Stream configuration

  1. Set the StreamPacketSizeMax which determines the host maximum stream buffer which can be received from the device using WRITE_DEVICE_REG(DEVICE_STREAMSIZE_REG,STREAM_SIZE_MAX);
  2. Notice that when you want to configure the connection to different cameras you must set different connection masks for each arbiter:
    set arbiter select in "CAM SELECT" (0x40)
    set link mask where camera is connected in "ARB SEL" (0x3C)
  3. Then you should connect a decoder to that arbiter which will define the stream where you can connect a buffer. This can be done by selecting the arbiter which is the source where data is coming from (i.e camera that is connected on specified links):
    set decoder register to the arbiter index you would like as a source in "DEC SEL" (0x34) = 0x2034 address
  4. Read the Image1StreamID from the camera and configure it in map register of the selected decoder using
    uint32_t streamMap = (streamId = value from Image1StreamID register. streamLinkMask = camera links mask
    WRITE_STREAM_REG(STREAM_MAP_REG,streamMap); ~/~/ MAP
KAYA Instruments © 2024. All Rights Reserved.