OneFex CS-E3100 User manual

CS-E3100 User Manual
(Serial to Ethernet Converter)
Version: V1.0.0

Applicable products of the manual
Product
Brief introduction
CS-E3100-2
RS232 to Ethernet converter
CS-E3100-4
RS485 to Ethernet converter
Features
➢High-performance processor with Cortex-M4 @240 MHz
➢10/100Mbps Ethernet port, support Auto-MDI/MDIX
➢DC 5 ~ 36V
➢Support DHCP or static IP
➢The average delay of 10,000 times of ping is less than 1ms
➢Watchdog guard
➢Support TCP Server/Client, UDP Server/Client, HTTP Client
➢Support heartbeat packet and identity register packet
➢Modbus TCP/RTU convert
➢Import and export parameters
➢Cache data when offline
➢Configure device by web server, AT commands (Serial or LAN)
➢Can be upgraded over serial port, web page, remote server

Contents
1. Introduction................................................................................................................................... 1
1.1 Overview ................................................................................................................................ 1
1.2 Specification.......................................................................................................................... 2
1.3 Hardware ............................................................................................................................... 3
1.4 Get Started ............................................................................................................................ 3
1.4.1 Hardware Connection ............................................................................................. 4
1.4.2 Search Device........................................................................................................... 4
1.4.3 Configure Socket...................................................................................................... 4
1.4.4 Communication Test................................................................................................ 5
2. Functional overview.................................................................................................................... 6
2.1 Serial Port .............................................................................................................................. 6
2.1.1 Parameters of Serial................................................................................................ 6
2.1.2 Framing Method ....................................................................................................... 7
2.1.3 Operating Mode........................................................................................................ 7
2.2 Ethernet.................................................................................................................................. 8
2.3 Data Transmission............................................................................................................... 9
2.3.1 TCP Client/Server .................................................................................................... 9
2.3.2 UDP Client/Server.................................................................................................. 10
2.3.3 HTTP Client ............................................................................................................. 12
2.3.4 Heartbeat Packet and Identity Register Packet .............................................. 14
2.3.5 Modbus TCP and RTU Converter ...................................................................... 15
2.4 Advanced Features............................................................................................................ 16
2.4.1 Data Cache.............................................................................................................. 16
2.4.2 Search Device......................................................................................................... 16
2.4.3 LAN AT Command .................................................................................................17
2.4.4 Upgrade.................................................................................................................... 17
2.5 Restart when Received Timeout .................................................................................... 18
3. Parameters Configure.............................................................................................................. 19
3.1 Web Page ............................................................................................................................ 19
3.1.1 State Page ............................................................................................................... 19
3.1.2 System Page........................................................................................................... 19
3.1.3 Port Page ................................................................................................................. 20
3.2 AT Command ...................................................................................................................... 20
3.2.1 Rule of Serial AT..................................................................................................... 20
3.2.2 AT Command Error Code ..................................................................................... 21
3.2.3 Common commands ............................................................................................. 21
3.2.4 Commands in Detail .............................................................................................. 22

Disclaimer ........................................................................................................................................... 32
Revision history ................................................................................................................................. 33

CS-E3100 User Manual
OneFex 1
1. Introduction
1.1 Overview
SC-E3100 is a Serial to Ethernet converter. Excellent software and
hardware performance, applicable to various industries and complex scenarios.
Typical application scenarios:
Figure 1

CS-E3100 User Manual
OneFex 2
1.2 Specification
Table 1 Characteristics
Item
Parameter
Electric
Size
64*50*24mm
Operating
Temperature
-40 ~ 85℃
Operating Humidity
5% ~ 95%
Power Interface
DC Female Barrel Socket, 5.5*2.1mm
Voltage
5~36V
Consumption
60mA@12V
Ethernet
RJ45 10/100M
Serial
Interface
Plug-in terminal blocks, 3P, 5.08mm
Baud rate
1200 ~ 460800bps
Parity
NONE/ODD/EVEN
Data bits
8
Stop bits
1/2
Flow Control
NFC or 485
LED
Power
Power indication
Key
Reload
Press and hold for 3s to restore the
parameters
Software
Network protocol
DHCP/DNS/TCP/UDP/HTTP/ICMP
Transparent
Transmission
TCP Client/Server (Up to 8 clients)
UDP Client/Server
MQTT (Coming soon)
Advanced
Features
Web page
Configure or upgrade
AT Command
Network and Serial AT command
LAN search
Search devices and execute AT
command
Device Manage
Upgrade, No data restart

CS-E3100 User Manual
OneFex 3
1.3 Hardware
Figure 2 Electrical Interface
Default parameters of serial:
Serial
Item
Parameter
RS232/RS485
Baud rate
115200
Parity
NONE
Data bits
8
Stop bits
1
Default parameters of ethernet:
Ethernet
Item
Parameter
RJ45
DHCP
Disable
IP
192.168.10.8
Gateway
192.168.10.1
Mask
255.255.255.0
1.4 Get Started
Purpose: The device is connected to the computer directly to test TCP
transparent transmission.

CS-E3100 User Manual
OneFex 4
1.4.1 Hardware Connection
Figure 3 Connection Diagram
1. Use serial cable and network cable to connect the OneFex device and PC.
2. Power on the device.
1.4.2 Search Device
Open the Setup Tool provided by our company. Search firstly, then double-
click to open the device web page.
Figure 4 Search Device
1.4.3 Configure Socket
Configure device as TCP Server (8010) in "Port1" page. Then click Save
button. Finally reboot the device in "System" page to make the new parameters
take effect.

CS-E3100 User Manual
OneFex 5
Figure 5 Socket Configuration
1.4.4 Communication Test
Using TCP and COM Debug Assistant tests communication.
Figure 6 Communication Test

CS-E3100 User Manual
OneFex 6
2. Functional overview
Functional block diagram:
Figure 7 Function Block Diagram
2.1 Serial Port
The device of UE-E3100 has one RS232 or RS485. In order to be
compatible with our multi-serial products, the commands of serial and socket
have a character n for indicating the index of serial (e.g. AT+UARTn).
2.1.1 Parameters of Serial
Table 2 Parameters of Serial
Serial
Item
Parameter
RS232/
RS485
Mode
Configuration mode
transparent transmission(default)
Baud rate
1200 ~ 460800 (default: 115200)
Parity
NONE/ODD/EVEN (default: NONE)
Data bits
8
Stop bits
1/2 (default: 1)
Flow Control
NFC or 485

CS-E3100 User Manual
OneFex 7
Figure 8 Serial Parameters
2.1.2 Framing Method
In order to improve the network transmission performance, the serial port
receives the data and then packs it into a frame of data and then forwards it to
the network. This product supports packing by data length or data receiving
interval. As long as one of the two methods is satisfied, data will be forwarded.
Conditions for packing into a frame:
⚫By length: length of data ≥ length of settings(default: 1024, 64 ~ 1024)
⚫By time interval: Character interval ≥ interval of settings (default : 5ms,
1 ~ 300ms)
Note: Under the TCP protocol, data will be packet-connected. If the length
of the data packet is strict, please be sure to add a mechanism for splitting
packets at the application layer.
2.1.3 Operating Mode
Supports two operating modes:
⚫Configuration mode: Data received from serial port is executed as a AT
command. Data received from network will not be forwarded to serial,
but discarded. In addition, this is a temporary mode, and not saved
when power off.
⚫Transparent transmission: The data from the serial and the network will
be forwarded to each other directly.

CS-E3100 User Manual
OneFex 8
2.1.3.1 Enter Configuration Mode
The sequence of entering Configuration Mode is as shown in the figure
below, where "UART" means user serial device, and "ONEFEX" means UE-
E3100.
Figure 9 Timing Diagram
The steps are as follows:
1. "UART" sends +++
2. Wait for 500ms , "UART" sends a
3. If +ok is received, it means enter Configuration Mode successfully
Note: If the step is aborted, the data sent during the period will be forwarded
to the Socket. Configuration Mode will not be saved after power-off.
2.1.3.2 Exit from Configuration Mode
User can send AT command AT+EXIT or restart the device to exit
Configuration Mode.
Note: The at command ends with a carriage return line feed: \r\n
2.2 Ethernet
Table 3 Ethernet Parameters
Ethernet
Item
Default Parameter
RJ45
DHCP
Disable
IP
192.168.10.8
Gateway
192.168.10.1

CS-E3100 User Manual
OneFex 9
Mask
255.255.255.0
DNS1
Same as Gateway
DNS2
114.114.114
Figure 10 Ethernet Parameters
2.3 Data Transmission
Each serial port of this products supports two Socket. By default, only the
first socket of serial port 1 is enabled. When two sockets are opened at the
same time, the data received by the serial port will be forwarded to the two
sockets respectively.
The device support TCP Server, TCP Client, UDP Server, UDP Client,
HTTP Client, P2P and MQTT Client (coming soon).
2.3.1 TCP Client/Server
The Transmission Control Protocol (TCP) is a transport protocol that is used
on top of IP to ensure reliable transmission of packets.
When the device uses the TCP protocol, the keepalive is enabled.
2.3.1.1 TCP Client
When TCP Client is enabled, the client will connect the server after the
device obtains the IP. The device will reconnect automatically if the connection
failed. The reconnection interval is 1s.

CS-E3100 User Manual
OneFex 10
In addition, a random port is used if the local port is set to 0.
Figure 11 TCP Client
2.3.1.2 TCP Server
When the device works as a TCP server, it listens to the port specified by
the user. Supports up to 8 clients. When the number of clients exceeds the limit,
the oldest client can be kicked off and the new client can be accepted, or keep
original clients and the new client is prohibited from accessing.
Figure 12 TCP Server
2.3.2 UDP Client/Server
User Datagram Protocol (UDP) is a Transport Layer protocol. Unlike TCP,
it is an unreliable and connectionless protocol. Since high performance is

CS-E3100 User Manual
OneFex 11
needed, UDP permits packets to be dropped instead of processing delayed
packets. There is no error checking in UDP, so it also saves bandwidth. It is
more efficient in terms of both latency and bandwidth.
The UDP protocol does not need to distinguish between client and server.
For the convenience of users, we divide UDP into UDP Client and UDP Server
artificially.
2.3.2.1 UDP Client
The address and port of the target server are specified by the user in UDP
Client mode. And it is recommended to use a fixed local port, otherwise the
peer device may not know the port this device listened.
Figure 13 UDP Client
2.3.2.2 UDP Server
Listen to the port specified by the user in UDP server mode. The target host
is not a specific one, it is usually a client that communicated recently.

CS-E3100 User Manual
OneFex 12
Figure 14 UDP Server
2.3.3 HTTP Client
The HTTP protocol version supported by the device is 1.0 and 1.1, and it
supports GET/POST request. Data received from serial is assemble as HTTP
message and sent to the HTTP server, and then accepts the response from
HTTP server. In addition, supports filtering out HTTP headers.
User can preset the request method (GET/POST) or use the automatic
mode. The device will select a GET or POST request according to data when
works in automatic mode.
HTTP:// in URI is not necessary. Both of the following uri are correct:
⚫http://www.rt-thread.com/service/rt-thread.txt
⚫www.rt-thread.com/service/rt-thread.txt
2.3.3.1 Request of GET
If you want to request a web page via URI, you need to use the Request of
GET mode.
URI consists of "Server address", "Server port" and "URL". Note that"URL"
in web is invalid and it is the data received from the serial.
Example: Get www.rt-thread.com/service/rt-thread.txt and it will response
the introduction of RT-Thread. The process is as follows:
1. Select "HTTP Client" protocol,
2. Set server address(www.rt-thread.com) and port(80), select "GET"
request.
3. Save and Reboot
4. Send URL (/service/rt-thread.txt) over serial and it will receive a
message from the HTTP server

CS-E3100 User Manual
OneFex 13
Figure 15 HTTP GET Test
2.3.3.2 Request of POST
Post request can submit data to HTTP server. Here we use a server(www.rt-
thread.com/service/echo) which supports echo for testing.
The parameters are similar to GET, the request is changed to POST and
add URL "/service/echo".
Figure 16 HTTP Post Test

CS-E3100 User Manual
OneFex 14
2.3.3.3 Request AUTO
In automatic mod, just need to set the HTTP headers and the other HTTP
parameters is invalid. The request method is automatically selected according
to the serial port data.
Figure 17 Requst of AUTO
GET: The serial port can send the complete URI, such as:
⚫http://www.rt-thread.com/service/rt-thread.txt
⚫http://www.rt-thread.com:80/service/rt-thread.txt
⚫www.rt-thread.com/service/rt-thread.txt
POST: URI and data are separated by escape characters( \r\n ), such as:
⚫http://www.rt-thread.com:80/service/echo
Data
⚫www.rt-thread.com/service/echo
Data
2.3.4 Heartbeat Packet and Identity Register Packet
The device supports Heartbeat Packet and Identity Register Packet when
device works as TCP client/UDP client.

CS-E3100 User Manual
OneFex 15
Figure 18 Register and Heart
2.3.4.1 Heartbeat Packet
Heartbeat Packet can send data to the network or serial port regularly.
There are many application scenarios for this function. Such as the server can
determine whether the client is online by heartbeat. Another Serial heartbeat
data can be used for polling Modbus data.
Note:
⚫Heartbeat Packet to network only support TCP/UDP Client
⚫Heartbeat Packet to serial suspended when the device enters the
Configuration Mode.
2.3.4.2 Identity Register Packet
When the device communicates with server, the device sends some
identifying data actively, and the server can distinguish the client based on this.
This feature is only supported in TCP/UDP Client. There are three ways to send:
⚫First: TCP sends every time a connection is established. And UDP
sends only once.
⚫Every: As a prefix for each packet of data
⚫ALL: Both First and Every
2.3.5 Modbus TCP and RTU Converter
This function is a converter between Modbus TCP and Modbus RTU. If
enable this function, the serial port side of the device uses Modbus RTU
protocol communication, while the network port side uses Modbus TCP protocol
communication. Note that data does not conform to the protocol will be
discarded.

CS-E3100 User Manual
OneFex 16
Figure 19 Modbus Converter
2.4 Advanced Features
2.4.1 Data Cache
The serial port data can be cached when the device is offline, and then sent
to the server after online.
This feature is enabled by default.
Figure 20 Data Cache
2.4.2 Search Device
The network search function can search for devices in LAN and send AT
commands to the devices.
The search process is to broadcast the search keyword (default is
OneFex.com)to port 8168 using UDP protocol. After receiving the specified
broadcast packet, the device will reply its own IP, MAC, name, version .
This manual suits for next models
2
Table of contents