5. IP ADDRESS SETTING AND PING REPLY
S1S60000 Application Note No.2 (Rev.1.1)
EPSON
17
5.2 Setting an IP address by the DHCP server to open the SYSTEM
communication end point
This section describes how to open the SYSTEM communication end point by making setting so that the IP
address of S1S60000 can be received from the DHCP server. Prepare a PC with the DHCP server function or
broadband router with the DHCP function.
Write the send “open” (0x0500: sequence number 05, communication end point number 0=SYSTEM, command
number 0=open) to the command port. The sequence number has been used for to 4 setting the MAC address;
using the number 5 in increment by 1. S1S60000 returns the “write” status (0x0501).
Next, write the “open” command options. Write the following data row to the data port.
Table 5.3 open command option parameters
BYTE Write
data
Contents
Comment
0
0x00
1
0x00
Fixed value
2
0x00
Flag
Bit7 (DATALINK layer is used)=0,
Bit6 (local IP address is enabled)=0
When the setting is made as above, setting of
IP address, subnet mask, and default
gateway is tried using the DHCP.
3
0x00 Fixed
value
4
0x00
5
0x00
6
0x00
7
0x00
Local IP address
8
0x00
9
0x00
10
0x00
11
0x00
Subnet mask
12
0x00
13
0x00
14
0x00
15
0x00
Default gateway
Set by the DHCP server. No specification
required.
S1S60000 returns the “ok” status (0x0503).
The processing to open the SYSTEM communication end point using the DHCP is complete. The DHCP server
automatically sets an IP address after S1S60000 issues the ok status, and therefore the IP address has not yet
been set at this point (when the “ok” status is returned to the host CPU). When the IP address is enabled by the
DHCP, S1S60000 issues the “event” status (0x000a: sequence number 00, communication end point number
0=SYSTEM, status number 10=event). It is not the status corresponding to the command of the host CPU, and
therefore, its sequence number becomes 0.