Could not open a camera using the IP adresse

Hello,
I am trying to open a camera using the IP address and I got an error message.

arv-tool-0.8
FLIR-Blackfly S BFS-PGE-04S2M-20285599 (10.1.0.83)
---------------virtual-machine:~$ ping 10.1.0.83
PING 10.1.0.83 (10.1.0.83) 56(84) bytes of data.
64 bytes from 10.1.0.83: icmp_seq=1 ttl=255 time=1.38 ms
64 bytes from 10.1.0.83: icmp_seq=2 ttl=255 time=1.92 ms

my c code is : Eth_Camera = arv_camera_new(“10.1.0.38”, &Eth_Error);
my camera exists and could use it using the arv-viewer-0.8 tool.

the error message when I execute the code is this:

The bandwidth of the USB Camera is 380000000 
The bandwidth of the Ethernet Camera is 0 

** (process:5147): CRITICAL **: 17:47:20.119: arv_camera_is_uv_device: assertion 'ARV_IS_CAMERA (camera)' failed

** (process:5147): CRITICAL **: 17:47:20.119: arv_camera_uv_get_bandwidth: assertion 'arv_camera_is_uv_device (camera)' failed
Found USB_Camera 'Firefly FFY-U3-04S2M'
120 acquisitions took 0.430457 seconds to execute 

I am expecting the same thing as my USB camera already connected but, it seems that the camera is not recognizing, the camera object for the ethernet is not instantiated.
Do you have any idea about this issue, please?

Thank you in advance,

Hi,

I guess there is a typo here in the IP address.

Could you run your code with ARV_DEBUG=all and attach the output here ?

Hello Emmanuel,
Thank you for your answer!

What do you mean by a typo?
I will share tomorrow the output with the flag AVR_DEBUG.
Does the complication with the debug configuration?

The first log says 10.1.0.83, then you wrote 10.1.0.38

yes, this is the problem I guess a typo, but you tell me to add ARV_DEBUG=all.
I’ll test this and I ll back to you.

Emmnuel Hello,
I corrected the IP adresse and I added the ARV_DEBUG=all in my preprocessor.
The compilation output with the verbos oprion is the following:


09:48:54 **** Incremental Build of configuration Release for project 01_Multiple_Aquisition ****
make all 
Building file: ../src/02-multiple-acquisition.c
Invoking: GCC C Compiler
gcc -DCRITICAL -I/usr/include/aravis-0.8 -I"/home/tarik/git/cameras-software/01_Multiple_Aquisition/Inc" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/02-multiple-acquisition.d" -MT"src/02-multiple-acquisition.o" -o "src/02-multiple-acquisition.o" "../src/02-multiple-acquisition.c"
Finished building: ../src/02-multiple-acquisition.c
 
Building file: ../src/ImgFormat.c
Invoking: GCC C Compiler
gcc -DCRITICAL -I/usr/include/aravis-0.8 -I"/home/tarik/git/cameras-software/01_Multiple_Aquisition/Inc" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/ImgFormat.d" -MT"src/ImgFormat.o" -o "src/ImgFormat.o" "../src/ImgFormat.c"
Finished building: ../src/ImgFormat.c
 
Building target: 01_Multiple_Aquisition
Invoking: GCC C Linker
gcc -L/usr/lib/x86_64-linux-gnu -o "01_Multiple_Aquisition" ./src/02-multiple-acquisition.o ./src/ImgFormat.o    -laravis-0.8 -lgobject-2.0 -lpng
Finished building target: 01_Multiple_Aquisition
 

09:48:56 Build Finished. 0 errors, 0 warnings. (took 2s.466ms)

09:48:59 **** Incremental Build of configuration Release for project 01_Multiple_Aquisition ****
make all 
make: Nothing to be done for 'all'.

09:49:00 Build Finished. 0 errors, 0 warnings. (took 338ms)

I execute the code the code and the result is this:

The bandwidth of the USB Camera is 380000000 
The bandwidth of the Ethernet Camera is 0 

** (process:4403): CRITICAL **: 09:49:01.246: arv_camera_uv_get_bandwidth: assertion 'arv_camera_is_uv_device (camera)' failed
Found USB_Camera 'Firefly FFY-U3-04S2M'
120 acquisitions took 0.499622 seconds to execute

I have two cameras in my system, the USB is opened and it works but the second one with the ethernet address is not recognized.

The C code is this:

/* Connect to the first available camera */
	USB_Camera = arv_camera_new(NULL, &USB_error);
	Eth_Camera = arv_camera_new("10.1.0.83", &Eth_Error);

	/* Setting ADC bit Depth */
#ifdef HALFWORD
	// 46 Mb for 120 images
	arv_camera_set_string (USB_Camera, "PixelFormat", "Mono8", &USB_error);
	arv_camera_set_string (Eth_Camera, "PixelFormat", "Mono8", &Eth_Error);
#else
	// 93,3 MB for 120 images
	arv_camera_set_string (USB_Camera, "PixelFormat", "Mono16", &USB_error);
	//arv_camera_set_string (Eth_Camera, "PixelFormat", "Mono16", &Eth_Error);
#endif
	/*
	 * The result is 720*540*10bit*100 image munched 121 images!
	 * I think because the default format is 8bit/px
	 * */
	printf("The bandwidth of the USB Camera is %d \n",
			arv_camera_uv_get_bandwidth(USB_Camera, &USB_error));

	printf("The bandwidth of the Ethernet Camera is %d \n",
			arv_camera_uv_get_bandwidth(Eth_Camera, &Eth_Error));

Hello, the issue is that the first time I open a camera is use NULL in the arv_camera_new, I change it to vendor-serial and it works for me.
the problem was that I don’t specify any argument for the USB camera and it connect to the Ethernet before the USB. now I connect the USB camera using the string vendor and serial and the IP address for the ethernet camera.
Thank you in advance for your help.

I’m glad you have fixed your issue.

A note about ARV_DEBUG: it is not something to be set during the compilation. It is an environment variable to be set before running an aravis based application.

For example, if you are using the bash shell:

ARV_DEBUG=all ./path/to/your/application

https://aravisproject.github.io/aravis/building.html#debugging-aravis