Go to Post I don't have enough vacation time for them to start allowing video replay. - TJP123 [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 15 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 27-01-2015, 23:33
JohnGaby JohnGaby is offline
Registered User
FRC #2102
 
Join Date: Jan 2014
Location: Encinitas
Posts: 24
JohnGaby is an unknown quantity at this point
Using the Axis Camera with the RoboRio

I am trying to use the Axis camera with the new control system and am having some problems. In past years, we set up the camera's IP using the team number. For example, our team is 2102, so the Axis camera IP was set to 10.21.2.11.

However, if I plug in a camera that has that IP, I do not seem to be able to access it from my PC by connecting to http://10.21.2.11 like I used to. Now this new control system uses mDNS, and I read that the camera needs to be configured to use DCHP rather than a fixed IP, so I made that change. I then tried to connect to the camera using the url 'axis-camera.local', and lo and behold, it worked, and everything seemed well.

However, when I started using the camera in my program, I connected to it like this:

AxisCamera * m_pCamera = new AxisCamera("axis-camera.local");

However doing so caused the following error to be printed repeatedly while the program was running, and I could not reliably capture images from the camera (although it seemed to work sometimes).

Error on line 582 of AxisCamera.cpp: Network is unreachable (0x00000065): Error setting camera parameters

I noticed that the Axis camera example that was supplied was still using a fixed address, so I thought that I might need to specify the actual address instead of "axis-camera.local". I pinged the camera from my PC and found that the address was 169.254.18.155. So I tried creating the camera using:

AxisCamera * m_pCamera = new AxisCamera("169.254.18.155");

and everything seem to work correctly. However, since the camera is getting it's IP using DCHP, I am assuming that I cannot count on the IP always being this value. So I decided to try using the linux function 'gethostbyname' and pass in "axis-camera.local" and see what address came back.

Sure enough, the address resolved to "169.254.18.155" as expected. So all seemed well, until I found that occasionally when I ran the program I still was getting the 'Network is unreachable' error. Upon further investigation, I discovered that SOMETIMES 'gethostbyname' was returning '10.21.2.11' instead of '169.254.18.155'. There seems to be no rhyme or reason to when it would do this.

I am hoping that someone can shed some light on this and tell me how to configure the camera so that I can count on it working properly when we are in a live compitition.

Thanks.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi