In 2017, a custom utility was written specifically for Inditex which was designed to discover cameras on the network that have changed their IP address. Then it would use evAPI calls to compare the MAC addresses listed in the current configuration to what currently shows in the ARP table, then update the IP plugin’s configuration to connect to the new IP address.
The purpose of this KB is to document what was discovered recently as the existence of this utility was not known to Support and not well known to the current Engineering team.
Inditex ONLY!
This utility was written at Inditex’s insistence as a workaround for an unstable network environment where their cameras would show up with unstable IP addresses.
This is not intended or advertised to be distributed to any other customers. Support should recommend to customers that they stabilize their network environment either by setting static IP addresses, or DHCP reservations.
Build
At the time of this KB, the utility is available in Artifactory HERE.
Only Linux .deb files are provided either for 32 or 64-bit environments.
Installation
The .deb file will need to be transferred to the machine and can be installed with:
sudo dpkg -i <packagename>.deb
This results in a new directory: /usr/local/exacq/autoreconnect/ and a service named autoreconnect is started and set to run at boot.
A configuration file is created here:
/usr/local/exacq/autoreconnect/config/config.json
This config file looks like the following by default:
{
"server_address": "127.0.0.1",
"server_port": 22609,
"server_user": "admin",
"server_password": "admin256",
"detect_interval": 300,
"instance_name": "evStayConnected (Integration)",
"log_level": 0
}
The ‘server_port’, ‘server_user’ and ‘server_password’ sections may need to be modified for the connection to work.
Logs
Daily log files are created and rotated in the following directory:
/usr/local/exacq/autoreconnect/logs
When the service starts (and every 5 minutes thereafter) and successfully connects to the Server, it pulls information for each of the connected IP devices. These will show
INFO CONNECTED_EX callback for device
Then it checks if any current devices are in a disconnected state and logs:
INFO Disconnected devices detected (Count: 1). Starting IP Camera Scan
It will then log discovered cameras. If the current IP/MAC of the camera matches what’s in our config, it gets ignored:
INFO Ignoring ONVIF Camera at IP 10.160.5.131
INFO Discovered Illustra3 device 00-50-F9-XX-XX-XX at IP 192.168.1.131
INFO Ignoring ONVIF Camera at IP 10.160.5.130
INFO Discovered Illustra3 device 00-50-F9-YY-YY-YY at IP 192.168.1.130
If it finds devices that need to be changed, you’ll see:
INFO 1 device(s) found with different IP
INFO Queuing IP change request for disconnected device 4592640 with MAC 00-50-F9-ZZ-ZZ-ZZ. 192.168.1.45 --> 192.168.1.136
Troubleshooting
The logs are pretty verbose and can be utilized to see what action autoreconnect has taken, if any.
For instance, one of Inditex’s sites was failing to connect the cameras after they had changed IP’s and the logs showed:
evAPI connect status code -2 EVAPI_Select error
This was due to the fact that the exacqVision Server service was listening at port 5000 rather than the default port of 22609. After changing that, the initial connection worked, but then we got several more EVAPI_Select errors. The reason was due to the authentication. After fixing their username and password in the config.json file, the utility functioned as expected.