The eSDK API provides the followin functions configure the camera's network IP settings:
EVT_ForceIP
– Set the IP address on a camera that is already openEVT_ForceIPEx
– Set the IP address on a camera that is not openEVT_IPConfig
– Set a persistent IP address on a camera through bootFor information about other types of eSDK API functions, see the eSDK API Functons Overview.
EVT_ForceIP
Description: Sets the IP address on a camera that is already open.
Prototype:
EVT_ERROR EVT_ForceIP(
CEmergentCamera* camera,
const char* ipAddress,
const char* subnetMask,
const char* defaultGateway
);
Parameters:
camera
: Camera handle.ipAddress
: IP address to set (e.g., "192.168.1.70").subnetMask
: Subnet mask to set (e.g., "255.255.255.0").defaultGateway
: Default gateway to set.Return Values:
EVT_SUCCESS
EVT_ERROR_DEVICE_NOT_CONNECTED
EVT_ERROR_INVAL
EVT_ERROR_SOCK
EVT_ERROR_GVCP_ACK
EVT_GENERAL_ERROR
Usage Example:
EVT_ForceIP(camera, "192.168.1.70", "255.255.255.0", "192.168.1.1");
EVT_ForceIPEx
Description: Sets the IP address on a camera that is not open.
Prototype:
EVT_ERROR EVT_ForceIPEx(
const char* macAddress,
const char* ipAddress,
const char* subnetMask,
const char* defaultGateway
);
Parameters:
macAddress
: MAC address of the camera (e.g., "E0:55:97:00:12:34").ipAddress
: IP address to set (e.g., "192.168.1.70").subnetMask
: Subnet mask to set (e.g., "255.255.255.0").defaultGateway
: Default gateway to set.Return Values:
EVT_SUCCESS
EVT_ERROR_DEVICE_NOT_CONNECTED
EVT_ERROR_INVAL
EVT_ERROR_SOCK
EVT_ERROR_GVCP_ACK
EVT_GENERAL_ERROR
Usage Example:
EVT_ForceIPEx("E0:55:97:00:12:34", "192.168.1.70", "255.255.255.0", "192.168.1.1");
Note: You can derive the camera's 12-character hexadecimal MAC address (six pairs) by appending the six-character hexadecimal representation of the camera's serial number to Emergent's OUI ("E0:55:97"). For example, if the camera's serial number is 4660, converting it from decimal to a six-character hexadecimal format gives 001234. Appending this to Emergent's OUI results in the MAC address E0:55:97:00:12:34.
EVT_IPConfig
Description: Sets the IP address on a camera and makes it persistent across boots.
Prototype:
EVT_ERROR EVT_IPConfig(
CEmergentCamera* camera,
bool usePersistentIP,
const char* ipAddress,
const char* subnetMask,
const char* defaultGateway
);
Parameters:
camera
: Camera handle.usePersistentIP
: Set to true
to use persistent IP, or false
for DHCP.ipAddress
: Persistent IP address to set (e.g., "192.168.1.70").subnetMask
: Persistent subnet mask to set (e.g., "255.255.255.0").defaultGateway
: Persistent default gateway to set.Return Values:
EVT_SUCCESS
EVT_ERROR_DEVICE_NOT_CONNECTED
EVT_ERROR_INVAL
EVT_ERROR_SOCK
EVT_ERROR_GVCP_ACK
EVT_GENERAL_ERROR
Usage Example:
EVT_IPConfig(camera, true, "192.168.1.70", "255.255.255.0", "192.168.1.1");