Failed to Connect to the Camera

Hi,
I setup my camera with the 2012 camera setup utility. I plugged it into the port 2 of the cRIO. and in my code i wrote

public class RobotTemplate extends SimpleRobot {

AxisCamera cam;

public RobotTemplate() {
    cam = AxisCamera.getInstance("192.168.0.90");
}

But I keep getting this exception
[cRIO] >>>>ERROR: S_errno_EHOSTDOWN (0x00000043): Failed to connect to the camera …in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
[cRIO] Too much error data!
[cRIO]

What is the problem? Thanks in advance.

I’ve had this issue before. I’m not sure why, but it doesn’t seem possible to connect to the camera by providing an IP. If you remove the IP specification and make it AxisCamera.getInstance(), you shouldn’t have this problem anymore. If anyone knows why this is, I’m actually interested because I’m having camera issues myself that may be related to this; it’s giving an incompatible mode error, saying that it’s receiving bad packets without “content lengths”. I’d make my own thread, but at the moment I don’t have physical access to the camera and don’t want to start a thread with incomplete information. If I haven’t solved the issue by the time I have access, I’ll make my own thread.

I tried AxisCamera.getInstance() too but I still got the same error.

Are you getting camera feedback through the driver station?

No, i can’t get the camera feed to show up on the dashboard.

I’d suggest plugging the camera into the router. That way the CRIO doesn’t have to worry about sending the camera image to the driver station - the DS can read from the camera via the router. It also helps to split camera config problems from robot config problems - if the DS can see the camera than you know that the camera is OK.

You’d have to configure the camera to use the correct 10.te.am.ZZ address.

I got the exact same problem. I managed to fix it by hard resetting the camera and reconfiguring it with the newest camera setup tool (there’s been an update since kickoff). And using getInstance(“10.te.am.11”);