The RS-232 connection on a ControlSpace® device can be used to find the current Ethernet settings or it can be used to apply new Ethernet settings. Any RS-232 terminal program can be used to connect to a ControlSpace device using RS-232.
Once a terminal session has been opened, serial commands can be used to query the existing Ethernet settings or make changes to those settings. Serial commands sent to a ControlSpace device must use all upper-case letters. The commands needed are all listed on pages 11 and 12 in the serial protocol document.
IP - The most commonly used command is simply IP. When the characters “IP” are sent followed by a carriage return, the device will respond back with its current IP address. If you only want to identify the current IP address, this is the only command you will need.
NP – You can also use “NP” which is the Network Parameter command, for which you need to identify the parameter you are currently trying to query. The three choices are subnet mask, gateway, and type.
NP M - To find the subnet mask of this device, send “NP M”, followed by a carriage return. The device will reply with the current subnet mask.
NP G – To find the default gateway, send “NP G”, followed by a carriage return. The device will reply with the current gateway.
NP T – To find whether the current IP address is DHCP or static, send
“NP T”, followed by a carriage return. The device will reply with either D or S to indicate DHCP or Static IP addressing.
Changing settings – The syntax for sending commands to change settings within the processor is the same as the replies received from the device. To change the device to static IP, use the command “NP T,S”. To set the device to a specific IP address, use IP 192.168.0.165.
Activating and confirming changes – After changing any IP settings, the original query commands can be used to confirm the changes, but none of the changes will be active until the device has rebooted. If a serial command is used to change the IP address, and then the IP command is used to query the IP address, the device will respond with the old IP address. If the NP T command is used, the response will indicate that the device is still using DHCP addressing because the device continues to use the original settings until it has been rebooted.
Reboot – To reboot the device from the serial command window, enter “RESET”, followed by a carriage return. The device will reboot and then display, “Ready”. The reboot process will take at least 30 seconds. During that time, the serial connection will remain open and the Ready response will appear when the reboot is completed.
After rebooting the device, the IP and NP T commands can be used to confirm the new settings.
DHCP Note – The Ready response comes from the device when it finishes the boot cycle. If the device has been set to DHCP mode, it may not have a DHCP address immediately. If the IP address is queried immediately after a reboot, the device may display its default IP address while waiting for a DHCP address. Waiting for a DHCP address may take up to 30 seconds.
NP F – If necessary, the device may be reset to the default network configuration by sending “NP F”, followed by a carriage return. When the device is rebooted, it will be returned to the factory default network settings.