How to reset a camera whose control I lost

Hi,
Sometimes, after my program crash, I can no longer control a camera. I get permission denied error codes. I try to use arv-tool to send a DeviceReset command but that did not work. My only solution is to physically disconnect the camera. What is the proper way to reset a camera to power-up status ?

Hi,

Is this a GigEVision or a USB3Vision camera ?

In the GigEVision case, an exclusive access to the camera is kept by a client using a heartbeat register. The client has to read this register before a given timeout i order to keep the exclusive control. By default this timeout is a few seconds, but it can be much longer.

If your program crash, the client does not properly disconnect, which means if you try to reconnect just after the crash, the camera won’t give you the control until the heartbeat timeout.

Hi.

We are using GigEVision. I checked and got
GevHeartbeatTimeout = 3000 min:500 max:10000

So there is no way to force a reset/reboot other than to power cycle the devices ?

Thanks for your quick answer.

What is the output of arv-tool-0.8 control DeviceReset -d all ?

My Flir device returns

[lab@7-12-1-Calibration:~] arv-tool-0.8 control DeviceReset -d all -a 10.0.2.53
[10:37:11.839] πŸ…Έ interface> Found 0 USB3Vision device (among 3 USB devices)
[10:37:11.840] πŸ…Έ device> [GvDevice::new] Interface address = 10.0.0.10
[10:37:11.840] πŸ…Έ device> [GvDevice::new] Device address = 10.0.2.53
[10:37:11.847] πŸ…Έ device> [GvDevice::load_genicam] xml url = 'Local:BFS-PGE-31S4M_017AB016.zip;60000000;11C1A' at 0x200
[10:37:11.848] πŸ…Έ device> [GvDevice::load_genicam] Xml address = 0x60000000 - size = 0x11c1a - BFS-PGE-31S4M_017AB016.zip
[10:37:12.025] πŸ…Έ device> [GvDevice::load_genicam] Zipped xml data
[10:37:12.027] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'xmlns:xi'
[10:37:12.031] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.031] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.043] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.047] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.047] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.047] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.048] πŸ…Έ dom> [GcFeature::set_attribute] Unknown attribute 'Comment'
[10:37:12.050] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.050] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.051] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.051] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.052] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.053] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.053] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.054] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.055] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.055] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.056] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.057] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.058] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.060] πŸ…Έ dom> [Genicam::create_element] Unknown tag (pAlias)
[10:37:12.061] πŸ…Έ genicam> [Gc::set_default_node_data] Add 'GevStreamChannelCount'
[10:37:12.061] πŸ…Έ genicam> [Gc::set_default_node_data] Add 'GevSCPAddrCalc'
[10:37:12.064] πŸ…Έ device> [GvDevice::new] Device endianness = big
[10:37:12.064] πŸ…Έ device> [GvDevice::new] Packet resend     = yes
[10:37:12.064] πŸ…Έ device> [GvDevice::new] Write memory      = yes
[10:37:12.064] πŸ…Έ device> [GvDevice::new] Legacy endianness handling = yes
DeviceReset executed

while my Pleora device returns

[lab@7-12-1-Calibration:~] arv-tool-0.8 control DeviceReset -d all -a 10.0.2.63
[10:39:53.355] πŸ…Έ interface> Found 0 USB3Vision device (among 3 USB devices)
[10:39:53.355] πŸ…Έ device> [GvDevice::new] Interface address = 10.0.0.10
[10:39:53.355] πŸ…Έ device> [GvDevice::new] Device address = 10.0.2.63
[10:39:53.378] πŸ…Έ device> [GvDevice::load_genicam] xml url = 'Local:iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip;3fff8000;71c5' at 0x200
[10:39:53.378] πŸ…Έ device> [GvDevice::load_genicam] Xml address = 0x3fff8000 - size = 0x71c5 - iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip
[10:39:54.140] πŸ…Έ device> [GvDevice::load_genicam] Zipped xml data
[10:39:54.169] πŸ…Έ genicam> [Gc::set_default_node_data] Add 'GevSCPAddrCalc'
[10:39:54.199] πŸ…Έ device> [GvDevice::new] Device endianness = big
[10:39:54.199] πŸ…Έ device> [GvDevice::new] Packet resend     = yes
[10:39:54.199] πŸ…Έ device> [GvDevice::new] Write memory      = yes
[10:39:54.199] πŸ…Έ device> [GvDevice::new] Legacy endianness handling = yes
DeviceReset executed
[10:39:54.713] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:54.714] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:55.219] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:55.219] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:55.721] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:55.721] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:56.226] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:56.226] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:56.727] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:56.727] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[10:39:57.232] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:57.233] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:57.736] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:57.736] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:58.237] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:58.237] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:58.738] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:58.738] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:59.243] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:59.243] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[10:39:59.243] πŸ†† device> [GvDevice::leave_control] Can't relinquish control access

Hi,

Thanks for the logs. It looks like the Pleora device resets itself before sending an acknowledge.

Are these log taken after the device are in need of a hardware reset ?

Do both devices behaves the same after an application crash ?

Here are 2 logs of a Pleora device who would not accept DeviceReset. I had to physically disconnect/connect power and after. First log is before power cycling, and second one after.

[lab@7-12-3-Calibration:~] arv-tool-0.8 -a 10.0.2.63 -d all  control DeviceReset
[15:50:05.592] πŸ…Έ interface> Found 0 USB3Vision device (among 2 USB devices)
[15:50:05.592] πŸ…Έ device> [GvDevice::new] Interface address = 10.0.0.14
[15:50:05.592] πŸ…Έ device> [GvDevice::new] Device address = 10.0.2.63
[15:50:05.605] πŸ…Έ device> [GvDevice::load_genicam] xml url = 'Local:iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip;3fff8000;71c5' at 0x200
[15:50:05.606] πŸ…Έ device> [GvDevice::load_genicam] Xml address = 0x3fff8000 - size = 0x71c5 - iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip
[15:50:06.392] πŸ…Έ device> [GvDevice::load_genicam] Zipped xml data
[15:50:06.420] πŸ…Έ genicam> [Gc::set_default_node_data] Add 'GevSCPAddrCalc'
[15:50:06.428] πŸ†† device> [GvDevice::take_control] Can't get control access
[15:50:06.444] πŸ…Έ device> [GvDevice::new] Device endianness = big
[15:50:06.444] πŸ…Έ device> [GvDevice::new] Packet resend     = yes
[15:50:06.444] πŸ…Έ device> [GvDevice::new] Write memory      = yes
[15:50:06.444] πŸ…Έ device> [GvDevice::new] Legacy endianness handling = yes
DeviceReset executed
[15:50:06.460] πŸ†† device> [GvDevice::leave_control] Can't relinquish control access
[lab@7-12-3-Calibration:~] 
[lab@7-12-3-Calibration:~] 
[lab@7-12-3-Calibration:~] arv-tool-0.8 -a 10.0.2.63 -d all  control DeviceReset
[15:50:34.449] πŸ…Έ interface> Found 0 USB3Vision device (among 2 USB devices)
[15:50:34.449] πŸ…Έ device> [GvDevice::new] Interface address = 10.0.0.14
[15:50:34.449] πŸ…Έ device> [GvDevice::new] Device address = 10.0.2.63
[15:50:34.471] πŸ…Έ device> [GvDevice::load_genicam] xml url = 'Local:iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip;3fff8000;71c5' at 0x200
[15:50:34.472] πŸ…Έ device> [GvDevice::load_genicam] Xml address = 0x3fff8000 - size = 0x71c5 - iport_analog_pro_pt01_an1ip0x_32yg_1_0_0_BAE8924B.zip
[15:50:35.288] πŸ…Έ device> [GvDevice::load_genicam] Zipped xml data
[15:50:35.317] πŸ…Έ genicam> [Gc::set_default_node_data] Add 'GevSCPAddrCalc'
[15:50:35.342] πŸ…Έ device> [GvDevice::new] Device endianness = big
[15:50:35.342] πŸ…Έ device> [GvDevice::new] Packet resend     = yes
[15:50:35.342] πŸ…Έ device> [GvDevice::new] Write memory      = yes
[15:50:35.342] πŸ…Έ device> [GvDevice::new] Legacy endianness handling = yes
DeviceReset executed
[15:50:35.856] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:35.856] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:36.359] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:36.359] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:36.865] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:36.865] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:37.370] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:37.370] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:37.876] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:37.876] πŸ†† device> [GvDevice::read_register] Ack reception timeout
[15:50:38.381] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:38.381] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:38.887] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:38.887] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:39.388] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:39.388] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:39.893] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:39.893] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:40.398] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:40.398] πŸ†† device> [GvDevice::write_register] Ack reception timeout
[15:50:40.398] πŸ†† device> [GvDevice::leave_control] Can't relinquish control access

[lab@7-12-3-Calibration:~]

When you are not able to use the camera with Aravis, are you still able to connect to the camera without a hard reset using Pleora software ?

yes I can connect to the camera but cannot do anything for lack of control access…

I notice that sometimes, on the FLIR camera, they do not even responds to β€œping” anymore, so clearly the only option is power cycling.