5. IP ADDRESS SETTING AND PING REPLY
S1S60000 Application Note No.2 (Rev.1.1)
EPSON
15
5. IP ADDRESS SETTING AND PING REPLY
To set an IP address in S1S60000, it is necessary to open the SYSTEM communication end point
(communication end point 0). Opening the SYSTEM communication end point enables S1S60000 to reply to
pings. At the SYSTEM communication end point, write the open command, read the write status, write the
command option parameters, and read the ok status sequentially. This is the same procedure as that for the send
command when setting the MAC address.
This chapter describes how to open the SYSTEM communication end point by specifying an IP address by the
host CPU, and how to set an IP address from the DHCP server.
These are exclusive methods. If you perform one method and then perform the other method, reset S1S60000
once before starting the latter.
5.1 Specifying an IP address to open the SYSTEM communication end point
This section describes how to open the SYSTEM communication end point at the IP address 192.168.0.2,
subnet mask 255.255.255.0, and gateway 192.168.0.1 of S1S60000.
Write the “open” command (0x0500: sequence number 05, communication end point number 0=SYSTEM,
command number 0=open) to the command port. The sequence number has been used to 4 for setting the MAC
address, use number 5 in increment by 1. S1S60000 returns the write status 0x0501.
For information on the “open” command, refer to the “S1S60000 Series Host Interface Manual - 3.1 open
command”.
Write the option parameters of the “open” command. Write the following data row to the data port.
Table 5.1 open command option parameters
BYTE Write
data
Contents
Comment
0
0x00
1
0x00
Fixed value
2
0x70
Flag
Bit7 (DATALINK layer is used)=0,
Bit6 (local IP address is enabled)=1,
Bit5 (subnet mask is enabled)=1,
Bit4 (default gateway is enabled)=1,
Bit0 (SOPAR is not used)=0
3
0x00 Fixed
value
4
0xc0
5
0xa8
6
0x00
7
0x02
Local IP address
192.168.0.2
(0xc0.0xa8.0x00.0x02)
8
0xff
9
0xff
10
0xff
11
0x00
Subnet mask
255.255.255.0
(0xff.0xff.0xff.0x00)
12
0xc0
13
0xa8
14
0x00
15
0x01
Default gateway
192.168.0.1
(0xc0.0xa8.0x00.0x01)