advertisement
WIZ127
SR User’s Manual
(Version 1.0)
© 2013 WIZnet Co., Ltd. All Rights Reserved.
☞ For more information, visit our website at http://www.wiznet.co.kr
Document Revision History
Date Revision Changes
2013-04-01 V1.00 Official Release
Information in this document is belived to be accurate and reliable. However, WIZnet does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information.
WIZnet reserves the right to make changes to information published in this document, including without limitation specifictions and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof.
WIZ127SR User’s Manual ii
COPYRIGHT NOTICE
Copyright 2013 WIZnet Co., Ltd. All Rights Reserved.
Contact Information
-
WIZnet US : [email protected]
-
WIZnet HK : [email protected]
-
WUZnet EU : [email protected]
-
WIZnet HQ : [email protected]
For more information, visit our website at http://www.wiznet.co.kr
WIZ127SR User’s Manual iii
Table of Contents
........................................................................................... 2
.................................................................................................. 4
................................................................................................ 4
............................................................................................. 15
.............................................................................................. 19
............................................................................................. 19
.......................................................................................... 19
.......................................................................................... 28
WIZ127SR User’s Manual iv
Figures
........................................................................................ 5
EFERENCE SCHEMATIC FOR INTERFACING TO
RS485/422 ...................................................... 6
) ............................................................. 20
) .................................................................. 23
) ................................................................. 27
......................................................................................... 32
............................................................................................ 33
WIZ127SR User’s Manual v
Tables
.................................................................................... 7
......................................................................... 7
......................................................................................... 7
......................................................................... 16
.............................................................. 17
....................................................................... 17
............................................................... 17
...................................................... 18
WIZ127SR User’s Manual vi
1. Introduction
WIZ127SR is a 2 ports gateway module that converts RS-232 protocol into TCP/IP protocol.
This module enables remote gauging, remote management of the device through the network based on the Ethernet and the TCP/IP by connecting to existing equipment with RS-232 serial interface. In other words, WIZ127SR is a protocol converter that transmits the data sent by serial equipment as TCP/IP data type or vice versa.
1.1. Key Feature
-
Plug & Play Type Serial to Ethernet Gateway module
Adds Network Function Simply and Quickly
Provides Firmware Customization
-
Hardware compatible with WIZ100SR
-
2port serial to Ethernet
supports RS-232
supports RS-422/485 by adding RS-232 to RS-422/485 converter
-
Supports TCP & UDP communication
-
Supports DHCP, DNS, NTP
-
Easy configuration
Web, Telnet, Configuration Tool & Serial Command
-
GPIO Extendable (Max. 10GPIOs), by firmware customization
-
10/100 Ethernet & Max.921,600bps Serial Interface
-
Supports Static IP, DHCP, PPPoE
-
Supports DNS function
-
RoHS compliant
WIZ127SR User’s Manual 1
2. Hardware Specifications
2.1. Pin Assignment and Description
Pin name
RESET
UART1_TX
UART1_RX
UART1_CTS
UART1_RTS
UART2_CTS
UART2_RTS
UART2_TX
UART2_RX
(*)STATUS1
STATUS2
RXIN
RXIP
TXON
TXOP
LINKLED_M0
SPDLED_M1
FDXLED_M2
VDD3V3
VDD3V3A
PB11
PC14
PC15
UART2_CTS
UART2_RTS
UART2_TX
UART2_RX
STATUS2
PB11
PB12
PB13
PB14
PB15
PB12, PB13
PB14, PB15
PB0, PB1, PB5
4
5
6
7
1
2
3
10
11
12
8
9
J3
UART1_TX
UART1_RTS
PB0
UART1_RX
UART1_CTS
PB1
RESET
STATUS1
2.0mm HEADER 12x1
VDD3V3
4
5
6
7
1
2
3
10
11
12
8
9
J1
2.0mm HEADER 12x1
Figure 1 Pin Assignment
VDD3V3A
J2
4
5
6
7
1
2
3
8
9
10
11
12
2.0mm HEADER 12x1
LINKLED_M0
PB5
SPDLED_M1
FDXLED_M2
RXIN
RXIP
TXON
TXOP
VDD3V3
Description
Reset (Active High)
TX Data Output for UART1
RX Data Input for UART1
Clear To Send for UART1
Request To Send for UART1
Clear To Send for UART2
Request To Send for UART2
TX Data Output for UART2
RX Data Input for UART2
High: Not connected
Low: Connected
High: Not connected
Low: Connected
Ethernet Differential Input-
Ethernet Differential Input+
Ethernet Differential Output-
Ethernet Differential Output+
Ethernet Link LED
Ethernet Speed LED
Ethernet Full-duplex LED
3.3V Power Supply
Analog 3.3V Output
Factory Reset (Active Low)
GPIO Output
GPIO Input
Reserved GPIO
WIZ127SR User’s Manual
Output
Input
Input
Output
Output
Output
Output
Output
Input
Output
Input
Output
I/O
Input
Input
Output
Input
Output
Output
Input
Input/Output
Input
Output
Input
Input/Output
PC14, PC15 Reserved GPIO Input/Output
(*) This pin can be used for H/W Trigger (Active Low).
Table 1 Pin Description
Attribute
-
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
This pin is activated if it is asserted low during MCU booting.
CMOS/TTL/5V tolerant Input
-
-
-
-
-
-
-
-
-
CMOS/TTL/5V tolerant Input
This pin is activated if it is asserted low during MCU booting.
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
CMOS/TTL/5V tolerant Input
2
2.2. Dimension
WIZ127SR User’s Manual
Figure 2 Dimension
3
2.3.
Electrical Characteristics
2.3.1. Absolute Maximum Rating
V
DD
Symbol
V
IN
I
IN
T
OP
T
STG
Parameter
DC Supply voltage
DC Input voltage
DC Input current
Operating temperature
Storage temperature
Rating
-0.5 to 3.63
-0.5 to 3.63
5
0 to 70
TBD
Table 2 Absolute Maximum Rating
2.3.2.
Symbol
V
DD
V
IH
V
IL
DC Characteristics
Parameter
DC Supply voltage
High level input voltage
Low level input voltage
Test Conditon
Junction temperature is from
-55℃ to 125℃
Min Typ Max Unit
2.97
2.0
0.3
3.6
3.6
0.8
V
V
V
V
OH
V
OL
I
I
High level output voltage
Low level output voltage
Input Current VIN = VDD
2.4
0.4
5
V
V
μA
Unit
V
V mA
℃
℃
Table 3 DC Characteristic
2.3.3. POWER DISSIPATION
Test Condition(VCC3.3V, Temperature 25℃)
Condition Min
100M Link -
Typ
200
10M Link - 147
Loss Link
100M Transmitting
10M Transmitting
-
-
158
200
- 147
Table 4 Power Dissipation
Max
215
162
173
215
162
Unit mA mA mA mA mA
WIZ127SR User’s Manual 4
2.4. Application Schematics
2.4.1. WIZ127SR-BASE
TP1
TP2
CONNECTOR
PC14
PC15
UART2_CTS
UART2_RTS
UART2_TX
UART2_RX
STATUS2
PB11
PB12
PB13
PB14
PB15
7
8
5
6
3
4
1
2
9
10
11
12
J3
TP3
TP4
2.0mm HEADER 12x1
2.0 Pitch
RESET
UART1_TX
UART1_RTS
PB0
UART1_RX
UART1_CTS
PB1
STATUS1
VDD3V3
7
8
5
6
3
4
1
2
9
10
11
12
J1
2.0mm HEADER 12x1
2.0 Pitch
VDD3V3A
J2
7
8
5
6
3
4
1
2
9
10
11
12
2.0mm HEADER 12x1
2.0 Pitch
LINKLED_M0
PB5
SPDLED_M1
FDXLED_M2
RXIN
RXIP
TXON
TXOP
VDD3V3
ETHERNET STATUS
LINKLED_M0
R1
330R
SPDLED_M1
R2
330R
FDXLED_M2
R3
330R
PB5
R8
330R
D3
LED
D4
LED
D1
LED
D2
LED
VDD3V3
RJ45 W\MAGNET
TXOP
TXON
RXIP
RXIN
C2
0.1uF
C3
0.1uF
C1 0.1uF
VDD3V3A
LINKLED_M0
VDD3V3
NC
SPDLED_M1
R9
R10
330R
330R
7
8
5
6
3
4
1
2
P1
TD+
TD-
TCT
NC1
NC2
RCT
RD+
RD-
9
10
L4-
L3+
11
12
L2-
L1+
13
14
CH_GND1
CH_GND2
RB1-105BAG1A
GPIO IN/OUT
SW2
SLD-SW
1
2
3
VDD3V3
1
2
3
R12 10K
SW3
SLD-SW
1
2
3
VDD3V3
1
2
3
R15 10K
PB14
PB15
PB12
PB13
R13 330R
R14 330R
D5
D6
LED
LED
VDD3V3
RESET
POWER
J4
DC JACK
1
2
3
VDD3V3
R16
10K
SW4
TACT SW
1 4
2 3
C10
0.1uF
C9
0.1uF
1
U2
NC VCC
5
2
A
3
GND
SN74LVC1G14
Y
4
VDD3V3
RESET
NC
R17 0R
SW5
TG-SW
5V_IN U4
AME8815BEGT330Z/SOT-223
2
3
VOUT
VIN VTAB
4
1
GND
C16
10uF/16V
TP7 TP8
C17
10uF/16V
D7
LED
3V3_IN VDD3V3
TP5
L1
HH-1M1608-121JT
C18
10uF/16V
R18
330R
NC
VDD3V3A
TP6
L2
HH-1M1608-121JT
C19
10uF/16V
CONNECTED STATUS/HW TRIGGER
SW1
SLD-SW
1
2
3
1
2
3
R11 0R
STATUS1
STATUS2
R19
330R
R20
330R
D8
LED
D9
LED
VDD3V3
UART1
VDD3V3
C4 0.1uF
UART1_TX
UART1_RTS
UART1_RX
UART1_CTS
C5
C6
0.1uF
0.1uF
11
10
12
9
1
U1
C1+
3
C1-
4
C2+
5
C2-
TIN1
TIN2
ROUT1
ROUT2
VCC
V+
V-
TOUT1
TOUT2
RIN1
RIN2
GND
SP3232EUEY -L
16
2
6
14
7
13
8
15
C7
C8
0.1uF
0.1uF
GND
RS232_TX1
RS232_RTS1
RS232_RX1
RS232_CTS1
FACTORY RESET
VDD3V3
R25
10K
PB11
SW6
TACT SW
1 4
2 3
R28 100R
C20
0.1uF
M1
TH3.5
M2
TH3.5
M3
TH3.5
M4
TH3.5
VDD3V3
UART2_TX
UART2_RTS
UART2_RX
UART2_CTS
UART2
R21
R22
R23
R24
C12
C13
0R
0R
0R
0R
0.1uF
0.1uF
11
10
12
9
1
U3
C1+
3
C1-
4
C2+
5
C2-
TIN1
TIN2
ROUT1
ROUT2
VCC
V+
V-
TOUT1
TOUT2
RIN1
RIN2
C11
16
2
6
14
7
13
8
0.1uF
C14
C15
15
GND
SP3232EUEY -L
VDD3V3
UART2_TX
UART2_RTS
UART2_RX
UART2_CTS
3
4
1
2
5
6
J5
0.1uF
0.1uF
GND
RS232_TX2
RS232_RTS2
RS232_RX2
RS232_CTS2
2.54mm HEADER 6x1
NC
P2
DB9_MALE-RA
5
8
3
9
4
6
1
7
2
P3
DB9_MALE-RA
5
8
3
9
4
6
1
7
2
Figure 3 WIZ127SR Base board schematic
WIZ127SR User’s Manual 5
2.4.2. RS485/422
RS485 Example Circuit
UART2_RX
UART2_RTS
UART2_TX
1
RO
2
RO
3
DE
4
DI
SP3485
VCC
8
B
7
A
6
GND
5
VDD3V3
0.1uF
485-
120R
485+
1
2
HEADER 2
RS422 Example Circuit
VDD3V3
UART2_RX
UART2_TX
0.1uF
1
VCC
2
RO
3
DI
4
GND
SP3701E
A
8
B
7
Z
6
Y
5
485_RX+
120R
485_RX-
485_TX-
485_TX+
Figure 4 Reference schematic for interfacing to RS485/422
3
4
1
2
HEADER 4
WIZ127SR User’s Manual 6
3. Programmers’ Guide
3.1. Serial Commands
3.1.1. Serial Command Format
It is possible to configure WIZ127SR by using serial command. By inputting specified 3 characters you can enter into the configuration mode. The characters can be defined at the
Configuration Tool.
< Frame Format >
Command Frame format
Descriptor
Length(bytes)
STX
1
Command code
2
Parameter
Variable
ETX
1
Table 5. Serial Configuration Frame format
Reply Frame format
Descriptor
Length(bytes)
STX
1
Reply code
1
Parameter
Variable
Table 6. Serial Configuration Reply Frame format
STX & ETX
Setting
STX
ETX
Comments
‘<’ : Hex = 3Ch
‘>’ : Hex = 3Eh
Table 7. Serial Configuration STX & ETX
3.1.2. Reply Code
ETX
1
S
Reply
F
0
1
2
3
E
Comments
Command was successful
Command failed
Invalid STX
Invalid command
Invalid parameter
Invalid ETX
Enter Serial Command Mode
Table 8. Serial Configuration Reply Code
3.1.3. Command Code
Command
WI
Category
Format
Description
RI
Meaning
Response
Format
<WIxxx.xxx.xxx.xxx>
Set Local IP
ex) <WI192.168.11.133>
<S>
<RI>
WIZ127SR User’s Manual 7
WS
RS
WG
RG
WP
RP
WD
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Get the current WIZ127SR’s Local IP address
Its response format is like below.
<S[IP Addr]>
[IP Addr] : Server’s IP address in a dotted decimal format ex) <RI>
<S192.168.0.100>
<WSxxx.xxx.xxx.xxx>
Set Subnet Mark
ex) <WS255.255.255.0>
<S>
<RS>
Get the current WIZ127SR’s Subnet Mask
Its response format is like below.
<S[Subnet]>
[Subnet] : Server’s IP address in a dotted decimal format ex) <RS>
<S255.255.255.0>
<WGxxx.xxx.xxx.xxx>
Set Gateway Address
ex) <WG192.168.11.1>
<S>
<RG>
Get the current WIZ127SR’s Gateway address
Its response format is like below.
<S[IP Addr]>
[IP Addr] : Se rver’s IP address in a dotted decimal format ex) <RG>
<S192.168.0.1>
<WPxxxxx>
Set Local port number
ex) <WP35000>
<S>
<RP>
Get the current WIZ127SR’s Local port number
Its response format is like below.
<S[Port]>
[Port] : Server’s IP address in a dotted decimal format ex) <RP>
<WDx>
Set the method of setting WIZ127SR’s IP address
Parameter’s Value
Meaning
WIZ127SR User’s Manual 8
RD
WM
RM
WK
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
RK
Response
Format
WIZ127SR User’s Manual
0
1
2 ex) <WD0> or <WD1>
<S>
Static mode
DHCP mode
PPPoE mode
<RD>
Get the current WIZ127SR’s method setting its IP address
Its response format is like below.
<S[Mode]>
[Mode] : Server’s IP address in a dotted decimal format ex) <RD>
<WMx>
Set the operation mode of a TCP socket
Parameter’s
Value
Meaning
0
1
2
Remarks
TCP Client The TCP socket try to connect to the peer until the connection is established
TCP Mixed This mode is the same to TCP Server mode at first, but While any connection is not established, if WIZ127SR get any data via UART then WIZ127SR make TCP socket be a TCP Client socket and try to connect to the specified peer system.
TCP Server The TCP socket is in Listen mode waiting for a request of connection from any peer system. ex) <WM0>
<S>
<RM>
Get the current data communication socket’s operation mode
Its response format is like below.
<S[Mode]>
[Mode] : Server’s IP address in a dotted decimal format ex) <RM>
<WKx>
Set the protocol of the communication socket with one of two mode.
Parameter’s Value
Meaning
0 TCP
1 UDP ex) <WK0>
<S>
<RK>
9
WB
RB
WT
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
RT
Response
Format
WIZ127SR User’s Manual
Get the current data communication socket’s protocol type.
Its response format is like below.
<S[Protocol]>
[Protocol] : Server’s IP address in a dotted decimal format ex) <RK>
<WB[b][d][p][f]>
Configure UART with four parameters
[b], [d], [p] and [f] are a byte parameters, and those have the meaning as below
Parameter Value Meaning
[b] : baud rate
5
6
7
2
3
4
8 c b a
1
921600 bps
460800 bps
230400 bps
115200 bps
57600 bps
38400 bps
19200 bps
9600 bps
4800 bps
2400 bps
1200 bps
[d] : data bits size
[p] : parity 0
1
2
7
8
9
7 bits
8 bits
9 bits
No Parity
Odd Parity
Even Parity
[f] : flow control 0
2
3
4 ex) <WB1800> => 115200, 8 bits, no parity, no flow control
<S>
None
RTS/CTS
DSR/DTR
RTS Only(For
RS485)
<RB>
Get the current configuration information of WIZ127SR’s serial interface.
Its response format is like below.
<S[baud rate][data size][parity][flow control]>
ex) <RB>
<S1800>
<WT[y]>
Set whether serial command will be allowed, or not
[y] = 0 : Disable
[y] = 1 : Enable ex) <WT1>
<S>
<RT>
10
WU
RU
WE
RE
WX
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
RX
Response
Format
WIZ127SR User’s Manual
Get the current setting of serial command method
Its response format is like below.
<S[Option]>
[Option] : Server’s IP address in a dotted decimal format ex) <RT>
<S1>
<WU[y]>
Set Whether DNS service will be allowed
[y] = 0 : Not use
[y] = 1 : Use ex) <WU1>
<S>
<RU>
Get whether DNS mode is enabled or not
Its response format is like below.
<S[flag]>
[flag] : 0 = Not Use, 1 = Use ex) <RU>
<S1>
<WE[ch][ch][ch]>
Set character string using for Software trigger in order to enter serial command mode.
[ch] is a ASCII character represented in its hexadecimal format. For example, if user wants use ‘A’ as [ch] then user should input its
ASCII code in hexadecimal format, ‘4’ and ‘1’, not ‘A’.
ex)If character string for software trigger is “+++” then
<WE2B2B2B>
<S>
<RE>
Get the current character string for software trigger to enter the serial command mode.
Its response format is like below.
<S[ch1][ch2][ch3]>
[IP Addr] : Server’s IP address in a dotted decimal format ex) <RE>
<S2B2B2B>
<WX[IP Addr]>
Set Server’s IP address to connect when the data socket is defined as Client mode or Mixed mode. If user defined the data socket as a
Server mode, WIZ127SR don’t care this Server’s IP address.
[IP Addr] : Server’s IP address in a dotted decimal format ex) <WX192.168.11.144>
<S>
<RX>
11
WN
RN
WR
WV
RV
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
WIZ127SR User’s Manual
Get the current Server’s IP address
Its response format is like below.
<S[IP Addr]>
[IP Addr] : Server’s IP address in a dotted decimal format ex) <RX>
<S192.168.0.115>
<WN[port]>
Set Server’s port number to connect when the data socket is defined as Client mode or Mixed mode.
[port] : Server’s port number in a decimal format.
Its range is 0 to 65535 ex) <WN5000>
<S>
<RN>
Get the current Server’s Port number
Its response format is like below.
<S[Port number]>
[IP Addr] : Server’s IP address in a dotted decimal format ex) <RN>
<S5000>
<WR>
Restart WIZ127SR
Some commands need reboot of WIZ127SR in order that those command affect to WIZ127SR’s configuration to operate properly.
So, we recommend you do use this command after all command you issued, to guarantee WIZ127SR operate successfully.
ex) <WR>
<S>
<WV[IP addr]>
Set Domain Name Server’s IP address
If you want to use Server information in Domain name, not IP address, then you should set Domain Name Server’s IP address using this command. And the Domain Name Server’s IP address which you entered should be valid and operate DNS query successfully.
[IP Addr] : Server’s IP address in a dotted decimal format
<WV8.8.8.8>
<S>
<RV>
Get the current Domain Name Server IP address
Its response format is like below.
<S[IP Addr]>
[IP Addr] : Server’s IP address in a dotted decimal format ex) <RV>
<S8.8.8.8>
12
WW
RW
WY
RY
WZ
RZ
OC
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
<WW[Domain name]>
Set Domain Name which you connect to.
This information is meaningful as if you want use the data socket as
Client mode or Mixed mode and set DNS enabled and set a proper
DNS IP address.
If one of them isn’t set properly, despite you use this command, you can’t get a good response.
[Domain name] : Domain name in string type ex) <WWwww.google.com>
<S>
<RW>
Get the current Domain Name set in WIZ127SR
Its response format is like below
<S[Domain Name]>
[Domain Name]
<Swww.wiznet.co.kr>
<WY[ID]>
Set ID for PPPoE authentication
<S>
<RY>
Get the current ID for PPPoE
Its response format is like below
<S[ID]>
[ID] :
<Sadmin>
<WZ[Passwd]>
Set Password for PPPoE authentication
<S>
<RZ>
Get the current password for PPPoE
Its response format is like below.
<S[Passwd]>
[Passwd] : Server’s IP address in a dotted decimal format ex) <RZ>
<Sadmin>
<OC[ch]>
Set a character delimiter
1
for making a ethernet data block in
Hexadecimal format.
[ch] : character information.
Default value is 00. If this value is 00, it means Character
1
In normal, a serial device send data in chunk. Some device never expects those data chunk would be divided more than two pieces. But WIZ127SR handle data from serial interface byte by byte, in other word WIZ127SR check its serial buffer having data from serial interface and there are some data in that buffer, then it make a ethernet packet with those data and send that. But because the peer system expects all data chunk, that consider those data was broken and discard those.
So, to avoid this fault, WIZ127SR provides three scheme to handle serial data chunk by chunk. Those are character delimiter, size delimiter and time delimiter.
WIZ127SR User’s Manual 13
QC
OS
QS
OT
QT
OI
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Delimiter disabled ex) <OC1B>
<S>
<QC>
Get the current character delimiter
Its response format is like below.
<S[ch]>
[ch] : Server’s IP address in a dotted decimal format ex) <QC>
<S41>
<OS[size]>
Set a size delimiter for making a ethernet data block in Decimal format
[size] : size information. Its range is 0 ~ 255.
Default value is 0. If this value is 0, it means Size Delimiter
Disabled ex) <OS100>
<S>
<QS>
Get the current size delimiter value
Its response format is like below.
<S[size]>
[size] : Server’s IP address in a dotted decimal format ex) <QS>
<S40>
<OT[time]>
Set a time delimiter for making a ethernet data block in Decimal format
[time] : time information. Its range is 0 ~65535. Unit is millisecond.
Default value is 0. If this value is 0, it means Time Delimiter disabled ex) <OT100>
<S>
<QT>
Get the current time delimiter value
Its response format is like below.
<S[time]>
[time] : Server’s IP address in a dotted decimal format ex) <QT>
<S100>
<OI[time]>
WIZ127SR User’s Manual 14
QI
RA
RF
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Format
Meaning
Response
Set the inactivity time
2
for disconnecting the current established socket, as data communication is idle for some time which users already set
[time] : time information. Its range is 0 ~65535. Unit is second.
Default value is 0. If this value is 0, it means Inactivity Time disabled
<S>
<QI>
Get the current inactivity time value
Its response format is like below.
<S[time]>
[time] : Server’s IP address in a dotted decimal format ex) <QI>
<S60>
<RA>
Get the current MAC address of WIZ127SR
Its response has a format like below.
<S[MAC Addr]>
[MAC addr] : This is 6 ASCII String in a Hexadecimal format with delimiters, ‘:’, following to every 2 characters. ex) <RA>
<S00:08:DC:00:11:22>
<RF>
Get the current firmware version stored in WIZ127SR.
Its response format is like below.
<S[Ver]>
[Ver] : Server’s IP address in a dotted decimal format ex) <RF>
<S3.1>
3.2. Data mode and Command mode
WIZ127SR has two operation mode - serial command mode and data mode through serial interface. These are concerned to the communication between host processor and WIZ127SR.
3.2.1.
Data mode
Data mode is the default mode of WIZ127SR. After booting, WIZ127SR operates itself as
‘Serial
2 WIZ127SR itself doesn’t disconnect a TCP connection after a connection established. Normally the peer system do that. But, there are many cases that users’ system including WIZ127SR should close a established connection after a short data communication and any peer system of WIZ127SR doesn’t have those capabilities.
Inactivity time scheme is a useful funct ion under this circumstance. If WIZ127SR doesn’t receive any data from the serial interface during the time set as the Inactivity Time, then WIZ127SR closes the current established connection itself. But If any character is entered from the serial interface before the Inactivity Time timer is expired, the timer will be reinitialized.
WIZ127SR User’s Manual 15
to Ethernet; converter. It tries to connect or listens to get peer’s connection request. During this mode, WIZ127SR holds the data from host processor via serial interface as just data. If the connection is already established, WIZ127SR transmits the data to peer system, and also receives data which are sent by the peer from Ethernet.
In other words, WIZ127SR transparently bypasses data from Ethernet to serial interface and vice versa without editing those data.
3.2.2. Serial Command mode
In serial command mode, WIZ127SR treats data from host processor as a command. If the command is valid, it sends a proper response. If not it responds with error message. In the serial command mode, there is no data communications between WIZ127SR and peer system.
If WIZ127SR enters into serial command mode, it will print out
“<E” message through serial interface to inform host processor that it successfully entered into serial command mode.
But when it switches to data mode, it doesn’t print out any message.
3.2.3.
How to switch the mode
There two method to switch the mode from data to serial or vice versa. One is the software triggering and the other is the hardware triggering.
Software triggering
Host processor can make WIZ127SR enter into serial command mode by issuing software triggering string, which is already set by user through serial interface. User can set this string at the configuration tool, web config page or telnet.
In order to escape from serial command mode, host processor just issues <WR> command.
Then, WIZ127SR reboots and operates as data mode.
Hardware triggering
Hardware Configuration enables the module to enter into configuration mode by port control.
If you supply the power or reset the module by asserting low 12th pin of JP1, you can configure the module using serial commands.
At the hardware configuration mode, network configuration or data communication is not allowed. Therefore, after finishing the configuration, be sure to assert high JP1.12 for normal operation.
A. Frame Format
Command Frame format
Descriptor
Command
Length(bytes)
STX
‘>’(0x3E)
1
Command code
R / W / X
1
Parameter
Variable
Variable
ETX
‘CR’(0x0D)
1
Table 9. Hardware Configuration Frame format
WIZ127SR User’s Manual 16
Reply Frame format
Descriptor
Command
Length(bytes)
STX
‘<’(0x3C)
1
Reply code
S
1
Parameter
Variable
Variable
Table 10. Hardware Configuration Reply Frame format
Command Code
Command
R
W
X
E
Comments
Read Parameter
Write Parameter
Exit Hardware Command mode
Command Error
Table 11. Hardware Configuration Command Code
ETX
‘CR’’LF’(0x0D0A)
2
Reply for Entrance Hardware Command Mode (Hex : 0x3B)
[Normal mode]
;
[Debug mode]
WIZ127SR bootloader
Ver. 1.0
Firmware Ver. 0.9
;
Table 12. Hardware Configuration Entrance Message
WIZ127SR User’s Manual 17
The length of parameter can be different according to firmware version.
Value(byte) Description
0008DCxxxxxx(6)
01 (1)
00000000 (4)
00000000 (4)
00000000 (4)
0000 (2)
00000000 (4)
0000 (2)
FE (1)
MAC address (xxxxxx is uniquely factory set)
Mode (00: TCP Client, 01 : TCP Mixed, 02 : TCP Server)
IP address
Subnet mask
Gateway address
Local Port number (Module's Port Number)
Server IP address
Server Port number
Serial speed (bps) Default is FE
BB:
230400
FF:
115200
FE:
57600
FD:
38400
Serial data size (08: 8 bit), (07: 7 bit)
FA:
19200
F4:
9600
E8:
4800
08 (1)
00 (1)
01 (1)
00 (1)
00 (1)
0000 (2)
0000 (2)
0000 (2)
00 (1)
03 (1)
01 (1)
00 (1)
00 (1)
00 (1)
00 (1)
0000000000000000
(8)
FF
Parity (00: No), (01: Odd), (02: Even)
Stop bit
Flow control (00: None), (01: XON/XOFF), (02: CTS/RTS)
Delimiter character
Delimiter size
Delimiter time
Delimiter inactivity time
Debug code (00: ON), (01: OFF)
Software major version
Software minor version
DHCP option (00: DHCP OFF, 01:DHCP ON)
UDP mode (00: TCP; 01: UDP)
Connection Status (00:not connected, 01: connected)
DNS Flag (00:not use DNS, 01:use DNS)
00000000 (4)
00……00 (32)
00 (1)
DNS Server IP address
Server Domain Name
Serial command method(00:disable, 01:enable)
2B2B2B (3) Serial command mode character(Hex)
0020
20……2020 (32)
PPPoE ID
002020……2020 (32)
PPPoE Password
00 (1) Password option for TCP Server (00:disable, 01:enable)
Password for TCP Server
Last Byte (It means end of parameter)
Table 13. Hardware Configuration Parameter descriptions
D0:
2400
A0:
1200
WIZ127SR User’s Manual 18
B. Hardware Configuration Examples
Read Parameter
STEP 1. Supply the power into the module by assrting 12 th
pin of JP1.
STEP 2.
Check if the message (‘:’) is displayed to notify the entering of Hardware
Configuration. If m odule is set as ‘Debug mode’, the message is displayed after showing model name and version.
WIZ127SR bootloader
Ver. 1.0
Firmware Ver. 0.9
;
STEP 3.
Input ‘>R’ and Carriage Return(0x0D).
STEP 4. Check response message.
WIZ127SR bootloader
Ver. 1.0
Firmware Ver. 0.9
;<S0008DC135E2401C0A80B03FFFFFF00C0A80B011388C0A80B011388FE0800010000000
0000000000003010000000000000000002020202020202020202020202020202020202020202
0202020202020202020012B2B2B002020202020202020202020202020202020202020202020
2020202020202020002020202020202020202020202020202020202020202020202020202020
2020000000000000000000FF
Changing IP Address
When changing the parameter value, the MAC address is not changed. As MAC address is the unique value for the module, user can’t change it. When changing the IP address, input the new value after first 6bytes.
STEP 1. Check HEX value of new IP address. In here, the new IP address is assumed as ‘192.168.11.10’. Therefore, the hex value ‘C0A80B0A’ is input.
STEP 2.
Input ‘>W01C0A80B0AFFFFFF00 … 00FF’.
STEP 3.
Check ‘<S’ message is displayed. After displaying this message, CR(0x0D) &
LF(0x0A) are displayed together.
STEP 4. After completing the change, check if changed value is appropriated saved by using READ command.
3.3. How to get the socket status
TBD
3.4. How to handle extra GPIO Pins
TBD
WIZ127SR User’s Manual 19
4. How to configure with WIZ127SR
4.1. Configuring with UDP broadcasting and
WIZ127SR Configuration Tool
4.1.1. Network Configurations
Figure 5. Configuration Tool (Network Configuration)
1) Search
The Search function is used to search for all existing modules on the same LAN. By using UDP broadcast, it finds all modules on the same subnet, and the founded device will be listed in the
“Serial to Ethernet” tree(Search Window) with its MAC address.
2) Setting
This function is to apply your configurations.
When you select the MAC address from the “Search Window”, the default value of the module will be displayed. Modify your configurations and click “Setting” button to apply your settings.
The module will re-initialize and save the changed configurations.
You can change the configurations by following steps:
① Select the MAC address of the device which you would like to modify in the “Search
WIZ127SR User’s Manual 20
Window”
② Modify the settings according to your needs
③
Click the “Setting” button to apply your settings
④ The module will be initialized by a re-booting process
⑤
To verify your settings, please click ‘Search’ button and view your new settings
3) Firmware Upload
Firmware will be uploaded through your network. The Procedure of Firmware upload is explained details in “Chapter 3. Firmware Upload”
4) Factory Reset
All setting value is initialized to factory default, if you click the “Factory Reset” button.
5) Exit
Close the configuration tool program window.
6) Search Window
If you click the
“Search” button, all the MAC addresses on the same subnet will be displayed.
7) Device network settings
Static
: “Using the follow IP Address” is an option for setting WIZ127SR module’s IP with static
IP address..
1. Select a MAC address which you want to set as static IP in the “Search Window”.
2.
Check “Using the follow IP address”.
3.
The “Device IP, Gateway, Subnet mask, DNS server” box will be enabled, and then input address in those fields.
4.
Click the “Setting” button to apply your configurations.
DHCP: Select
“Get IP address from DHCP server” option to use the DHCP mode.
1.
Select the MAC address on the “Search Window”.
2. C heck “Get IP address from DHCP server” and click the ‘Setting’ button.
3. A module will acquire network information from the DHCP server. (Should wait a moment to acquire network information from the DHCP server.)
4.
When a module on the “Search Window” is selected, the IP address, Subnet mask and
Gateway are displayed. If the module could not acquire the network information from the
DHCP server, the IP address, the Gateway Address and the Subnet mask will be initialized as 0.0.0.0.
IP Address Information
Device IP: WIZ127SR’s IP Address
WIZ127SR User’s Manual 21
Gateway: WIZ127SR
’s Gateway Address
Subnet mask: WIZ127SR’s Subnet Mask
DNS server: DNS Server’s IP Address
☞
If you are unclear about your Local IP, Subnet Mask, Gateway information, you have to get this information from your network administrator. If the IP address is not correct,
IP collision or network problems may occur.
8) F/W Version
It displays the firmware version.
9) Enable Serial Debug Mode
If this mode is enabled, you can monitor the status and socket messages of WIZ127SR through the serial terminal (listen OK, connect fail and etc.). In this mode, debug messages can cause abnormal operation of the serial device. Therefore, you should use this mode only for debugging.
10) Network Status
This field shows the Connection Status of UART0 and UART1 in WIZ127SR. The message
“Connected” will be displayed when a peer successfully connects to WIZ127SR.
WIZ127SR User’s Manual 22
4.1.2. Serial Configuration
Figure 6. Configuration Tool (Serial Configuration)
You should set to UART configuration after checking UART tab whether it is UART0 or UART1.
The numbers on the screenshot correspond to the descriptions listed below.
1) COM port setting
This menu is used for setting the serial port.
☞
In order to apply your settings, click the “Setting” button
2) Working mode
Client / server / mixed: This is to select the communication method based on TCP. TCP is the protocol to establish the connection before data communication, but UDP just processes the data communication without connection establishment. The Network mode of WIZ127SR can be divided into TCP Server, TCP Client and Mixed mode according to the connection establishing method. At the TCP server mode, WIZ127SR operates as server on the process of connection, and waits for the connection trial from the client. WIZ127SR operates as client at the TCP Client mode on the process of connection, and tries to connect to the server’s IP and Port. Mixed
WIZ127SR User’s Manual 23
modes supports both of Server and Client. The communication process of each mode is as below.
TCP server mode Communication
At the TCP Server mode, WIZ127SR waits for the connection requests.
TCP Server mode can be useful when the monitoring center tries to connect to the device
(where WIZ127SR is installed) in order to check the status or provide the commands. In normal time WIZ127SR is on the waiting status, and if there is any connection request (SYN) from the monitoring center, the connection is established (ESTABLISH), and data communication is processed (Data Transaction). Finally connection is closed (FIN).
In order to operate this mode, “Device IP”, “Subnet mask”, “Gateway” and “Local port” should be configured first.
The Data transmission proceeds as follows,
1. The host connects to the WIZ127SR which is configured as TCP Server mode.
2. As the connection is established, data can be transmitted in both directions
– from the host to the WIZ127SR, and from the WIZ127SR to the host
TCP client mode Communication
If WIZ127SR is set as TCP Client, it tries to establish connection to the server.
To operate this mode, “Device IP”, “Subnet mask”, “Gateway”, “Remote host”, and “Remote port” should be set. If “Remote host” has domain name, you should be confirmed the “DNS server” field.
In TCP Client mode, WIZ127SR can actively establish a TCP connection to a host computer when power is supplied.
The Data transmission proceeds as follows:
1. As power is supplied, WIZ127SR board operating as TCP client mode actively establishes a connection to the server.
2. If the connection is complete, data can be transmitted in both directions
– from the host to the WIZ127SR and from WIZ127SR to the host
Mixed mode Communication
In this mode, WIZ127SR normally operates as TCP Server and waits for the connection request from the peer. However, if WIZ127SR receives data from the serial device before connection is established, it changes to the client mode and sends the data to the server IP. Therefore, at the mixed mode, the server mode is operated prior to the client mode.
As like TCP Server mode, the Mixed mode is useful for the case that the monitoring center tries to connect to the serial device (in which WIZ127SR is used) to check device status. In addition
WIZ127SR User’s Manual 24
to this, if any emergency occurs in the serial device, the module will change to Client mode to establish the connection to the server and deliver the emergency status of the device.
UDP mode Communication
UDP is not a connection oriented protocol. But the communication port should also be defined well. If the UDP mode is selected, the data from serial interface can be defined where to delivery via the “Remote host” and “Remote port”, and the WIZ127SR can also be defined where to receive Ethernet data from via the “Remote host” and “Local port” definition. If the data destination and source are the same, the two IP address will also be the same. Please note the destination and source are using the same port.
3) Communication
When your module is set as “Client mode”, “Mixed mode” or “UDP mode”, peer IP and port should be set in order for WIZ127SR to connect to the server(or peer).
Local port: This field is to set the network port number in WIZ127SR.
☞
You should set to different port number from each other UART port.
Remote port: This field is to set the network port number in remote device.
Remote host: This field is to set the network address. (IP address or Domain name) of remote device.
If your application needs the DNS function, input the domain name of connecting node
(E.g.: www.wiznet.co.kr
) into “Remote host” field and the DNS Server IP address into
“DNS server” field. Domain Name System (DNS) is a database system that associates the
Domain name with the actual IP address. The purpose of the DNS system is to resolve the
Domain name and represent it as an IP address. As a result, your device can connect to an actual IP address.
4) Timers
You can specify how the serial data can be packed to be sent to the Ethernet. There are 3 delimiters - time, size and character. If all of them are set as ‘0’, whenever the serial data is arrived, they are sent to the Ethernet immediately.
Nagle wait time: This field specifies the waiting time. When there is no more input from the serial port, the module will wait for the specified time and then send out the serial data
WIZ127SR User’s Manual 25
to the network. For example, if 2000 ms is specified, the module will send out the packet at
2000 ms after the last input from the serial port. If there is no data in the serial buffer, the module will not send out any data packets.
(‘0’: Function Disable)
Inactivity: When there is no data transmission, the connection will be closed automatically after the time specified in the Inactivity time. If the default value ‘0’ is set as the
Inactivity time, the network connection is maintained even though there is no data transmission. In order to close the connection, you should use the ‘Close’ commands. This function is useful when you have two or more systems which are connected to the WZ127SR module. When one system is connected to the WIZ127SR, other systems cannot connect to the module simultaneously. If you defined a time in the Inactivity time, the other system can connect to the module after the inactivity time elapsed. Inactivity Time can also be used when the server system is unexpectedly shut down. In this case, there will not be any data communication. After the time defined in the Inactivity time elapsed, WIZ127SR will close the connection and enter into waiting state.
Reconnection: The connection retry interval. (Client mode only)
5) Serial Configuration
This function is for module configuration not through network with configuration tool, web configuration and telnet but through serial communication. At the default status, the serial command mode is disabled. When you want to set via serial communication, check “enable”.
Please refer to “4. Serial Configuration” for more detail about serial configuration.
WIZ127SR User’s Manual 26
4.1.3. Option Configuration
Figure 7. Configuration Tool (Option Configuration)
You should set to UART configuration after checking UART tab whether it is UART0 or UART1.
The numbers on the screenshot correspond to the descriptions listed below.
1) Device name
The device name is displayed in this area.
2) Serial number
The serial number of device is displayed in this area.
3) Password
The password that is used for web configuration and telnet is displayed in this area. The shown password is encrypted by MD5.
If you want to change the password, double-click the text-box and then type your password in
ASCII codes.
WIZ127SR User’s Manual 27
4) NTP
NTP(Network Time Protocol) is a protocol for clock synchronization between computer systems over the networks. This function is reserved for customization. In case of standard version, this function just working for clock synchronization and display the time to configuration tool and web page.
Enable NTP: This check-box is to set the enable/disable of NTP.
NTP Server IP: This field is to set the NTP server IP address.
Device Time: This field is to shown the current time of WIZ127SR.
Time Zone: This field is to set the time zone of your country.
4.2. Configuring with Web browser
Open the web browser and input the IP address of the module. The first page will request the user password as shown in below figure.
If you input the password (the default value is WIZ127SR), the configuration page will be displayed. You can set the configuration parameters of network and serial.
WIZ127SR User’s Manual 28
4.3. Configuring with Telnet
You can configure the WIZ127SR by using Telnet Client(*) program. If you connect to the
WIZ127SR, you can see the message of requesting user password.
Input the user password (Default P/W : WIZ127SR). You can see the message “Press ‘Q’ to enter the main console menu”.
WIZ127SR User’s Manual 29
If you input the ‘Q’, the main menu for the WIZ127SR configuration is displayed.
(*) You can use the Telnet client program which is provided by Windows OS. At the Windows XP, you can use the Telnet client program without additional setting. However at the Windows Vista or above version, you must enable the Telnet Client program first. For the detail, refer to the site http://goo.gl/Plhyu.
WIZ127SR User’s Manual 30
5. How to upload a new firmware
Run “WIZ127SR Configuration Tool” program, and click the “Search” button.
If the module is properly connected to the network, the MAC address will be displayed on the
“Search Window” as shown in Figure 4.
Figure 8. Configuration Tool
Select a module shown in the “Search Window”, and click the “Firmware Upload” button.
☞
Before uploading the firmware through Ethernet, you should set the network information of WIZ127SR first, by Configuration Tool program as shown above in Figure
4. By using Ping test, you can check whether your network is configured correctly or not.
When the window as shown in Figure 5 is displayed, select file to upload and click the
“Open” button.
WIZ127SR User’s Manual 31
Figure 9. Open dialog box for uploading
☞
Do not upload any other files except for WIZ127SR application firmware file.
WIZ127SR User’s Manual 32
The progress bar will be displayed as below.
Figure 10. Firmware uploading window
When uploading is completed, a message box with “Firmware download over” will be displayed as shown in Figure 7.
Figure 11. Complete Uploading
WIZ127SR User’s Manual 33
6. Quick Installation and Test
In this chapter, we will provide a example for you to learn how to install and test
“Serial to
Ethernet” data communication with the WIZ127SR.
<System Configuration>
Serial Cable
WIZ127SR-EVB
Ethernet Cable
Hardware
PC having a RS-232 serial port and Ethernet port
WIZ127SR & WIZ127SR Base Board
Ethernet Cable (Direct or Crossover Cable)
Software
WIZ127SR Configuration Tool
Hyper Terminal
<Testing Procedure>
PC
Configuration Tool
Terminal Program
1. Hardware Connection
① Connect the PC and WIZ127SR base board (in which the module is plugged) with serial cable
② Connect the PC and WIZ127SR base board by using Ethernet cable.
③ Supply the power to the test board.
2. Module Configuration
① In this manual, we are going to test the module with following configuration.
Category
Network Configuration IP Address
Subnet
Gateway
Parameters
192.168.11.100
255.255.255.0
192.168.11.1
WIZ127SR User’s Manual 34
COM Port setting
Local port
Baud Rate
Data bit
Parity
Stop bit
Flow Control
5000
115,200
8
None
1
None
TCP server Working mode
② Check the network configuration of the PC and set the appropriate value. Both of module and PC should be in the same network. Therefore, the IP address of the PC should be 192.168.11.xxx with the subnet 255.255.255.0.
③ Execute the configuration tool program and search the module. Set the all parameters as indicated in
WIZ127SR User’s Manual 35
④ Check the COM port status of the PC and open the serial terminal.
⑤ Check the IP Address and port of WIZ127SR and connect to WIZ127SR.
WIZ127SR User’s Manual 36
⑥ If you input some characters at the windows of serial, you can see they are displayed in the TCP window.
⑦ Vice versa, type some characters in the windows of TCP Client, you can see the characters are displayed in the serial Windows.
WIZ127SR User’s Manual 37
7. Warranty
WIZnet Co., Ltd offers the following limited warranties applicable only to the original purchaser.
This offer is non-transferable.
WIZnet warrants our products and its parts against defects in materials and workmanship under normal use for period of standard ONE(1) YEAR for the WIZ127SR board and labor warranty after the date of original retail purchase. During this period, WIZnet will repair or replace a defective products or part free of charge.
Warranty Conditions:
The warranty applies only to products distributed by WIZnet or our official distributors.
The warranty applies only to defects in material or workmanship as mentioned above. The warranty applies only to defects which occur during normal use and does not extend to damage to products or parts which results from alternation, repair, modification, faulty installation or service by anyone other than someone authorized by WIZnet Co., Ltd. ; damage to products or parts caused by accident, abuse, or misuse, poor maintenance, mishandling, misapplication, or used in violation of instructions furnished by us ; damage occurring in shipment or any damage caused by an act of God, such as lightening or line surge.
Procedure for Obtaining Warranty Service
Contact an authorized distributors or dealer of WIZnet Co., Ltd. for obtaining an RMA (Return
Merchandise Authorization) request form within the applicable warranty period.
Send the products to the distributors or dealers together with the completed RMA request form.
All products returned for warranty must be carefully repackaged in the original packing materials.
Any service issue, please contact to [email protected]
WIZ127SR User’s Manual 38
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement