
7.4.4. Set the gateway address
Description
: Gateway address can be set as follows.
Format
Example
Command {IP_GATEWAY=<gateway_
addr>}
Response (IP_GATEWAY=<gateway_
addr>)CrLf
{ip_gateway=192.168.0.50}
(IP_GATEWAY=192.168.0.50)CrLf
Legend
:
<gateway_addr>:
Four decimal octets separated by dots.
INFO
The gateway address can be queried by typing the “ip_gateway=?” command. The
response contains the static IP gateway address that is stored in the device even if DHCP
is enabled. In that case, the latest valid gateway address (for static IP) is stored.
7.4.5. Set the TCP/IP port
Description
: TCP/IP port setting can be set as follows.
Format
Example1
Command {LW2_PORT=<port_nr>}
Response (LW2_PORT=<port_nr>)CrLf
{lw2_port=10001}
(LW2_PORT=10001)CrLf
Explanation
: The port number for LW2 protocol is set to 10001 (default value).
Format
Example2
Command {LW3_PORT=<port_nr>}
Response (LW3_PORT=<port_nr>)CrLf
{lw3_port=6107}
(LW3_PORT=6107)CrLf
Explanation
: The port number for LW3 protocol is set to 6107 (default value).
INFO
The TCP/IP port can be queried by typing the “lw2_port=?” and “lw3_port=?” commands.
7.5. GPIO settings
7.5.1. Query the state of a GPIO pin
Description
: The state of a GPIO pin can be queried as follows.
Format
Example
Command {GPIO<pin_nr>=?}
Response (GPIO<pin_nr>=<direction>;
<level>)CrLf
{gpio1=?}
(GPIO1=I;H)CrLf
Legend
:
<pin_nr>:
GPIO pin number (1-7).
<direction>:
Direction of the pin: I = input, O = output.
<level>:
H = high level, L = low level.
Explanation
: GPIO pin #1 is input, input level is high.
Page 58 / 106
LW2 programmers' reference