FORENEX FR-E2Sxy Ethernet to Serial interface Owner’s Manual

June 9, 2024
FORENEX

FORENEX FR-E2Sxy Ethernet to Serial interface

Record of revision

FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-1

Introduction

General Description
The E2S enables the serial target device to have an Ethernet function. Therefore, the serial target device is able to connect a LAN/ WAN immediately without any hardware change. The E2S is able to translate the protocol from TCP/IP packet to a kind of serial data stream just likes RS-232, RS-485, UART- TTL or SPI depends on the different E2S model. On the other hand, E2S is also to translate the data stream from a serial to TCP/IP packet. It provides an easier way to connect Ethernet by DHCP client or DNS client. Besides, a customized web page can configure E2S for an adaptive setting.

System Architecture

FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-2

Ordering Information

Part number: FR-E2S-xy

Serial interface:

  •  x =〝U〞- interface Uart-TTL.
    • =〝R〞- interface RS232.
    • =〝S〞- interface RS485.
    • =〝P〞- interface SPI.
  • y =〝F〞- Commercial version.
    • =〝I〞- Industrial version

Features

Ethernet InterfaceFORENEX FR-E2Sxy Ethernet to Serial interface-
fig-3

Serial Interface

  • E2S-UF/ UI model, E2S-RF/RI model
    • UART TTL/ RS-232 signals: 5-wire (TX, RX, CTS, RTS, GND) or 3-wire (TX, RX, GND)
    • Flow control functions: None/ Hardware (CTS, RTS)/ Software (Xon, Xoff).
    • Baud Rate: UART_TTL Support up to 921600 bps.
    • RS232 Support up to 115200 bps.
  • E2S-SF/SI model
    • RS-485 signals: 2-wire (A/Y+, B/Z-)
    • Automatically enable control for the transmitter/ receiver of RS-485.
    • Baud Rate: Support up to 115200 bps.
  • E2S-PF/PI model
    • SPI signals: 5-wire (nSS, SCLK, MOSI, MISO, GND)
    • SPI working in the Master mode, support up to 1MHz clock.

Electrical Characteristics

Recommended operating condition: GND = 0V, DC-IN = 5V, Ta = 25 ºC .FORENEX FR-E2Sxy Ethernet to Serial interface-fig-4

Note.1 Detail refers to SP3232EET.
Note.2 Detail refers to ISL4485E.

Overview & Dimension

Dimension : 67mm(L) × 40mm(W) × Max. 19.5mm(H)FORENEX FR-E2Sxy Ethernet
to Serial interface-fig-5

Connector OverviewFORENEX FR-E2Sxy Ethernet to Serial interface-
fig-6

LED Status

FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-7

Pin assignment of Connector

W1 : DC -in Wafer, 1×2 pin, 2.0mm, Side entryFORENEX FR-E2Sxy Ethernet to
Serial interface-fig-8
H1: Serial communications Box-Header, 2×5 pin, 2.0mm, Straight entryFORENEX FR-E2Sxy Ethernet to Serial interface-
fig-9

For E2S-SF/SI (RS-485)

For E2S-PF/PI (SPIFORENEX FR-E2Sxy Ethernet to Serial interface-
fig-10

  • The E2S-RF/RI connects to RS-232 device in 3-wire,
  • The E2S-UF/UI connects to UART-TTL device in 3-wire.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-11
  • The E2S-RF/RI connects to RS-232 device with flow control,
  • The E2S-UF/UI connects to UART-TTL device with flow controlFORENEX FR-E2Sxy Ethernet to Serial interface-fig-12
  • The E2S-SF/SI connects to RS-485 device.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-13
  • The E2S-PF/PI connects to SPI slave deviceFORENEX FR-E2Sxy Ethernet to Serial interface-fig-14

Remote Configuration over Web page

The first time to configure E2S board

There are two methods to connect between E2S board and Host PC for first time setting. Due to the static IP of E2S board has default at 192.168.0.3, therefore, make sure the IP address of host PC sets as same segment as 192.168.0.xxx.
(xxx is between 1 and 254, except 3).

  • PC connects to E2S board directly.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-15
  • The E2S board connects to LAN.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-16
Authentication page.

Open a web browser and enter http://192.168.0.3. When the login window appears, set the user name to admin and set the password to admin. Click Login to continue.FORENEX FR-E2Sxy Ethernet to Serial
interface-fig-17

Basic Page:

This page can change Serial settings and Ethernet settings for E2S.FORENEX
FR-E2Sxy Ethernet to Serial interface-fig-18

Serial Settings

FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-20

Differences between the SPI Mode 0~3:

FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-21

Network SettingsFORENEX FR-E2Sxy Ethernet to Serial interface-
fig-22

Note.1 If “DHCP Client“ was disabled, E2S will use the default settings of static IP Address and subnet mask.
Note.2 When E2S works under “Server Mode”, these settings are invalid.
Note.3 More detail please refers to “Appendix A. Flow Control Packet over Ethernet”.

Security Page

This page can change login account for Web server and Telnet server.FORENEX
FR-E2Sxy Ethernet to Serial interface-fig-23

Attentions:

  • The Accessible IP Setting group must be used carefully. Once set these four IP list and be enabled, E2S board can only be configured by these four IP address over Web page.
  • When you change the accessible IP successful, you must reboot device to take it effectPlease confirm settings before reboot device.

Ethernet Application Examples

Connect to the Host via Ethernet cable directly.
  • In this case, The “DHCP client” on Web page of E2S does not recommend to be enabled.

  • Keeping the default IP (192.168.0.3) or setting a new static IP over Web page.

  • The IP of Host and E2S should be different, but in the same IP segment.
    For example: If E2S be set to 192.168.0.3, Then Host can be set to 192.168.0.xxx (xxx is between 1 and 254, except 3).

  • When E2S is working in Client mode, the setting of “Destination Host Name/IP” must as same as Host IP and the setting of “Destination Host Port” must as same as listen port of Host. Then Host need to wait for the E2S to establish a TCP/UDP connection.

  • When E2S is working in Server mode, the setting of “Listening Port” is the port provide for Host to establish a TCP/UDP connection.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-24

Connect to the Host via LAN.
  • Keeping the default IP (192.168.0.3) or set “DHCP client” to enable for a valid IP asking.
  • If E2S works in Server mode and “DHCP client” is enabled, Host has to check the IP of E2S before establish a TCP/UDP connection.
  • Following up the 7.1) c, d and e section.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-25
Implement existing serial communications via Ethernet cable directly.
  • Both IP of E2S-1 and E2S-2 should be different, but in the same IP segment.
  • As shown in figure11, E2S-1 set to client mode and E2S-2 set to server mode.
  • The setting of “Listening Port” on E2S-2 and “Destination Port” on E2S-1 must be the same.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-26
Implement existing serial communications via LAN.
  • Both IP of E2S-1 and E2S-2 should be different, but in the same IP segment.
  • As shown in figure11, E2S-1 set to client mode and E2S-2 set to server mode.
  • The setting of “Listening Port” on E2S-2 and “Destination Port” on E2S-1 must be the same.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-27
Connect to Remote Server via INTERNET.
  • n this case, the E2S can only be worked under Client mode.
  • This setting of “Destination Host Name/IP” must as same as the remote server IP or server name.
  • Remote server need to listen the listen port of E2S for wait a TCP/UDP connection.FORENEX FR-E2Sxy Ethernet to Serial interface-fig-28

Appendix A. Flow Control Packet over Ethernet

IMPORTANT: The description of Appendix A. is only available for below models E2S-UF/UI (UART TTL), E2S-RF/RI (RS-232) and E2S-SF/SI (RS-485).

When you enable “Flow Control Packet” at Web page setting, you must follow below Data format or Command format to transmit/ receive Ethernet packet.FORENEX FR-E2Sxy Ethernet to Serial interface-
fig-29

Data format of Packet (for flow control using)

  • Packet head code should be fixed with 0x32
  • Length constituted by 2 bytes.
  • Maximum support 1341bytes data in single Packet.

E.g.1 Receive data stream from Ethernet to RS232.

  • Received data packet = “32 00 06 01 02 03 04 05 06”
  • Length 0x06 = 6 bytes = “01 02 03 04 05 06”,
  • Serial Target will get the 6 bytes from RS232.

E.g.2 Transmit data stream from RS232 to Ethernet.

  • Transmitted the leading bytes of data packet = 32 01 38 Bytes Data
  • Length 0x138 (hexadecimal) = 312 (Decimal) bytes,
  • Serial Target should continue to send 312
  • bytes data after the leading bytes (32 01 38) were sent from RS232.

Command format of Packet (for flow control using)FORENEX FR-E2Sxy
Ethernet to Serial interface-fig-31

  • Packet head code should be fixed with 0x33
  • Byte 3 is length between in 1~3.

Command list:FORENEX FR-E2Sxy Ethernet to SeFORENEX FR-E2Sxy Ethernet to
Serial interface-fig-32rial interface-fig-32

Command: E2S_STATUS_CHANGE (0x81)FORENEX FR-E2Sxy Ethernet to Serial
interface-fig-33

Command: GET_E2S_STATUS(0x03)FORENEX FR-E2Sxy Ethernet to Serial
interface-fig-34

Command: CLR_RTS(0x12), SET_RTS(0x14)

Appendix B. Communication with SPI device over Ethernet

IMPORTANT:

  1. The description of Appendix B. is only available for E2S-PF/PI (SPI) model.
  2. The “Flow Control Packet” and “UDP Protocol Link” do not support.
  3. To establish a TCP connection before any data transmission.
  4.  The E2S will passively wait for the Host (Remote Equipment) to send packet and doesn’t send any data to Host actively.
  5. While E2S is processing a received packet, the Host is not allowed to send new packet, except for a resulted packet is returned from E2S.
Write data to SPI Slave device.
  1. Packet format shall refer to protocol of SPI Slave Device.
  2. When E2S received any packet form Ethernet. The E2S will assert a completed SPI transition cycle that base on the protocol of SPI Slave Device. And bypass entire packet to SPI Slave device without change.
  3. When Host received a return packet from E2S that means the previous packet has been performed completely. No matter the content of packet is invalid or not. The Host is allowed to send next new packet FORENEX FR-E2Sxy Ethernet to Serial interface-fig-35

E.g. If you want to write 4 Bytes data to the AMIC A25LQ64,

The packet form Host should be “1 Byte Command + 3 Bytes Address + 4 Bytes Data”. When single packet processing is completed, the E2S will be returned 8 Bytes data to Host.

A- 2. Read data form SPI Slave device.
  1. When Host wants to read back N data bytes from SPI Slave device. It should add same number N of dummy bytes to be the last bytes of packet.
  2. When E2S received any packet form Ethernet. The E2S will assert a completed SPI transition cycle that base on the protocol of SPI Slave Device. And bypass entire packet to SPI Slave device without change.
  3. The return data packet includes invalid and valid data. The valid data will be located as same as the dummy bytes which have been defined in packet. FORENEX FR-E2Sxy Ethernet to Serial interface-fig-36

E.g. If you want to read 4 Bytes data form AMIC A25LQ64,

The packet form Host should be “1 Byte Command + 3 Bytes Address + 4 Bytes Dummy” When single packet processing is completed, the E2S will be returned 8 Bytes data to Host. The valid data was after 4 position 4 bytes in E2S returned.

Forenex Technology Co.,
Ltd 5F-2,No212,
Sec.4,l;Venxin Rd ,
North Dist,
Taichung City 404,
Taiwan

TEL, 886-4-22969886
FAX, 886-4-22969887
www.forenex.com.tw

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

FORENEX User Manuals

Related Manuals