
33
Network Dynamic IP Address Mode ($ND):
This command sets, or queries the present setting, of DHCP (Dynamic IP address mode). Any changes will be used
after the next device power up.
Parameters:
No parameter -> queries present setting, replies 0 (DHCP OFF) or 1 (DHCP ON)
0 -> disables DHCP, replies *OK or *UNCHANGED
1 -> enables DHCP, replies *OK or *UNCHANGED
Timeout for DHCP Lease ($TD):
This command returns the remaining time (in seconds) for the dynamic IP address allocated by the local network,
when using DHCP (dynamic IP address allocation). When not using DHCP, the command is not relevant.
Examples:
$TD -> *259188 [Using DHCP; 259,188 seconds or approximately 3 days, are left on the lease. The number returned
will decrease by 1 every second]
$TD -> *-290 [Not using DHCP; the lease time is zero, so the time left on the lease is negative, -290 seconds,
decreasing by 1 every second. 290s is the time since the device was last started up]
Background:
If DHCP is enabled, the device requests a new IP address whenever it powers up. Along with the IP address, the
network provides a “lease time” during which the device is allowed to use the IP address allocated for it. Typically
this time will be a few days or one week. After this time, the device is supposed to refresh the connection and
request a new IP address from the network (in most cases, the same IP address will be allocated again).
This command returns the time remaining during which the device is allowed to use the IP address allocated, and
counts down continually from the moment the IP address is allocated, with precision of one second.
In most cases the device is not likely to be connected to the network for many days at a time without a power-up or
a reset; but if it is, the user’s software will need to take care to periodically refresh the connection before the
timeout limit is reached.
Note:
No action is taken by the EA-1 device firmware when the timeout drops down to zero. The host software should
take this into account on its own. In addition, the “OphirEthernetApp” software takes no action regarding this
timeout and does not monitor it. The user should be aware to reset the device periodically when a connection is made
for more than a day or two.
General Notes on Commands:
The commands listed below are common to most Ophir devices, and not specific to the EA-1 Ethernet Adapter. They
can be used to control the device settings and take measurements of power and energy from the sensor. This sub-
section lists some general notes about these commands.
Standard Error Messages:
If a command is not recognized or the parameters are incorrect, for most standard commands one of the following
error messages will be returned:
?BAD PARAM[CR]– if incorrect parameters received, for example the wrong number or missing parameters, when
they are needed.
?UC[CR] <the 2 first characters received which were not recognized>
?BAD COMMAND 66,65 – if a single character instead of a double character command code is entered
Note:
The exact error messages may differ slightly for some commands.
Note:
In cases where the command termination is listed as “[CR]” only, the intention is “[CR][LF]” as above.