Is it possible to change the IP of a connected camera?


Was just wondering if there’s anyway to change the IP address of a camera that’s been connected?

I have a program that can do this on Windows but would like to see if there’s any support for it on Aravis as it would be very convenient to implement in my own program on Linux.



Unfortunately, there is no camera IP configuration API yet in aravis.



It is actually not that hard. You can probably do it yourself.
I created a function to set the persistent IP of the camera the following way:

set the “GevPersistentIPAddress” property (you have to convert the ip address to an integer value).
set the “GevPersistentSubnetMask” property (again int value).
set the “GevCurrentIPConfigurationDHCP” property to False.
set the “GevCurrentIPConfigurationPersistentIP” property to True.

If you want to go back to DHCP mode, that in my camera is the default mode, just have to set back the “GevCurrentIPConfigurationDHCP” property to True and the “GevCurrentIPConfigurationPersistentIP” property to False.

See if your genicam file has the mentioned registers, or something similar and you can follow the same procedure.