My team is using C++ and we’re trying to get our cRIO to communicate with our camera. We have the Axis 206 and an 8-slot cRIO. We have used the axis camera setup tool to set the camera up for going into the second port. We are using a crossover cable and we have been able to get video feed from our computer through a direct connection. Below is our code:
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCameraParams::kResolution_640x480);
camera.WriteBrightness(0);
camera.WriteCompression(20);
We have also tried passing in the camera’s ip address to GetInstance(). Whenever we run our code we get the following error message in the driver station:
ERROR: S_errno_ECONNREFUSED (0x0000003D): Failed to connect to the camera …in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
Right now we don’t know what we’re doing wrong and we really need help. Thanks in advance!