Hi, I am running into tubbles again, maybe someone can help me. I am tring to use the standard test functions in the test folder. But for some resons all functions that call camer.X throw the following error:
runfile(’/home/pi/aravis-0.8.20/tests/python/arv-roi-test.py’, wdir=’/home/pi/aravis-0.8.20/tests/python’)
Looking for the first available camera
Traceback (most recent call last):
File “/home/pi/aravis-0.8.20/tests/python/arv-roi-test.py”, line 35, in
camera.set_region(0, 0, 100, 100)
Error: arv-device-error-quark: GigEVision write_register error (access-denied) (3)
Unfortunately it is hard for me to understand the problem. Could any body give me a hint or a solution?
I am using aravis-0.8.20 on a raspberry pi 4.
Thanks a lot!
I aktivated the aravis debug-mode via
export ARV_DEBUG=all
and this is the output:
[21:43:59.362] 🅸 interface> Found 0 USB3Vision device (among 3 USB devices)
[21:43:59.363] 🅸 interface> [GvDiscoverSocket::new] Add interface 127.0.0.1 (127.0.0.1)
[21:43:59.364] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.77 (192.168.0.255)
[21:43:59.364] 🅸 interface> [GvDiscoverSocket::new] Add interface 169.254.105.122 (169.254.255.255)
[21:43:59.364] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.42 (192.168.0.255)
[21:44:00.368] 🅸 interface> Found 0 USB3Vision device (among 3 USB devices)
[21:44:00.369] 🅸 interface> [GvDiscoverSocket::new] Add interface 127.0.0.1 (127.0.0.1)
[21:44:00.370] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.77 (192.168.0.255)
[21:44:00.370] 🅸 interface> [GvDiscoverSocket::new] Add interface 169.254.105.122 (169.254.255.255)
[21:44:00.370] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.42 (192.168.0.255)
Traceback (most recent call last):
File “/home/pi/aravis-0.8.20/tests/python/probieren.py”, line 33, in
camera = Aravis.Camera.new (None)
gi.repository.GLib.Error: arv-device-error-quark: No supported device found (6)
pi@raspberrypi:~/aravis-0.8.20/tests/python $ python3 probieren.py
[21:50:54.831] 🅸 interface> Found 0 USB3Vision device (among 3 USB devices)
[21:50:54.831] 🅸 interface> [GvDiscoverSocket::new] Add interface 127.0.0.1 (127.0.0.1)
[21:50:54.832] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.77 (192.168.0.255)
[21:50:54.832] 🅸 interface> [GvDiscoverSocket::new] Add interface 169.254.105.122 (169.254.255.255)
[21:50:54.832] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.42 (192.168.0.255)
[21:50:54.836] 🅸 interface> [GvInterface::discovery] Device ‘Hikvision-MV-CA060-10GC-02D32724056’ found (interface 169.254.105.122) user_id ‘LAN1’ - MAC ‘c4:2f:90:f4:a6:4b’
[21:50:54.840] 🅸 interface> [GvInterface::discovery] Device ‘Hikvision-MV-CA060-10GC-02D32724056’ found (interface 192.168.0.77) user_id ‘LAN1’ - MAC ‘c4:2f:90:f4:a6:4b’
[21:50:55.843] 🅸 interface> Found 0 USB3Vision device (among 3 USB devices)
[21:50:55.844] 🅸 device> [GvDevice::new] Interface address = 192.168.0.77
[21:50:55.844] 🅸 device> [GvDevice::new] Device address = 192.168.0.78
[21:50:55.845] 🅸 device> [GvDevice::load_genicam] xml url = ‘Local:Hikvision_GigE_Vision_1_V2_5_0.zip;100000;dd32’ at 0x200
[21:50:55.846] 🅸 device> [GvDevice::load_genicam] Xml address = 0x100000 - size = 0xdd32 - Hikvision_GigE_Vision_1_V2_5_0.zip
[21:50:56.000] 🅸 device> [GvDevice::load_genicam] Zipped xml data
[21:50:56.008] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘xmlns:mstns’
[21:50:56.028] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
…
[21:50:56.215] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
[21:50:56.217] 🅸 genicam> [Gc::set_default_node_data] Add ‘GevSCPAddrCalc’
[21:50:56.219] 🆆 device> [GvDevice::take_control] Can’t get control access
[21:50:56.221] 🅸 device> [GvDevice::new] Device endianness = little
[21:50:56.222] 🅸 device> [GvDevice::new] Packet resend = yes
[21:50:56.222] 🅸 device> [GvDevice::new] Write memory = yes
[21:50:56.222] 🅸 device> [GvDevice::new] Legacy endianness handling = yes
Traceback (most recent call last):
File “/home/pi/aravis-0.8.20/tests/python/probieren.py”, line 38, in
camera.set_region (0,0,128,128)
gi.repository.GLib.Error: arv-device-error-quark: GigEVision write_register error (access-denied) (3)
[21:50:56.236] 🆆 device> [GvDevice::leave_control] Can’t relinquish control access
But I still can’t do much with it. Does anyone have a tip?
Hi,
Sounds like there is another process that has an exclusive control access to the camera.
Do you have another process running that is communicating with the camera ?
there seems to be some parsing issues of the xml as well.
Hey,
Thanks for the help, in fact the camera was probably in use. The output is different now, but unfortunately I an register error - but this time not access-denied but invaild-parameter:
File “/home/pi/aravis-0.8.20/tests/python/arv-camera-test.py”, line 30, in
camera.set_region (0,0,128,128)
gi.repository.GLib.Error: arv-device-error-quark: GigEVision write_register error (invalid-parameter) (3)
If I comment out the part (camera.set_region (0,0,128,128)), the programme seems to run through.
Debug Output:
pi@raspberrypi:~ $ python3 /home/pi/aravis-0.8.20/tests/python/arv-camera-test.py
[11:48:49.627] 🅸 interface> Found 0 USB3Vision device (among 4 USB devices)
[11:48:49.628] 🅸 interface> [GvDiscoverSocket::new] Add interface 127.0.0.1 (127.0.0.1)
[11:48:49.628] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.0.77 (192.168.0.255)
[11:48:49.628] 🅸 interface> [GvDiscoverSocket::new] Add interface 169.254.105.122 (169.254.255.255)
[11:48:49.628] 🅸 interface> [GvDiscoverSocket::new] Add interface 192.168.190.117 (192.168.191.255)
[11:48:49.632] 🅸 interface> [GvInterface::discovery] Device ‘Hikvision-MV-CA060-10GC-02D32724056’ found (interface 169.254.105.122) user_id ‘LAN1’ - MAC ‘c4:2f:90:f4:a6:4b’
[11:48:49.636] 🅸 interface> [GvInterface::discovery] Device ‘Hikvision-MV-CA060-10GC-02D32724056’ found (interface 192.168.0.77) user_id ‘LAN1’ - MAC ‘c4:2f:90:f4:a6:4b’
[11:48:50.639] 🅸 interface> Found 0 USB3Vision device (among 4 USB devices)
[11:48:50.639] 🅸 device> [GvDevice::new] Interface address = 192.168.0.77
[11:48:50.639] 🅸 device> [GvDevice::new] Device address = 192.168.0.79
[11:48:50.641] 🅸 device> [GvDevice::load_genicam] xml url = ‘Local:Hikvision_GigE_Vision_1_V2_5_0.zip;100000;dd32’ at 0x200
[11:48:50.641] 🅸 device> [GvDevice::load_genicam] Xml address = 0x100000 - size = 0xdd32 - Hikvision_GigE_Vision_1_V2_5_0.zip
[11:48:50.763] 🅸 device> [GvDevice::load_genicam] Zipped xml data
[11:48:50.769] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘xmlns:mstns’
[11:48:50.785] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
[11:48:50.786] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
[11:48:50.789] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
.
.
.
[11:48:50.979] 🅸 dom> [GcFeature::set_attribute] Unknown attribute ‘Comment’
[11:48:50.981] 🅸 genicam> [Gc::set_default_node_data] Add ‘GevSCPAddrCalc’
[11:48:50.985] 🅸 device> [GvDevice::new] Device endianness = little
[11:48:50.985] 🅸 device> [GvDevice::new] Packet resend = yes
[11:48:50.985] 🅸 device> [GvDevice::new] Write memory = yes
[11:48:50.985] 🅸 device> [GvDevice::new] Legacy endianness handling = yes
<Aravis.Camera object at 0xb58ed088 (ArvCamera at 0x115f760)>
Traceback (most recent call last):
File “/home/pi/aravis-0.8.20/tests/python/arv-camera-test.py”, line 30, in
camera.set_region (0,0,128,128)
gi.repository.GLib.Error: arv-device-error-quark: GigEVision write_register error (invalid-parameter) (3)
@Tobias_Lindblom
Are there approaches to fix or work around this error?
Any help is much appreciated
So aravies queries the camera for an xml file containing the settable parameters and register adress, datatype and such for the parameters.
There seem to be some issues parsing this file but I am not sure this is connected to your problem.
It is possible the “set_region” does not work on your camera, or that its called something else (And aravis does not know) in the xml file.
Could you post a link to xml file ?
Could you show the output of arv-tool-0.8 control Width Height OffsetX OffsetY
?
May be there is some restrictions on the values for these features (min, max or inc).
Hi all,
I was off for a few days, so sorry for the late reply.
@Emmanuel
The output of
is
pi@raspberrypi:~/aravis-0.8.20/build/src $ arv-tool-0.8 control Width Height OffsetX OffsetY
Hikvision-MV-CA060-10GC-02D32724056 (192.168.0.79)
Width = 3072 min:376 max:3072 inc:4
Height = 2048 min:320 max:2048 inc:2
OffsetX = 0 min:0 max:0 inc:2
OffsetY = 0 min:0 max:0 inc:2
@Tobias_Lindblom
May I ask where and how to get xml file? I assume it is somewhere stored on the camera? I tried with SADP-Tool but was not able to find the camera. Is there an other way or tool to export xml file?
Again, thanks for your time and help
That explains the invalid-parameter
error. The minimum ROI size is 376×320 pixels.
arv-tool-0.8 genicam > hikvision_camera.xml
Hey @Tobias_Lindblom
not sure if this is still needed because i dont have that error anymore. I increased the minimum value like Emmanuel suggested - thanks for that!.
Just in case here is the xml file.
Have a good day!
1 Like