How to restart after "control-lost" signal

how can I restart my gige camera after “control-lost” signal.
What I’m doing now is calling:

  • arv_camera_stop_acquisition (arvcam->camera);
  • g_object_unref (arvcam->stream);
  • g_object_unref (arvcam->camera);
    then restarting all from beginnning:
  • arvcam->camera = arv_camera_new (arv_get_device_id (id));
  • arvcam->stream = arv_camera_create_stream (arvcam->camera, NULL, NULL);
  • arv_stream_push_buffer (arvcam->stream, arv_buffer_new (payload, NULL));
  • arv_camera_start_acquisition (arvcam->camera);
    (plus other secondary settings…)

The camera seems to work fine: param setting, soft trigger…
buffer = arv_stream_timeout_pop_buffer (arvcam->stream,timeout);
always return buffer==NULL;

Any advice?

Hi Mirco,

Which version of aravis are you using ?

There is a reference leak in 0.7.4 that prevents the disconnection of the camera. Does the acquisition work if you wait for 10 or 20 seconds after the control-lost signal ?

Hi Emmanuel,
I’m using version 0.6.4 with a DFK 39 TIS camera.
The signal “control lost” is due to a breakpoint stop while debugging,
and if I wait some seconds into the breakpoint the acquisition doesn’t restart (I’m using soft-trigger in TriggerMode)

Hi mirco,

Try to increase the heartbeat timeout (GevHeartbeatTimeout feature) and set it to a value that lets you enough time before you resume the execution of your software.

1 Like

Hi Emmanuel
I’m very interesting in method to increase the heartbeat timeout.But I don’t know how to use API for GevHeartbeatTimeout feature,Could you give me an example or link to show how to call some function to increase the heartbeat timeout.
Look forward your reply, Thanks!


Sorry for the late reply.

You may try:

arv_camera_set_integer (camera, "GevHeartbeatTimeout", your_timeout_ms, NULL);

If GevHeartbeatTimeout is not a defined feature on your camera, you may try to access the register directly:

ArvDevice *device;

device = arv_camera_get_device (camera);
arv_device_write_register (device, 0x938, your_timeout_ms, NULL);

I’m not sure if this register is supposed to always have read/write access though.