S4A WIEGAND-Ethernet User manual

1/ 23
Ethernet----WIEGAND
Bidirectional converter
Manual

2/ 23
Table of Contents
1. Introduction............................................................................................................................. 3
2. Function parameter: ............................................................................................................. 4
3. Communication details: ........................................................................................................ 4
3.1 Network receiving .......................................................................................................... 4
3.2 Network output: ........................................................................................................... 5
3.3 Wiegand end receiving .................................................................................................. 5
3.4 Wiegand end output ....................................................................................................... 5
4. Set up computer network ........................................................................................................ 6
5. USR-K2/USR-K3 different computer software ....................................................................... 6
7. The network port communicates directly with the TTL permanent serial port ....................... 15
8. Network interface and Wiegand interface communication ..................................................... 17
9. Network interface, TTL interface communicates with Wiegand interface at the same time .. 19
10. Web page attached when using USR-K2 ............................................................................. 20
6. Web configuration method...................................................................................................... 10

3/ 23
1. Introduction
This converter supports two-way conversion between Wiegand signal and
network (TCP/IP). The Wiegand output supports standard WG 26bit and 34bit
signal format receiving and sending, and the network adopts text (ASCII)
format for receiving and sending.
WIEGAND—Ethernet
Ethernet interface
Wiegand
interface
IN12V
WD0
WD1
GND
Need to provide
12V/DC externally

4/ 23
2. Function parameter:
Dimensions: length*width*height=73*39*27 (mm)
Weight: <50g
Power supply: 12V/DC±5% 500mA
Working current: <130mA
Interface: Wiegand, TCP/IP network
Color: black
Built-in webpage: support
Network module: USR-K2\RSR-K3 optional
Protocol: Wiegand, TCP/IP
Wiegand input format: 26bit, 34bit, 4bit, 8bit
Wiegand output format: 34bit, 8bit
Network input format: ASCII
Network output format: ASCII+0D+0A
Network port serial communication parameters: 9600BPS, N, 8, 1
Network mode: (Tcp client\Tcp server\UDP Client\UDP Server\HTTDP Client)
optional
3. Communication details:
3.1 Network receiving
The ASCII code between 0X30---0X39 is required, and the maximum number of bytes input
is 20 bytes; (or 1 byte hexadecimal code)
The time interval between byte and byte is within 25ms. If it exceeds 25ms, data will be
processed. Then it is sent with Wiegand 34bit, if the serial port only receives one byte of data,
it will be considered as a keyboard Data will be sent in Wigan 8bit
For example: After receiving 31 32 33 34 37 38, the serial port will convert these bytes of
data into 16 The base is sent in Wiegand 34bit: 0001E256
Detailed explanation: Wiegand 34bit can send a maximum of 4 bytes of hexadecimal
code, which means that the serial port input The largest number of data in hexadecimal is
FFFFFFFF, which is 4294967295 in decimal (a total of 10 bits, it means there are 10 bytes in
ascii code), so the data value input by the serial port should be in
Between 0---4294967295.
The maximum number of bytes input by this converter is 20 bytes. If it exceeds Wiegand
after being combined into hexadecimal 34bit output standard, the excess part will be
intercepted and sent
For example: the data (ASCII code) received by the serial port is 31 32 33 34 35 36 37 38 39

5/ 23
30 31 32 33 34 35 and a total of 15 bytes, then the hexadecimal number is 7048860DDF79. The
data sent through Wiegand 34bit is 860DDF79 , The high part of the front is lost.
If only one byte is received and the delay exceeds 25ms, it will be considered as a keyboard
data, and the byte will be sent as Wiegand 8bit.
For example: if the serial port receives 32 (HEX), it will send 32
3.2 Network output:
Decode the data received from Wiegand and output it in ASCII format
Format: (10 ASCII codes) + 0D+0A
For example: the data received by Wigan is 1E256 (HEX), then when sending it through the
serial port, it is
30 30 30 30 31 32 33 34 37 38 0D 0A
If only one byte of Wiegand data (think keyboard data) is received, one byte will be output
without the suffix 0D 0A; there are two cases:
1. The received is 4bit, then output the byte in ASCII format
2. The received is 8bit, then send it as it is
For example: if Wiegand receives a 4bit 3, then it sends ASCII 33 through the serial port,
and receives a 4bit A, then sends ASCII 41 through the serial port;
If Wiegand receives an 8bit 45 (hex), it sends 45 (hex) as it is from the serial port. );
3.3 Wiegand end reception
Support Wiegand 4bit, 8bit, 26bit, 34bit input.
3.4 Wiegand terminal output
The output format is 8bit and 34bit (8bit means key signal).

6/ 23
4. Set up a computer network
When connecting the device to the LAN, you need to set the network segment of the computer to
be the same as the network segment of the device. The default IP address of the device is
192.168.0.7, so the computer is also set to 0. The network segment IP is 192.168.0.201 ;
Because this device has a built-in web page, you can directly enter 192.168.0.7 in the IE browser
to set it up, as described in the following chapters.
5. USR-K2/USR-K3 different computer software
Connect one end of the device to the computer's network interface, and the other end to the
output of the Wiegand device, and connect the device with 12V/DC power. If the internal network
module of the device is USR-K2, open the software. If the internal network module of

7/ 23
how to know whether the internal module is USR-K2
he device is USR-K3, Then open the software;
or URS-K3,
Turn on the device
Find the software interface of USR-K2
You can set the corresponding module parameters on the right button.
Write USR-K3 Write USR-K2
Click here to find
modules on the
Internet
Jumper
After finding the network module,
click the mouse here to display the
content on the right
1
4
2
3
5

8/ 23
1: Configure the IP address, subnet mask, and gateway; the factory default IP of the device is static
IP 192.16.0.7
2: Configure web login password; factory default user name: admin password: admin
3: Add configuration serial port parameters; factory default: invalid inspection, 8 data bits, 1 stop
bit; network module is guest
In client mode, the server IP defaults to 192.168.0.201, where you can enter the domain name
address.
4: Configure serial port baud rate, local port, remote port
The factory default of the device is 9600BPS, 20108, 8234
It should be noted that the port IP can be modified, but the baud rate cannot be modified at will, but
only 9600BPS
5: Click here to save after setting all items.
Find the software interface of USR-K2
1. Set the IP address, subnet mask and gateway of the current network module, click after setting
2 Save it.
3 A very important point is that you should not change the baud rate arbitrarily. This is related to
the Wiegand conversion communication within the device, and Wiegand signals cannot be
transmitted after random modification. The factory default is 9600.
Click here
to find
equipment
3
,4
5
1
2
Click here
to open the
webpage

9/ 23
4. Network communication mode selection, there are 5 communication methods
4.1 UDP, is a connectionless transmission communication protocol, here is the UDP CLIENT
mode, providing simple and unreliable Information transfer service, no connection
establishment and disconnection, small data packets and high transmission frequency, there is
no requirement for packet loss. data to be transmitted to the specified IP. This mode is not
recommended.
4.2 TCP Client The factory default mode of this device is to provide client connections for TCP
network services and actively connect to the server. There is a difference between connection
and disconnection, thus ensuring reliable data exchange.
4.3 UDP Server UDP server mode, opposite to UDP Client. Setting this mode is the UDP server
mode. It is also an unreliable connection. It is not recommended to work in this mode.
4.4 TCP Server TCP server mode, corresponding to TCP Client mode, if set to this mode, this
device will serve to use the server, the computer needs to be set to the client mode for
communication and actively connect to this device.
4.5 HTTPD Client needs an HTTP server. The URL, header, domain name, port and other
information needed to send data can be
It can be set through software. When sending data, you only need to send the request data.
The device comes with the URL and header, and the returned data the user can choose
whether to remove the header.
The above 4.1-4.5 only briefly explained these communication methods. For more detailed
information, please refer to the USR-K3 software setup manual book.
The factory default is TCP Client mode.
Then set the remote IP remote port and local port. The remote port supports the way to enter the
domain name: for example www.xxx.com can also directly enter the IP address. The remote port
refers to the port allowed to connect to the server.
Note: When doing experiments in a local area network, make sure that the device and the
communicating computer are in the same network segment

10 / 23
6. Web configuration method
When using USR-K2, you need to enter the IP address in the browser to enter the web mode
1. Click After finding the module
2. Click Enter web configuration mode, as shown below
Figure 5
Enter the default username: admin and the default password admin
2
1

11 / 23
When using USR-K3 to enter the web page, the following is displayed. Click TTL1 to enter the setting page
The following figure appears:
Here

12 / 23
It can be polished from the picture above: the setting in the picture has the same effect as the
software setting, just fill in the picture above. After the input is complete, click the save button
It should be noted that there are 5 optional modes in the working mode; but there is no last item in
the web configuration mode of USR-K2: Httpd Client as shown in the figure below

13 / 23

14 / 23
After setting, click the save button to save. After clicking, a button to restart the network device appears,
Save
Click here
to restart

15 / 23
7. The network port communicates directly with the TTL
permanent serial port
1. Connect a TTL communication connector to the white 4P plug. If the connector provides 5V
power, then do not provide power at 3 again. Otherwise, 12V/DC needs to be provided at 3 places
to facilitate the power supply of the equipment.
This TTL adapter cable needs to be provided by the user, that is, the TTL to RS232 adapter cable,
which is usually a USB interface, and a virtual serial port is created on the computer. The direction
indicated by the arrow in the figure is the direction of data transmission
(the opposite of the Wiegand conversion TTL output described below).
2. After you are ready, you can communicate via serial and network ports.
3. Note that the jumper in place 1 should be removed.
4. The figure below is the data of the network interface directly communicating with the UART
serial port
5V
2
3
GND
1

16 / 23
It should be noted that the 1-4 marked in the above figure should be selected as the HEX method,
so that the data can be analyzed more intuitively.
Click Send at the label 5 to send the data to the TCP through the serial port, and click Send at the
label 6 to transmit the data from the TCP to the serial port. This is actually the inherent function of
USR-K2 \ USR-K3-transparent transmission.
1
2
3
4
5
6

17 / 23
8. Network interface and Wiegand interface communication
The connection is shown in the figure below,
Picture 12
Open the test software
USB to Wiegand device
Wiegand to TCP/IP
device

Follow the instructions of the illustration below to explain
1. Select TCP Server server mode, here is the working mode for the computer, because the
above is a converter The setting is the client mode, so here is the setting.
2. The local IP setting is the IP of the computer
3. The 23 here is the remote address mentioned above.
4. After clicking , it becomes , The most important thing is to look
at the content in the red circle below. It needs to be the same as that in the circle, that is, it will be
displayed like this when the converter is connected to the computer. Only in this way can you set 5, 6, 7,
and 8 to be the same as those marked in the above figure, and then you can operate.
If it does not appear the same as or similar to the ones in the circle (the format is the same after modifying
the IP and port). Then check whether the previous settings are consistent with the description in this article.
If the information in the red circle appears, then the following communication experiment can be carried
out:
5. Through Wiegand transmission, connect the Wiegand device to the converter, swipe the card or enter
the password, etc., and you can receive the content through the network port as shown above
6. If the 4P TTL to serial port is also connected at this time, then the data can also be seen on the serial
port at the same time, this is the content to be discussed below
18 / 23
1
2
3
4
5
6
8
7

19 / 23
9. Network interface, TTL initial serial port to receive
Wiegand data at the same time
Note that this time is opposite to the direction of sending and receiving data through TTL to
connect to the network port. The position of the outside receiving and sending data lines must be
exchanged, that is, the white line and the green line must be exchanged.
Data out direction
Do not connect this
5V power supply

20 / 23
The picture above shows the data that Wiegand transfers to TTL and network at the same time.
The figure below is the schematic diagram of the data transmission direction of this converter
(the data communication direction of the circuit board drawing)
10. The picture of the webpage when the network module USR-
K2 is used in the attached picture
CPU processing
Wiegand data
TXD
RXD
Ethernet side
RXD
TXD
TTL end
Wiegand
interface
Table of contents