Authentication Failed Axis M1011

I have my code set up to connect to and send camera data to the dashboard. I had it working with the Microsoft LifeCam HD-3000, but when I set it up with an Axis M1011 (since I wanted manual control of exposure and other settings) I got authentication errors. We are programming our robot in Java this year, but in previous years we used LabVIEW. I remember fixing this by setting the camera to either a username/password combo of one of the following:

root, pas
root, admin

I found those combinations in the LabVIEW WPIlib vision code. However, none of these fix the error.

This is the error:

ERROR Unhandled exception: VisionException [ IMAQdxError: -1074360268: The camera is configured with password authentication and either the user name and password were not configured or they are incorrect.] at [ Method),,, edu.wpi.first.wpilibj.CameraServer.startAutomaticCapture(, org.usfirst.frc.team1124.robot.DashboardConnection.initCamera(, org.usfirst.frc.team1124.robot.Robot.robotInit(, edu.wpi.first.wpilibj.IterativeRobot.startCompetition(, edu.wpi.first.wpilibj.RobotBase.main(]

The code getting the camera stream:

CameraServer srv = CameraServer.getInstance();
USBCamera camera = new USBCamera("cam1");
srv.setSize(1); // 320x240

Does anyone know how to get this working?

Also: When I set it to allow viewing without password (from the axis config page) the Java code spams out this error:

Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(

Edit: I found how to edit the exposure of the Microsoft Camera using the USBCamera class, but I won’t be able to test it until tomorrow. If someone has an answer to this issue it would still be appreciated.

The AXIS M1011 isn’t a USB camera so I suspect the problem is right around here:

USBCamera camera = new USBCamera("cam1");

Hope that helps. I could be wrong.

Java is odd, so it actually still uses the USBCamera class for IP cameras, but thanks anyways!

Try building the Example project,

In Eclipse it can be found in

File-> New Project> Example Robot Project -> Vision -> Axis Camera Sample

In order for it to work you must follow the setup instructions here

Best of luck!

That’s weird. I could have sworn we used the AxisCamera class to get to it last year.

I would advise against using the Axis netcam. It has a nasty habit of deciding to stop working for without warning for nebulous reasons. If you can use a USB camera instead, do so.

Why are you trying to use the CameraServer to stream data from the Ethernet camera to the dashboard? The Dashboard can connect directly to the camera and save you a lot of roboRIO CPU cycles.

That hasn’t been my experience with them. I use about 28 of the Axis M1011 and M1013 for security cameras and I track their uptime with Nagios checking them every 60 seconds. Most of them were at 100% uptime for 2015 if you remove instances where I had the network down for maintenance reasons. I might have 4-5 instances in a year where our weekly drop off the grid to generator power and back again mucks with the camera just right to keep it from coming back on.

In short: If you keep them powered up they keep trucking.

I have seen one of them flake out after 3 years of service though. Some days it would work and some not.

The issues I have had have all been their IP configuration somehow getting screwed up. We lost our camera halfway through last year due to this, with no discernible cause. We were not able to get it working again, despite the aid of several CSA’s and multiple hours of dedicated effort.

I didn’t know that existed, but I found it (when I looked at the examples which I hadn’t done before…).

When I set it up I got another error:

ERROR Unhandled exception: VisionException [ imaqError: -1233721680: Unknown error] at [ Method),,, org.usfirst.frc.team1124.robot.dashboard.DashboardConnection.initCamera(, org.usfirst.frc.team1124.robot.Robot.robotInit(, edu.wpi.first.wpilibj.IterativeRobot.startCompetition(, edu.wpi.first.wpilibj.RobotBase.main(]

But at this point we are just going to use the USB camera.

Note to anyone who has this error in the future:

The axis camera only works when the robot is enabled, so only execute camera.getImage() when the robot is enabled.