User Manual for USR-N668 8-Channel Serial Port Server -8-Channel RS232/RS485/RS422 to Ethernet - Modbus Product Center

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

User Manual for USR-N668 8-Channel Serial Port Server -8-Channel RS232/RS485/RS422 to Ethernet - Modbus Product Center

I. Product Introduction

USR-N668is an industrial grade device that implements transparent data transmission between RJ45 network ports and RS232/RS485/RS422 interfaces. It is an 8-channel serial port server8-way serial port serverlaunched by Jinan Youren Internet Technology Co., Ltd. This device is equipped with an ARM processor, which has the characteristics of low power consumption, fast speed, and high stability.Low power consumption, fast speed, and high stabilityThe characteristics.TCPUsers can easily complete the networking transformation of embedded devices using it, saving development time and labor costs. This series of products has been successfully applied in complex network environments such as banks, highway surveillance, large enterprise networks, video surveillance systems, and fiber to Ethernet conversion.

2, Core functional features

Function Detailed Explanation
2-channel Ethernet ports 10/100Mbps adaptive, supports AUTO-MDIX cross direct connection automatic switching
8-channel serial ports Each serial port supports RS232/RS485/RS422 three modes that can be switched
IP acquisition method DHCP/static IP two methods
working mode TCP Server, TCP Client, UDP Client, UDP Server, Httpd Client, SSL Client, a total of 6 types
dual socket function Each channel supports dual sockets, and can send data to two different servers when acting as a client
TCP Server connection number Maximum support Connect 16 clients simultaneously
Heartbeat Package&Registration Package Customize heartbeat and registration packages to ensure reliable connections and prevent dead connections
Modbus TCP to RTU Support automatic conversion from Modbus TCP protocol to Modbus RTU protocol
Timeout restart/reconnect No data timeout restart and timeout reconnection, time can be customized
MAC address modification MAC address can be modified, factory burned with globally unique MAC address
DNS Domain Name Resolution Support DNS domain name resolution, with customizable DNS server addresses
remote management Support remote monitoring and remote firmware upgrade
DDNS dynamic domain name Support DDNS dynamic domain name resolution function such as peanut shells
time synchronization Support network time synchronization+built-in RTC real-time clock
Planned tasks Users can customize timed execution of device related instructions
configuration method There are three ways to configure web pages, software settings, and AT commands
Virtual Serial Port Supporting USR-VCOM virtual serial port software
VPN-PPTP Support PPTP protocol VPN link
GRE Tunnel Supports GRE Tunnel Protocol
Factory Reset Supports both software and hardware factory reset

III. Technical Parameters

3.1 Electrical Parameters

Classification Parameter Names Values
Hardware Parameters Operating Voltage AC 85~265V, 50/60Hz
Power consumption 1.6W
Network port specifications RJ45, 10/100Mbps, cross direct adaptive
Number of network ports 2 channels
Serial port parameters Serial port specifications RJ45
Number of serial ports 8 channels x RS232/RS485/RS422
Baud rate range 300~115200 bps
default parameter None/8/1
software parameters network protocol IP, TCP/UDP, ARP, ICMP, IPv4, HTTP, SSL
IP acquisition method Static IP/DHCP
domain name resolution Support, customizable DNS server address
Passthrough method TCP Server/TCP Client/UDP Server/UDP Client/Httpd Client/SSL Client
web cache 10KB, Serial port cache 10KB

3.2 Other parameters

Parameters Values
Shell protection level IP30
Dimensions 482 × 185 × 45 mm (rack mounted)
Operating temperature -40 ℃~+85 ℃
Storage temperature -40 ℃~+105 ℃
Operating Humidity 5%~95% RH (no condensation)
Static electricity level (EN61000-4-2) Level 4
Pulse group level (EN61000-4-4) Level 4
Surge level (EN61000-4-5) Level 3
Average transmission delay ≥50ms
Packaging mechanism 50ms packaging time, 1472 byte packaging length

IV. Hardware Introduction

4.1 DIP Switch (Serial Mode Switching)

There is a DIP switch setting window on the back of the device, which can only be seen by removing the screw with a Phillips screwdriver. There are a total of 16 dialing codes (8 serial ports x 2/channel). Once set, it will be permanently used.

Serial Port Mode Corresponding Dialing Settings

Communication Method Dialing 1 (from left to right) Dialing 2 (from left to right)
RS232 0 (bottom) 0 (bottom)
RS485 1 (top) 1 (top)
RS422 1 (top) 0 (bottom)
Note: silk screen printing is the standard, dial up to represent 1, dial down to represent 0; Factory default is RS485 mode (11)

4.2 Serial port pin definition (RJ45 interface)

Serial number Name Function description
1 232_TX/422_Z/485-B1 232 send; 422 signal Z; 485 signal B
2 232_SX/422_SA1 232 reception; 422 signal A
3 422_Y/485A_1 422 signal Y; 485 signal A
4 422-B1 422 signal B
5 NC empty pin
6 GND 232 signal ground
7 NC empty pin
8 NC empty pin
Note: RS232/RS485/RS422 can only work in one way at a time; Correct dial switch coordination is required; Using 8-core Ethernet cable and crystal head to make communication cable

4.3 Indicator light description

Indicator light name Identification Color Status Description
Power Indicator PWR Red Always On After Power On
Work Indicator WORK Green Cycle Flashing After Startup (500ms On/500ms Off)
Status Indicator STATE Red Function Undefined (Reserved)
Ready indicator READY Green The device is working normally and always on; Unworking Long Off
Serial Port Send x 8 TXN Red Serial Port N Send Indicator, Blinking When Data is Available
Serial Port Receive x 8 RXN Green Serial Port N Receive Indicator, Blinking When Data is Available

V. Default Parameters

Project Default Values
Username admin
Password admin
IP Address 192.168.0.7
Subnet Mask 255.255.255.0
Default Gateway 192.168.0.1
Working Mode TCP Server
Target Port 20001~20008 (1st~8th Road)
Local Port 20001~20008 (1st~8th Road)
Target IP 192.168.0.201
Serial Port Baud Rate 115200
Serial port parameters None/8/1

VI. Detailed explanation of working modes

6.1 TCP client working mode

  • Actively initiate connection: As a client, actively initiate a connection request to the server and establish a connection
  • KeepAlive keep alive: Send a probe packet after waiting for 60 seconds for the first time to detect abnormal disconnection (formula: 60+5 * 3=75 second detection cycle)
  • Applicable scenarios: Data interaction between devices and servers, the most commonly used networking communication method
  • Local port recommendation: Set to 0, use a random port number to avoid being blocked
  • Cross public network requirements: The server must have a public IP or domain name

6.2 TCP Server working mode

  • Passive listening: Actively listening to the set local port and responding to connection requests
  • Maximum number of connections: Can accept up to 16 simultaneous connections from clients (local port cannot be set to 0)
  • Broadcasting mechanism: The serial port receives data and sends it to all connected clients at the same time
  • Applicable scenarios: Multiple computers/phones accessing devices simultaneously in the local area network
  • Cross public networkPort mapping needs to be done on the router

6.3 UDP Client Working Mode

  • Connectionless transmissionNo need to establish a connection, just specify the IP and port to send data
  • Directional communicationOnly communicate with the target port of the target IP
  • Broadcast supportTarget: 255.255.255.255 to achieve full network segment broadcasting (firmware 4015+supports xxx.xxx.xxx.255 network segment broadcasting)
  • Not supporting multicast

6.4 UDP Server Working Mode

  • Do not verify the source IPAfter receiving UDP data, change the destination to the source IP/port
  • Recent communicationSend data to the nearest communication IP and port
  • Applicable scenariosScenario where multiple network devices communicate at high speed and do not want to use TCP

6.5 Httpd Client Working Mode

  • Serial port to HTTP conversionSend request data to a specified HTTP server via serial port
  • Automatically add header informationURL and header information are automatically added by 668
  • Return data processingYou can choose whether to remove the header and send it to the serial port

6.6 SSL Client Working Mode

  • Encrypted transmissionSupport SSL encryption on TCP connections
  • Optional encryption methodNo need to manually select encryption parameters

7, Detailed Explanation of Featured Features

7.1 SocketB dual channel function

In addition to the main Socket transparent transmission, there is also a Socket B function. The data received by the serial port is sent to both SocketA and SocketB simultaneously, and vice versa. Can be used for data backup links, with the same working mechanism as SocketA.

7.2 Heartbeat Packet Function

Parameters Description
Heartbeat Direction Can be sent to the network or serial port (not running simultaneously)
Custom Content Maximum 40 bytes
Default Interval 30 seconds (range 1-65535 seconds)
Effective Mode TCP Client and UDP Client Modes

7.3 Registration Packet Function

Type Description
Connection Registration Packet Sent immediately after connection establishment, used to identify device source or authorize verification
Data Carrying Registration Packet Access registration packets at the forefront of data for protocol transmission
Full registration Both of the above are executed
MAC registration package Send a 6-byte MAC address when establishing a connection
Custom registration package can be up to 40 bytes long and supports hexadecimal input

7.4 Modbus TCP to Modbus RTU

Suitable for data conversion scenarios where the serial port side uses Modbus RTU protocol and the network side uses Modbus TCP protocol. Default closed, can be opened through a webpage. Good performance in high-frequency data collection.

7.5 VPN-PTP and GRE Tunnel

  • PPTPSupport MPPE/MPPE-128 encryption; PAP/CHAP/MSCHAP/MSHAPv2 authentication; The default LCP interval is 300 seconds; MTU defaults to 1500
  • GRE: Set four parameters: remote address, local address, remote tunnel address, and local tunnel address

8. AT instruction configuration

8.1 Enter AT Command Mode

  1. Input on UART“+++The module returns a confirmation codea"
  2. Enter the confirmation code on UART“aThe module returns+OKEnter command mode
Note: Input "+++" and "a" does not echo; T1 needs to be greater than the serial port packaging interval; T2/T3 less than 300ms; T5 less than 3 seconds

8.2 Common AT Instructions

Instruction Functional Description
AT+WANN Set and query IP acquisition method, IP/subnet mask/gateway parameters
AT+DNS Set and query DNS server addresses
AT+SOCK Set Socket working mode/target IP/target port
AT+RELD Restore factory settings
AT+ENTM Exit command mode and return to transparent transmission mode

8.3 Error Code List

error code Explanation
-1 Invalid command format
-2 Invalid command
-3 Invalid operator
-4 Invalid parameters
-5 Operation not permitted

9, Method for restoring factory settings

  1. Hardware buttonsPress the Reload button for 5 to 15 seconds to restore the factory (not executed for less than 5 seconds or more than 15 seconds)
  2. set up softwareBy configuring the software's factory reset function
  3. AT commandsEnter AT command mode, inputAT+RELD
  4. Web loginClick on the factory reset button on the webpage

10, Quick Start Guide

10.1 Hardware Preparation Checklist

  1. USR-N668 equipment x 1
  2. AC220V power cord x 1
  3. Mother to mother serial port cable x 1
  4. DB9-M to RJ45 × 1
  5. Network cable x 2
  6. One computer (with built-in RS232 port or USB to 232 converter)

10.2 Connection steps

  1. Connect the N668 serial port to the computer through a serial cable
  2. Connect the 668 Ethernet port to the PC Ethernet port using a network cable
  3. After confirming the hardware connection is correct, connect the power adapter for power supply
  4. Confirm the current serial port mode (factory default RS485) through the back dial window

10.3 Network environment check

  1. Turn off the computer firewall and antivirus software
  2. Turn off unrelated network cards and only keep one local connection
  3. If directly connected to a PC, set the static IP and 668 in the same network segment (such as 192.168.0.201)

10.4 Default testing process

  1. Open the "USR-TCP232 Test. exe" debugging assistant
  2. Select TCP Client mode in the network area, target IP: 192.168.0.7, port: 20001
  3. Set the serial port to 115200, None/8/1, open the serial port
  4. Conduct transparent transmission test for bidirectional data transmission and reception between serial port and network

11, Data Download

Product Model:USR-N668 V1.0.5Instruction manual document:USR-N668_V1.0.5.pdfOfficial website:www.usr.cn(Jinan Youren Internet of Things Technology Co., Ltd.)http://h.usr.cnTechnical Hotline: 4000-255-652/0531-88826739sales@usr.cn

12, Application scenarios

  • Bank system network terminal access
  • Networking of ETC/Toll System Serial Devices on Highways
  • PLC/Instrument/Sensor Networking in Large Enterprise Networks
  • Networking of serial control devices for video surveillance systems
  • Complex network environment of fiber to Ethernet conversion
  • Remote monitoring of serial port equipment in factory automation production line
  • Intelligent building/access control/attendance system networking
  • Medical equipment serial port data collection and upload
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.