Skip to content

Basler Vision Connector Messaging: Opening the Camera Connection#

GenICam cameras demand the connection to be open before you can start to set parameters and image streaming. This connection is an exclusive access. This means that no other App can access the camera and change parameters nor stream images.

You can open a camera by defining an identification string in the DeviceID field. The Basler Vision Connector then tries to find a matching camera by searching for this identification string in the information from the available cameras. The search order is as follows:

  1. SerialNumber
  2. IPAddress
  3. UserDefinedName
  4. ModelName
  5. VendorName
  6. Interface

Example:

An identification string is provided in the DeviceID field. The Basler Vision Connector first tries to find a camera with a matching serial number. If no matching serial number is found, the Basler Vision Connector tries to find a camera with a matching IP address. The Basler Vision Connector continues until a matching camera is found and tries to open this camera.

If several cameras are found matching the same information, the Basler Vision Connector tries to open the first camera. It's up to the Basler Vision Connector which camera is the first one.

If a camera with a specific identification string is opened, this identification string must be used in all DeviceID fields of all requests regarding this camera, and this until the camera is closed again. A camera can't be opened with different identification strings at the same time.

JSON Payload#

Field Optional Type Description
TransactionID Yes String Transaction identification
Action No String Method called. Fixed value: OpenDevice
DeviceID No String Device identification
{
    "TransactionID": "1232156",
    "Action": "OpenDevice",
    "DeviceID": "548451887"
}

Response Object#

Field Optional Type Description
TransactionID Yes String Transaction identification
ReturnCode No Integer (32-bit unsigned) Message code following Message Codes
Message Yes String Response message
{
    "TransactionID": "123456",
    "ReturnCode": 0,
    "Message": "Camera open."
}