0% found this document useful (0 votes)
53 views60 pages

NB114 UserManual EN V1.6

Ebyte NB114 User manual

Uploaded by

mouradsaif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views60 pages

NB114 UserManual EN V1.6

Ebyte NB114 User manual

Uploaded by

mouradsaif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Chengdu Ebyte Electronic Technology Co., Ltd.

NB114 User Manual

Serial Port Ethernet


Serial Server
NB114

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Contents
1. Introduction ...................................................................................................................................... 1
2. Quick Start ....................................................................................................................................... 3
2.1. Preparation for use ..............................................................................................................3
2.2. Equipment wiring ................................................................................................................. 3
2.3. Software settings ................................................................................................................. 5
2.3.1. Network test environment ....................................................................................... 5
2.3.2. Default parameters .................................................................................................. 6
2.3.3. Data transmission test .............................................................................................7
3. Product Overview ........................................................................................................................... 9
3.1. Product specification ...........................................................................................................9
3.2. technical parameter ...........................................................................................................10
3.3. Indicator and interface description ..................................................................................11
3.4. Mechanical dimensions .................................................................................................... 13
3.5. Installation method ............................................................................................................ 14
4. Product function ............................................................................................................................ 15
4.1. Network parameters ..........................................................................................................15
4.1.1. IP address type .......................................................................................................15
4.1.2. Domain name resolution (DNS) ...........................................................................16
4.1.3. Intranet access port ............................................................................................... 16
4.2. Network operation mode .................................................................................................. 17
4.2.1. TCP server mode ................................................................................................... 17
4.2.2. TCP client mode .....................................................................................................17
4.2.3. UDP server mode ...................................................................................................18
4.2.4. UDP client mode .................................................................................................... 18
4.2.5. HTTP client mode .................................................................................................. 19
4.2.6. MQTT client mode ..................................................................................................24
4.3. Serial port parameters ...................................................................................................... 33
4.4. Advanced parameters .......................................................................................................33
4.4.1. Disconnection and reconnection function .......................................................... 33
4.4.2. Timeout restart function .........................................................................................34
4.4.3. Short connection function ..................................................................................... 34
4.4.4. Connection emptying cache function ..................................................................34
4.4.5. Heartbeat packet function .....................................................................................35
4.4.6. Registration package function ..............................................................................35
4.5. Modbus gateway ............................................................................................................... 36
4.5.1. Simple protocol conversion mode ....................................................................... 36
4.5.2. Multi-host mode ......................................................................................................39
4.5.3. Storage gateway .................................................................................................... 42
4.5.4. Configurable gateway ............................................................................................44
4.5.5. Automatic upload ....................................................................................................46
4.6. Introduction to basic functions .........................................................................................48
4.6.1. Web page configuration ........................................................................................ 48

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.6.2. Restore factory settings ........................................................................................ 50


4.6.3. AT instruction configuration .................................................................................. 50
4.6.4. Configuration tool software settings ....................................................................50
4.6.5. Random native port ............................................................................................... 51
4.6.6. Remote upgrade .....................................................................................................51
Revision History .................................................................................................................................57
About us ..............................................................................................................................................57

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

1. Introduction

NB114 is a serial port server that converts serial


port data to Ethernet data; It has multiple Modbus
gateway modes and MQTTC/HTTPC Internet of Things
gateway modes, which can meet the networking
functions of various serial port devices/PLCs; Adopt
industrial design standards to ensure equipment
reliability; The product comes with RJ45 network port and 4 × 3.81mm Phoenix terminal and
DB9 data interface; Support multiple serial port protocols (RS422/RS485/RS232); Install
with locating holes.

Features
 RJ45 supports 10M Ethernet interface;
 Support multiple working modes (TCP Server, TCP Client, UDP Server, UDP Client,
HTTPC, MQTTC);
 Support configuration tools, web pages and AT commands;
 The server mode supports multiple socket connections;
 Support multiple serial port protocols (RS485, RS422, RS232);
 Support multiple baud rates;
 Support DHCP function;
 DNS (domain name resolution) is supported, and the domain name resolution server
can be customized;
 Support multiple Modbus gateways (simple protocol conversion, multi-host mode,
storage gateway, configurable gateway);
 Support fast access to Alibaba Cloud, Baidu Cloud, OneNET, Huawei Cloud, and version
3.1 standard MQTT servers;
 Support HTTP protocol (GET/POST request);
 Support virtual serial port;
 Support timeout restart function and customize the restart time;
 Support the short connection function and customize the short connection interval;
 Support heartbeat package and registration package functions;
 Support serial port cache cleaning function;

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

 Support access to the Internet and LAN;


 Support hardware restoration to factory settings;
 Support online upgrade function.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

2. Quick Start

If there is a problem in the use process, click the official website


link:https://www.ebyte.com/product-class.aspx

2.1. Preparation for use

Before using the serial server (hereinafter referred to as the "device"), it is necessary to
prepare the network cable, computer, USB to serial converter and other relevant auxiliary
materials. The details are as follows:

NB114 Network cable computer

DC 12V switch power


USB to RS485 Several cables
supply
[Note] This case uses RS485 interface for demonstration;

2.2. Equipment wiring

Power wiring (DC 8~28V):

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Serial port and network port and wiring:


1、 The standard 10M RJ45 network interface is adopted. After the correct connection, the
orange indicator light of the equipment network interface is always on and the green
indicator light is flashing;
2、 Use standard RS485 interface (4 × 3.81mm Phoenix terminal), device 485-A is
connected to A of USB to RS485 converter, and device 485-B is connected to B of USB
to RS485 converter (please use standard RS485 twisted-pair cable for a long distance,
otherwise normal communication may not be possible due to excessive environmental
interference);

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

[Note] Do not use RS485, RS422 and RS232 interfaces at the same time, which may affect
data transmission.

2.3. Software settings

2.3.1.Network test environment

To avoid server search failure and inability to open web pages and other related
problems in the actual application process, it is recommended to check the relevant settings
of the computer first.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

(1) Turn off the firewall and antivirus software of the computer;
(2) Configure the network card connected to the device;
(3) This case is for the test of direct connection of the equipment to the computer. The
computer needs to be configured as static IP (the computer is directly connected to the serial
port server, there is no router to assign, and the computer cannot obtain the IP address). The
use of a switch or router needs to ensure that the equipment and the computer are on the
same network end (for example, 192.168.3. xxx);
(4) The static IP of the computer is 192.168.3.4 (the same network segment as the serial
port server), the subnet mask is 255.255.255.0, and the default gateway is 192.168.3.1.

2.3.2.Default parameters

project Default parameters


IP address 192.168.3.7
Default local port 8887
Subnet mask 255.255.255.0
Default gateway 192.168.3.1
Default working mode TCP Server

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Serial baud rate 115200


Serial port parameters 8 / None / 1

2.3.3.Data transmission test

After the above operation steps, follow the factory default parameters of the equipment
and perform the following operations to realize the transparent data transmission test.
The operation steps are as follows:
(1) Open the test TCP/IP debugging assistant software;
(2) Select TCP Client mode in the "network setting area". The remote host address
corresponds to (default local IP of the device: 192.168.3.7). The remote host port
corresponds to the factory local port 8887 of the device. Click Connect;
(3) Wait for the computer to connect to the serial server. After the connection is
completed, the LINK light of the serial server is always on;

(4) Open the serial port assistant, set the serial port baud rate to 115200, set the
serial port parameter to 1/8/None, and click to open the serial port;

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

(5) For data transmission test, the serial port assistant (serial port end) sends the
test data, and the network debugging assistant (network end) receives the test data. The
network debugging assistant (network side) sends the test data, and the serial port assistant
(serial port side) receives the test data. Realize duplex communication (i.e. local to network
two-way data transmission and receiving);

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3. Product Overview

3.1. Product specification

Socket
Product product Product size
Number of Working mode working voltage
model type (mm)
connections
Chip
NS1 6-way TCP Server 3.0~5.5V(DC) 17×19×4
module
TCP Client
NT1 In-line
6-way UDP Server 3.0~5.5V(DC) 35×22×30
NT1-B module
UDP Client
NA111 8~28V(DC)
DTU 6-way MQTT Client 110×66×30
NA111-A 85~265V(AC)
HTTP Client
NB114 DTU 6-way 8~28V(DC) 102×84×25

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3.2. technical parameter

project explain
working voltage 8~28V (DC)
Serial port (RS422/RS485, 4 × 3.81mm Phoenix terminal)
Serial port (RS232, standard RS232 line sequence DB9
Interface
female)
Network interface (RJ45)
TCP Server (default), TCP Client, UDP Server, UDP
Working mode
Client, HTTP Client, MQTT Client
Socket
TCP server supports 6-way client connections
connection
Network protocol TCP/UDP、MQTT、HTTP、IPv4、DHCP、DNS
IP acquisition
Static IP (default), DHCP
method
DNS domain
support
name resolution
Domain name
114.114.114.114 (customizable)
resolution server
collocation
Web page, parameter configuration tool, AT command
method
IP address 192.168.3.7 (customizable)
user name Admin (customizable)
password Admin (customizable)
Local Port 8887 (customizable)
Subnet mask 255.255.255.0 (customizable)
gateway 192.168.3.1 (customizable)
Serial port cache 1024Byte
Packaging
512 Byte
mechanism
Serial baud rate 1200~230400 bps (115200 by default)
Data bits 5. 6, 7, 8 (default)
Stop bit 1 (default), 2
Check bit None (default), Odd, Even, Mark, Space
Product size one hundred and two × eighty-four × 25mm (L × W × H)
Product weight 126g ± 5g
Working
temperature and -40~+85 ℃, 5%~95% RH (no condensation)
humidity
Storage -40~+105 ℃, 5%~95% RH (no condensation)

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

temperature and
humidity

3.3. Indicator and interface description

Seri
al
name function explain
num
ber
Standard DB9-RS-232 bus head wire
1 RS232 RS232 interface
sequence;
RS485/RS422
2 485-A(T+) A of RS-485 interface, T+sent by RS-422;
interface
RS485/RS422
3 485-B(T-) B of RS-485 interface, T - sent by RS-422;
interface
RS422 interface
4 (R+) R+received by RS-422;
(R+)
RS422 interface (R
5 (R-) RS-422 received R -;
-)
Power on: the red light is on;
6 PWR Power indicator
Power off: the light is off;

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3 seconds before power-on: flash;


Wait for the network cable: always on;
Data transceiver
7 DATA There is data receiving and sending: blue
indicator
light and green light flash;
No data transmission: the light is off;
Connection succeeded: the green light is on;
Link connection
8 LINK No connection: the light is off;
light
UDP mode is always on;
DC bus power DC 8~28V input, do not input with Phoenix
9 DC-IN
input terminal at the same time;
3.81mm Phoenix terminal, DC 8~28V
10 VCC DC power input positive pole, do not input DC head at the
same time;
3.81mm Phoenix terminal, DC 8~28V
11 GND DC power output negative pole, do not input DC head at the
same time;
Restore factory Press and hold for 5 seconds to restore the
12 Reload
key equipment;
13 Ethernet network interface Standard RJ45 interface;

[Note] When the network cable is not connected, PWR, DATA and LINK are all on, and the
device is in standby state.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3.4. Mechanical dimensions

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3.5. Installation method

The equipment is installed by locating holes.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4. Product function

4.1. Network parameters

4.1.1.IP address type

The IP address is the identification of the module in the LAN, which is unique in the LAN.
Therefore, it cannot be duplicated with other devices in the same LAN. The IP address of the
module can be obtained by static IP and DHCP.
(1) Static IP: The static IP needs to be set manually by the user. In the process of setting,
pay attention to writing the IP, subnet mask and gateway at the same time. The static IP
is suitable for the scenario where the IP and device need to be counted and
corresponding one by one.
Advantages: access to devices that cannot be assigned IP addresses can be searched
through the full-segment broadcast mode, which is convenient for unified management;
Disadvantages: Different intranet segments in different LANs lead to the failure of
normal TCP/UDP communication.
(2) Dynamic DHCP: DHCP is mainly used to dynamically obtain IP address, gateway
address, DNS server address and other information from the gateway host, thus
eliminating the tedious steps of setting IP address. It is applicable to scenarios where
there is no requirement for IP and no requirement for one-to-one correspondence
between IP and modules.
Advantages: The access router and other devices with DHCP server can communicate
directly, reducing the trouble of setting IP address gateway and subnet mask.
Disadvantages: If the module is connected to a network without a DHCP server, for
example, if it is directly connected to a computer, the module will not work properly.

The subnet mask is mainly used to determine the network number and host number of
the IP address, indicate the number of subnets, and determine whether the module is in the
subnet.
The subnet mask must be set. Our commonly used Class C subnet mask is
255.255.255.0, the network number is the first 24 digits, the host number is the last 8 digits,

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

the number of subnets is 255, and the module IP is within the range of 255, then the module
IP is considered to be in the subnet.
Gateway refers to the network number of the network where the module's current IP
address is located. If the router and other devices are accessed when connecting to the
external network, the gateway is the router.

4.1.2.Domain name resolution (DNS)

Domain name resolution converts the domain name into an IP address recognized by
the network through the domain name resolution (DNS) server. The domain name resolution
(DNS) server address of the serial port server supports user customization. It can achieve
domain name resolution through the customized domain name resolution server in case of
domain name server exception. The device will report the resolution request to the
customized domain name resolution (DNS) server during domain name resolution, and
return the device connection parameters (generally IP address) after the resolution is
completed.
In DHCP mode, the domain name resolution (DNS) server address is automatically
obtained (synchronous router domain name resolution address) and cannot be modified.
In the static IP mode, the default address of the domain name resolution (DNS) server is
114.114.114.114.

4.1.3.Intranet access port

The default intranet access port is 80.


[Note] If the port number is modified, the port number should be added in the address
input column. For example, to modify the web page access port to 8080, you need to enter
192.168.3.7:8080 in the address column to connect to the web page configuration.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.2. Network operation mode

4.2.1.TCP server mode

TCP Server is a TCP server. In the TCP Server mode, the device listens to the local port,
accepts the connection request of the client and establishes a connection for data
communication, which is usually used for communication with TCP clients in the LAN.
When the Modbus gateway function is turned off, the device will send the data received
by the serial port to all the client devices that have established a connection with the device.
At most, it can connect 6 clients. After the Modbus gateway function is enabled, the
non-Modbus data will be cleared and will not be forwarded.

4.2.2.TCP client mode

TCP Client is the TCP client. When the device works, it will actively send a connection
request to the server and establish a connection to realize the interaction between serial port
data and server data.
To use the client, you need to configure the IP address/domain name and target port of
the target accurately.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.2.3.UDP server mode

UDP Server means that the device does not verify the data source IP address when
communicating with UDP protocol. After receiving a UDP packet, it saves the source IP
address and source port of the packet and sets it as the target IP address and port.
Therefore, the data sent by the device only sends the data packet to the source IP address
and port of the last time the device received the data.
This mode is usually used in scenarios where multiple network devices communicate
with this device, and the frequency is high, and TCP Server cannot meet the conditions.
Using UDP Server requires remote UDP devices to send data first, otherwise data
cannot be sent normally.
[Note] In UDP mode, the data sent by the network to the device should be less than 512Bit
per packet, otherwise it will cause data loss.

4.2.4.UDP client mode

UDP Client is a connectionless transport protocol that provides simple and unreliable
transaction-oriented information transmission services. There is no connection
establishment and disconnection. You only need to configure the destination IP and
destination port to send data to each other. Usually used in data transmission scenarios
where there is no requirement for packet loss rate, the data packet is small and the
transmission frequency is fast, and the data is to be transmitted to the specified IP.
In UDP Client mode, the device will only communicate with the configured (target IP and
target port) remote UDP device.
In this mode, the target address is set to 255.255.255.255, and the transmitted data will
be broadcast in the whole network segment, but the receiving and transmitting equipment
needs to ensure the port consistency, and the equipment can also receive the broadcast
data.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.2.5.HTTP client mode

This mode can realize the HTTP packet grouping function, and provides two modes:
GET and POST. The customer can configure parameters such as URL, Header, and send
packets by the device (serial port server) to realize the fast communication between the
serial port device and the HTTP server. The HTTP client mode is recommended to use the
random port and open a short connection to save the HTTP server resources.

1. GET
Use the HTTP mode of OneNET multi-protocol access to test the HTTP-GET request of
the device, as shown in the following figure.
(1) Return data configuration with header:

Data return test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

(2) Return data configuration without header:

Data return test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

2. POST
Use the HTTP mode of OneNET multi-protocol access to test the HTTP-POST request
of the device, as shown in the following figure.
(1) Return data configuration with header:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Data return test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

(2) Return data configuration without header:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Data return test:

4.2.6.MQTT client mode

The serial server supports the fast access standard MQTT3.1 protocol server (OneNET,
Baidu Cloud, Huawei Cloud, user-built and other server types) and Alibaba Cloud server,
supports the quality of service level configuration (Qos 0, Qos 1), supports the ultra-long text
configuration, and facilitates better access to network service operators (server address,
three elements, subscription and publishing address support the configuration of up to 128

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

characters).

1. Standard MQTT3.1.1
Here, the standard MQTT3.1.1 connection takes Tencent's standard MQTT3.1.1 server as
an example. The "three elements" described in the standard can be obtained from Tencent
server as shown in the following figure:

Parameter configuration (upper computer and web page) is described as follows:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Configure the corresponding subscription publishing address, and use the platform online
debugging to send data for communication test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

2. Alibaba Cloud
Support the use of Alibaba Cloud's "three elements" to directly connect to the server and
obtain the "three elements" required to connect to Alibaba Cloud, as shown in the figure:

Configure Topic for communication test:

Select the corresponding product, select "Custom Topic" under the topic class list (see
Alibaba Cloud documentation for details), click "Define Topic Class", configure the name as
1234, and grant publish and subscribe permissions (for data retrieval).
Configure the device connection parameters, as shown in the following figure:
{

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

"ProductKey": "a1GlhuTU1yN",
"DeviceName": "DEV04",
"DeviceSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Alibaba Cloud server address: ProductKey iot-as-mqtt.cn-shanghai.aliyuncs.com:1883
Topic of subscription and publication:/a1GlhuTU1yN/DEV04/user/1234

Alibaba Cloud MQTT platform communication test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

3. Baidu Cloud
Support the use of Baidu Cloud's "three elements" to directly connect to the server and
obtain the "three elements" needed to connect to Baidu Cloud, as shown in the figure:

Configure the device connection parameters, as shown in the following figure:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Subscription and publishing require the establishment of a rule engine to achieve data
retrieval. First, a message template needs to be established, as shown in the following
figure:

Create a rule engine for data retrieval, as shown in the following figure:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Enable the rule engine, restart the device (re-subscribe and publish), and the
communication test is as follows:

4. OneNET
Support the use of OneNET "three elements" to directly connect to the server and obtain the
"three elements" required to connect to OneNET, as shown in the figure:

Configure the device connection parameters, as shown in the following figure:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Server address: 183.230.40.39:6002


Device name: fill in the device ID of OneNET;
User name: fill in the product ID of OneNET;
Password: fill in the device name (MQTTS) and the user-defined key (MQTT for
multi-protocol access);
OneNET supports automatic generation of topics with subscription and publication attributes.
Only the same address of subscription and publication is needed to realize data
transmission. Communication test:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.3. Serial port parameters

Serial port parameters include baud rate, data bit, check bit and stop bit.
Baud rate: serial communication rate, 1200, 2400, 4800, 9600, 14400, 19200, 38400,
57600, 115200, 230400bps can be configured.
Data bit: length of data bit, range 5, 6, 7, 8.
Check bit: the check bit of data communication. It supports five verification methods:
None, Odd, Even, Mark and Space. By setting the serial port parameters, keeping the serial
port parameters consistent with the serial port parameters of the equipment connected to the
serial port, the normal operation of the communication can be guaranteed.
Stop bit: range 1 and 2 can be set.
Flow control: only NS1 and NT1 can be used.

4.4. Advanced parameters

4.4.1.Disconnection and reconnection function

In the client mode, after the device is disconnected from the network, it tries to actively
connect to the server at the specified time. If the request times out and the set number of
reconnections has not been successfully reconnected, the device will restart to prevent the
network from being unable to recover after the device is disconnected.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Disconnection and reconnection time: the time interval between each attempt of the
device to reestablish the network.
Reconnect times: the number of times the device attempts to reestablish the network.
The cumulative number of requests reaches the preset value. If the connection is not
successful, the device will automatically restart.
The actual time to restart is the period of disconnection and reconnection times. It is
recommended to use the factory default parameters if there is no special requirement.

4.4.2.Timeout restart function

The timeout restart function (default: 300 seconds) is supported. This function is mainly
used to ensure the long-term stable operation of the equipment. If data transmission and
reception are not performed within the set timeout restart time, the equipment will restart to
avoid the impact of abnormal conditions on communication.
When the timeout restart function is turned on, the timeout restart time setting
parameter range is (60-65535) seconds.

4.4.3.Short connection function

In the client mode, the network short connection is supported (the function is turned off
by default). TCP short connection is mainly used to save server resource costs, and is
generally used in multi-point (multi-client) to one-point (server) scenarios.
The TCP short connection function is applied in the TCP Client mode. After the short
connection function is enabled, the device will only request to connect with the server when
sending information. After the connection is successful, the serial port does not receive data
or the network port does not receive data within the set time, and the device will
automatically disconnect.
When the short connection function is turned on, the short connection time setting
parameter range is (2-255) seconds.

4.4.4.Connection emptying cache function

The device is in the client mode. When the TCP connection is not established, the data
received by the serial port will be placed in the cache area. The serial port receive cache is
1024 bytes, and the data received earlier will be overwritten by more than 1024 bytes. After

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

the network connection is successful, you can choose to clear the serial port cache or send
the cache through the network through configuration.
Enable: The device does not save the data received by the serial port before the
connection is established.
Disable: After the connection is established, the network will receive the data cached by
the serial port.

4.4.5.Heartbeat packet function

In the client mode, users can choose to send heartbeat packets and customize the
heartbeat packet time. The heartbeat packet can be selected from two modes: network
heartbeat packet and serial heartbeat packet. It supports sending in hexadecimal and ASCII
code. This heartbeat packet is not MQTT heartbeat. It needs to be turned off in MQTT client
mode. MQTT heartbeat only needs to be configured in "MQTT mode". It is recommended
not to configure the heartbeat packet cycle time less than 60s. For example, 120s is
recommended in Alibaba Cloud manual.
Heartbeat packet sending mode:
(1) The default is to turn off heartbeat packet mode.
(2) Serial heartbeat packet ->The device sends heartbeat content to the serial bus
according to the set heartbeat interval.
(3) Network interface heartbeat packet ->The device sends heartbeat content to the
network interface bus according to the set heartbeat time interval.
Custom heartbeat packet content (up to 40 bytes (ASCII) data, 20 bytes (HEX) data).
Customize the heartbeat packet sending interval. If the setting value is greater than zero,
the heartbeat packet function will be turned on. When it is turned on, the range can be set:
(1-65536) seconds, and when it is turned off, it is 0.

4.4.6.Registration package function

In the client mode, users can choose to send the registration package, customize the
time of the registration package, and customize the content of the registration package (up
to 40 bytes (ASCII) data, 20 bytes (HEX) data).
The registration package supports the following modes:
(1) Send MAC address when the network establishes a connection with the device
(2) Send the data of the custom registration package when the network establishes

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

a connection with the device


(3) After the connection between the network and the device is established, each
packet of data sent by the device to the network is preceded by a MAC address
(4) After the connection between the network and the device is established, each
packet of data sent by the device to the network is preceded by the user-defined
registration packet data

4.5. Modbus gateway

4.5.1.Simple protocol conversion mode

On: the Modbus RTU protocol and Modbus TCP protocol are converted to each other,
and non-Modbus data (RTU/TCP) is discarded without conversion.
Off: Modbus data is verified without protocol conversion, and non-Modbus data
(RTU/TCP) is discarded.
Simple protocol conversion can work in any mode (TCP client, TCP server, UDP client,
UDP server, MQTT client, HTTP client). No matter what mode it works in, there can only be
one Modbus master station.

Upper computer/web page configuration:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Modbus Poll and Modbus Slave software debugging:


Software connection settings:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Software register reading and simulation configuration:


Poll menu, select Set up Read/Write Definition

Select Set up Slave Definition from the Slave menu

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Communication demonstration:

4.5.2.Multi-host mode

The multi-host mode can handle up to 6 Modbus TCP hosts. When multiple Modbus

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

hosts access the Modbus gateway at the same time, the bus occupation scheduling will be
carried out (RS-485 bus can only process one request at a time, while the multi-host mode
will sort and process according to the TCP request sequence, and other links will wait), so as
to solve the bus conflict problem (currently only supports 6-host connection), and only
supports working in the TCP server mode, The slave can only be on the serial port,
otherwise it cannot work normally.
It is recommended to configure it as "simple protocol conversion" when there is no
multi-channel host.

Upper computer/web page configuration:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Modbus Poll and Modbus Slave software debugging:


Refer to "Simple Protocol Conversion" for software configuration and register configuration.
Start multiple Modbus Poll software at the same time (for example, 3 channels can be
supported up to 6 channels).

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.5.3.Storage gateway

The storage gateway not only arbitrates the bus data, but also stores the repeated read
instructions. When different hosts request the same data, the gateway does not need to
query the register status of RTU device many times, but directly returns the cached data in
the storage area, which greatly improves the multi-host request processing capability of the
gateway, and also reduces the time consumed by the entire request process. Users can
customize the instruction polling interval and instruction storage time of the storage area
according to their needs.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

As the optimization of multi-host request performance, the storage gateway can only
work in the TCP server mode, which improves the response speed on the network side.
characteristic:
(1) The gateway has a 5K cache for storing instructions and returned results (taking
reading 10 holding registers as an example, 189 instructions and returned results
can be stored);
(2) RTU response timeout automatically clears the cache to ensure the real-time
and authenticity of data;
(3) The polling interval can be customized, 0-65535ms;
(4) The gateway will poll the RTU device according to the instruction storage time
used for configuration. If the MODBUS host does not query the instruction again
during the storage time, the gateway will automatically delete the storage instruction
and release the cache;
(5) The first command and control command (05, 06, 0F, 10 function code) will
directly access RTU equipment;
(6) Only 01, 02, 03 and 04 Modbus function code query results can be stored;
Storage gateway host computer and web page configuration:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.5.4.Configurable gateway

The gateway automatically polls the RTU device register according to the preconfigured
MODBUS instruction (only supports the configuration of MODBUS read instruction), and the
instruction in the non-storage table will directly operate the RTU device. The frequently read
instructions can be stored in the gateway in advance to shorten the response time (query the
configured instructions). Because of the above characteristics, the serial port side of the
configurable gateway can only connect to the Modbus slave station.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Instruction storage description (add, instruction error and format error cannot be added):

Instruction storage description (delete):

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Upper computer/web page configuration:

4.5.5.Automatic upload

In the client mode (TCP client, UDP client, MQTT client, HTTP client), the gateway will
automatically poll the instructions in the storage instruction table and upload them to the
server. The feedback format (Modbus RTU format or Modbus TCP format) and the
instruction polling interval (0-65535ms) can be selected according to the demand.

Refer to "Configurable Gateway - Instruction Storage Description" for instruction


pre-storage, and automatically upload the upper computer/web page configuration:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

TCP client presentation (Modbus RTU format):

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

TCP client presentation (Modbus TCP format):

4.6. Introduction to basic functions

4.6.1.Web page configuration

The device has a built-in web server, which is convenient for users to set and query
parameters through web pages.
Web server port can be customized (2-65535), default: 80
Operation mode (Microsoft Edge version 94.0.992.50 as an example, Google Kernel

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Browser is recommended, IE Kernel Browser is not supported):


 Open the browser and enter the IP address of the device in the address bar. The
default is 192.168.3.7 (the IP address and the computer need to be kept in the
same network segment). Forget that the local IP address can be queried through
the AT command and configuration software;

 Click Login, the default account is admin, and the default password is admin
(entered, you can click Login directly);

 The main interface pops up on the web page, where you can query and set relevant
parameters;
 Click Submit to save the configuration parameters;
 The progress bar prompts the configuration progress. Do not refresh the web page
again after the configuration is completed (refresh the web page and enter the
configuration mode again. You can enter the communication mode by restarting the

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

device or submitting again).

4.6.2.Restore factory settings

Press the Reload pin of the device until the LED indicator lights up.

4.6.3.AT instruction configuration

The query and modification of the relevant parameters of the equipment can be
completed through the AT command configuration. For specific AT instructions, please refer
to "NA11x&NB114&NS1&NT1-AT Instruction Set".

4.6.4.Configuration tool software settings

Open the configuration tool software, search for the device, double-click the identified
device, and the parameter query configuration interface will pop up. Relevant parameters
can be customized and modified as required, and then the configuration can be saved, and
the equipment can be restarted to complete the parameter modification.
[Note]:
Do not use multiple upper computers in the same LAN environment. The industrial
control computer with multiple network cards should be temporarily disabled without using
network cards, otherwise the upper computer will be abnormal (the same device will display
multiple times, and the device cannot be found)
The upper computer shields the wireless network card, so the upper computer must be
connected to the network cable. The wireless network card can be configured through the
web page.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

4.6.5.Random native port

TCP client, UDP client, HTTP client and MQTT client can configure the local port to 0
(use random local port). The server mode cannot use random port, otherwise the client
cannot establish a connection correctly.
Using random port connection can quickly re-establish the connection when the device
accidentally disconnects the server, to prevent the server from refusing the connection due
to four incomplete waves. It is recommended to use random port in client mode.
The device will automatically enable random ports when configuring TCP client, HTTP
client and MQTT client modes.

4.6.6.Remote upgrade

In order to facilitate later maintenance and upgrade functions and replace different
firmware, serial servers (NA11x series, NB114, NS1, NT1, etc.) support online upgrade.
Users can upgrade or replace the current firmware through the upper computer through the
upgrade firmware provided by our company.
Network upgrade firmware operation steps:
Step 1: download the upper computer and "product firmware" at the corresponding
location on the official website;

Step 2: Open the upper computer, click "Menu", and select "Device Upgrade Assistant";

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Step 3: In the pop-up "Device Network Upgrade Assistant" dialog box, click "Search
Device" (the computer and device should be in the same network segment), and click "Stop
Search" after finding the device;

Step 4: Click "Select Firmware", select the corresponding firmware, and then click

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

"Open";

Step 5: Select the equipment to be upgraded, click "Upgrade", the progress bar will start
to change, and wait for the upgrade to complete.

Operating steps for serial port firmware upgrade:


Step 1: download the upper computer and "product firmware" at the corresponding
location on the official website;

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Step 2: Open the upper computer, click "Menu", and select "Serial port upgrade
assistant";

Step 3: First connect the USB port of the computer, select the corresponding port
number in the pop-up "Serial Port Upgrade Assistant" dialog box, and click "Open Serial
Port";

Step 4: Click "Select Firmware", select the corresponding firmware, and then click
"Open";

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Step 5: Click "Start upgrading", the progress bar will start to change, and wait for the
upgrade to complete.
[Note] Power on again to trigger the upgrade.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.


Chengdu Ebyte Electronic Technology Co., Ltd. NB114 User Manual

The final interpretation right belongs to Chengdu Ebyte Electronic Technology Co., Ltd.

Revision History

edition Revision date Revision description Maintainer


1.0 2021-06-28 Initial version LC
Product upgrade and
1.3 2021-10-22
content revision LC
Adapt "9013-2-xx"
1.4 2022-01-06
firmware LC
Match "9013-2-13"
1.6 2022-12-26
firmware LL

About us

Sales 4000-330-990 Company 028-61399028


hotline: Phone:
technical [email protected] Official www.cdebyte.com
support: website:
Company Building B5, No. 199, Xiqu Avenue, West High-tech
address: Zone, Chengdu, Sichuan

Chengdu Ebyte Electronic Technology Co., Ltd.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co., Ltd.

You might also like