cRIO unable to connect to camera

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!

What IP address is the camera using? If you want the cRIO to talk to it, the address should be 10.24.84.11.

That’s only true if It’s plugged into the bridge, isn’t it? I thought that if you had the Camera plugged straight into the second port on the 8-module models that the IP should be 192.168.0.90.

The default IP address for the camera has changed this year from the 192 address using the 2nd Ethernet port to .11 on the team subnet with the camera plugged into the switch. This is because we’d like to encourage all teams to do it consistently so it’s easier to help in cases like this and the cRIO II doesn’t have a second port.

So try setting the cameras IP address to 10.x.y.11 (x and y are your team number) and plugging it into the switch. Or if you want to leave it in the second port, call AxisCamera::GetInstance with a string parameter of the IP address.

Brad