Iot Workshop: HF5111B Serial Server Device User Manual
Iot Workshop: HF5111B Serial Server Device User Manual
Iot Workshop: HF5111B Serial Server Device User Manual
HF5111B
P
O
Overview of Characteristic SH
RK
Cortex-M3 MCU with 2MB Flash and 128KB SRAM
Support Serial To 10/100M Ethernet Conversion, Serial Speed Upto 921600 bps
Size: 94 x 65 x 25 mm (L x W x H)
FCC/CE/RoHS Certificated
http://www.iotworkshop.com -1-
HF5111B Serial Server Device User Manual
HISTORY...........................................................................................................................................7
P
1.3. Device Paremeters ...........................................................................................................9
1.4. Key Application ..............................................................................................................10
O
2. HARDWARE INTRODUCTION .........................................................................................11
2.1. Pins Definition ................................................................................................................12
2.2. RS232 Interface ..............................................................................................................13
SH
2.3. RS485 Interface ..............................................................................................................14
2.4. RS422 Interface ..............................................................................................................14
2.5. RJ45 Interface ................................................................................................................14
2.6. Mechanical Size .............................................................................................................15
RK
2.7. Rail Mounting .................................................................................................................15
2.8. Order Information ..........................................................................................................16
2.9. Device Difference ...........................................................................................................16
2.10. Package Information ......................................................................................................16
O
http://www.iotworkshop.com -2-
HF5111B Serial Server Device User Manual
P
4.2. Cli Command Overview .................................................................................................36
4.2.1. Cli Command Format ...................................................................................................... 39
O
4.2.1.1. Show Command ........................................................................................................... 39
4.2.1.2. SYS Directory ............................................................................................................... 40
4.2.1.3. SYS/Auth Directory ...................................................................................................... 40
SH
4.2.1.4. SYS/Auth/User Command ............................................................................................ 40
4.2.1.5. SYS/Auth/Password Command ................................................................................... 41
4.2.1.6. SYS/Network Directory ................................................................................................. 41
4.2.1.7. SYS/Network/Show Command .................................................................................... 41
RK
4.2.1.8. SYS/Network/DHCP Command ................................................................................... 41
4.2.1.9. SYS/Network/DNS Command ...................................................................................... 41
4.2.1.10. SYS/Network/Hostname Instruction ........................................................................... 42
4.2.1.11. SYS/Telnet Instruction ................................................................................................ 42
4.2.1.12. SYS/Web Instruction .................................................................................................. 42
O
http://www.iotworkshop.com -3-
HF5111B Serial Server Device User Manual
P
4.2.1.43. Reload Instruction....................................................................................................... 52
4.2.1.44. Exit Command ............................................................................................................ 52
4.2.1.45. Quit Command ........................................................................................................... 52
O
4.2.1.46. FwUpgrade Instruction ............................................................................................... 52
SH
A.1.Test Tools ..........................................................................................................................53
B.3.Quick Start Manual ...........................................................................................................53
http://www.iotworkshop.com -4-
HF5111B Serial Server Device User Manual
LIST OF FIGURES
Figure 1. HF5111B Appearance .................................................................................................................. 11
Figure 2. HF5111B Interface......................................................................................................................... 12
Figure 3. HF5111B Side View ....................................................................................................................... 12
Figure 4. RS232 Pin Defination(Male/Needle Type) .................................................................................... 13
Figure 5. HF5111B RS422 Connectioin ........................................................................................................ 14
Figure 6. RJ45 Pin Defination ...................................................................................................................... 14
Figure 7. HF5111B Mechanical Dimension ................................................................................................... 15
Figure 8. HF5111B Rail ................................................................................................................................ 16
Figure 9. HF5111B Product Order Information ............................................................................................. 16
P
Figure 10. HF5111 Software Protocol Structure ............................................................................................. 18
Figure 11. Ethernet Interface Function............................................................................................................ 18
Figure 12. Network application ....................................................................................................................... 19
O
Figure 13. Transparent data transmission example ........................................................................................ 20
Figure 14. TCP Server data transmission example ........................................................................................ 21
SH
Figure 15. Multi Socket data transmission example ........................................................................................ 21
Figure 16. Webpage set up multi Socket channel ........................................................................................... 21
Figure 17. IOTManager Software Configure ................................................................................................... 22
Figure 18. Web Page Configure ..................................................................................................................... 22
Figure 19. HTTP transmit example ................................................................................................................. 23
RK
Figure 20. IOTManager Software Configure Protocol ..................................................................................... 24
Figure 21. Web page configure protocol ......................................................................................................... 24
Figure 22. Telnet details example ................................................................................................................... 25
Figure 23. IOTManager Software Configure Encryption ................................................................................. 25
O
http://www.iotworkshop.com -5-
HF5111B Serial Server Device User Manual
P
O
SH
RK
O
W
T
IO
http://www.iotworkshop.com -6-
HF5111B Serial Server Device User Manual
LIST OF TABLES
HISTORY
P
Ed. V1.0 11-08-2016 First Version
O
Ed. V1.1 02-10-2017 Add Auto-IP, heartbeat, ntp and UART fast config function(Firmware
version:1.07c)
SH
RK
O
W
T
IO
http://www.iotworkshop.com -7-
HF5111B Serial Server Device User Manual
1. PRODUCT OVERVIEW
P
device.
The HF5111B using highly integrated hardware and software platform,It has been optimized for all
O
kinds of applications in the industrial control, smart grid , personal medical application and remote
control that have lower data rates, and transmit or receive data on an infrequent basis.
SH
The HF5111B integrates all serial to Ethernet functionality with 94 x 65 x 25mm size..
Support Serial to 10/100M Ethernet Conversion, Serial Speed Upto 460800 bps
Support 10/100M Ethernet Auto-Negotiation
W
Size: 94 x 65 x 25mm (L x W x H)
FCC/CE/RoHS Certificated
IO
http://www.iotworkshop.com -8-
HF5111B Serial Server Device User Manual
Item Parameters
System Information
Processor/Frequency Cortex-M3/96MHz
Flash/SDRAM 2MB/128KB
Operating System FreeRTOS
Ethernet Port
P
Port Number 1 RJ45
Interface Standard 10/100 Base-T Auto-Negotiation
O
Protection 8KV Isolation
Transformer Integrated
IP,TCP,UDP,DHCP,DNS,HTTP Server/Client,ARP,
SH
Network Protocol BOOTP, AutoIP, ICMP,Web socket, Telnet, FTP,TFTP,
uPNP, NTP, SNMP,Modbus TCP
TLS v3
Security Protocol AES 128Bit
DES3
IPV6 Support Not yet
RK
Serial Port
Port Number 1 RS232/RS485/RS422
RS232: DB9
Interface Standard
RS485/RS422: 5.08mm connector
O
Data Bits 8
Stop Bit 1,2
Check Bit None,Even,Odd,Space,Mark
W
Web Pages
Customization of HTTP Web Pages
Web
IO
CLI
Configuration XML import
Telnet
IOTManager PC Software
Firmware Upgrade Web
SDK For Dev. Not yet
Basic Parameter
Size 94 x 65 x 25 mm
Operating Temp. -45 ~ 85°C
Storage Temp. -45 ~ 105°C, 5 ~ 95% RH(no condensation)
Input Voltage 5~36VDC or 9~50VDC
Working Current ~100mA
http://www.iotworkshop.com -9-
HF5111B Serial Server Device User Manual
Power <400mW
Other Information
Certificate CE, FCC, RoHS
The HF5111B device connects serial device to Ethernet networks using the TCP/IP protocol:
Remote equipment monitoring
Asset tracking and telemetry
Security Application
P
Industrial sensors and controls
Medical devices
O
ATM machines
Data collection devices
Universal Power Supply (UPS) management units
SH
Telecommunications equipment
Data display devices
Handheld instruments
Modems
Time/attendance clocks and terminals
RK
O
W
T
IO
http://www.iotworkshop.com - 10 -
HF5111B Serial Server Device User Manual
2. HARDWARE INTRODUCTION
The HF5111B unit is a complete solution for serial port device connecting to network. This powerful
device supports a 10/100BASE-T Ethernet connection, a reliable and proven operating system stored
in flash memory, an embedded web server, a full TCP/IP protocol stack,and standards-based (AES)
encryption.
Through Ethernet cable connect router with HF5111B serial server for data transfer, which makes the
P
data transformation very simple. HF5111B meet EMC Class B security level,It can pass every
countries relevant certification test
O
SH
RK
Figure 1. HF5111B Appearance
O
W
T
IO
http://www.iotworkshop.com - 11 -
HF5111B Serial Server Device User Manual
P
O
SH
RK
O
W
T
http://www.iotworkshop.com - 12 -
HF5111B Serial Server Device User Manual
P
Off:Power is NG
Connection Indicator
O
Link On: Ethernet connection is OK
Off: No Ethernet connection
SH
Data transfer Indicator
Active On:Data is transfering.
Off:No data transfer
Button Reset Reset device
RK
Switch Device parameter protect
On: Enable protect, working parameter can not
Protect
be modified.
Off: Disable protect.
O
Device serial port is male(needle), RS232 voltage level(can connect to PC directly), Pin Order is
cosistent with PC COM port. Use cross Cable connected with PC(2-3 cross, 7-8 cross, 5-5 direct, 7-8
no connection), see the following table for pin defination.
T
IO
http://www.iotworkshop.com - 13 -
HF5111B Serial Server Device User Manual
RS485 use two wire links, A(DATA+), B(DATA-). Connect A(+) to A(+), B(-) to B(-) for communication.
The RS485 interface support maximum 32 485 device, special hardware version can support max 255
device. The cable maximum length is 1200 meters. Need to add 120Ohm terminal resistor for over
P
300 meters.
O
2.4. RS422 Interface
SH
RS422 interface use T+/T-/R+/R-, cross connect to device as the following picture.
Name Description
TX+ Transfer Data+
TX- Transfer Data-
RK
RX+ Receive Data+
RX- Receive Data-
O
W
Ethernet port is 10M/100M adaptive, support AUTO MDI/MDIX which means it support direct
connecting to PC with Ethernet cable.
http://www.iotworkshop.com - 14 -
HF5111B Serial Server Device User Manual
P
8 N.C. None Connect
O
2.6. Mechanical Size
SH
RK
O
W
T
IO
http://www.iotworkshop.com - 15 -
HF5111B Serial Server Device User Manual
P
2.8. Order Information
O
Base on customer detailed requirement, HF5111B provide different configuration version, Details as
below:
SH
RK
O
W
1 * HF5111B
http://www.iotworkshop.com - 16 -
HF5111B Serial Server Device User Manual
1 * 12V/1A DC adapter
1 * RS232 cable
1 * Ethernet cable
P
O
SH
RK
O
W
T
IO
http://www.iotworkshop.com - 17 -
HF5111B Serial Server Device User Manual
3. FUNCTIONAL DESCRIPTION
The HF5111 has the following feature:
Connect customer’s device with PC or server via TCP/UDP/Telnet.
Contain a HTTP web server allow user to configure through browser with PC or phone.
Have multi-programmable I/O pins used to monitor or control device directly.
P
The HF5111 device uses the IP address for network communications. If uses the TCP to assure that
O
no data is lost or duplicated. If use UDP to assure that data can be fast and effective to DES3tination
address.
SH
Supported protocols include:
ARP, UDP, TCP, ICMP, DHCP, Telnet, DHCP, HTTP Server/Client Web socket
Telnet command configuration, Web server configuration
Security Protocol: TLS, AES, DES3 encryption
HF5111B
RK
Protocols Security Configuration
Web
DHCP DNS/DDNS SSL/TLS
CLI
Application IGMP TCP/IP AES
Telnet
Programming WebSocket HTTP DES
O
Log
Interface
TCP/UDP
IP/ICMP
W
Ethernet
FreeRTOS OS Drivers
Cortex-M3 MCU
http://www.iotworkshop.com - 18 -
HF5111B Serial Server Device User Manual
The HF5111 device Ethernet interface work in WANN functioin by default. When connect to router, it
will get IP address from router(as picture 192.168.1.100). Then the device and the PC1 are in the
same local area network(LAN) for network communication, The data of communication finally pass
from UART to network to control or collect PLC device.
Notes:
The device support RS232/RS422/RS485 interface. Choose one of these three data interface .
P
As the following picture, HF5111 and mobile device all connect to the same Router AP. At the same
time, HF5111 connect to user equipment by RS232/RS422/RS485 interface. The whole wireless
O
network is easily to extend in this kind of network structure.
SH
RK
O
W
T
IO
The HF5111 Device support transparent transmission mode of serial interface, In this mode, User
only need to set some necessary parameter(network communication parameter). After power on, the
http://www.iotworkshop.com - 19 -
HF5111B Serial Server Device User Manual
device can auto connect to default socket setting(TCP/UDP). Use web page or PC IOTManager
software to set commucation parameter.
P
O
SH
Figure 13. Transparent data transmission example
RK
3.5.2. TCP Server
communication application, UDP Server is special function, Details see following Cli instruction. There
is a default tcp server socket created. The Socket can be modified to work at one of the above working
mode. When Socket works as TCP server, It will support multiple TCP connection(max 5 TCP client).
W
Upload data flow: All the different TCP connection or the Client’s data will be continuously transmitter
to UART.
T
Download data flow: All data received from UART will be copied and broadcast to every TCP client.
IO
http://www.iotworkshop.com - 20 -
HF5111B Serial Server Device User Manual
P
Figure 15. Multi Socket data transmission example
Multi Socket can be created through software configure or webpage configure. The below set up 3
socket channel.
O
SH
RK
O
W
data will automaticly transform to HTTP format(add HTTP header) and transmit to HTTP server. For
the received HTTP data from HTTP server, will automatically remove HTTP header and only output
IO
http://www.iotworkshop.com - 21 -
HF5111B Serial Server Device User Manual
P
O
SH
RK
Figure 17. IOTManager Software Configure
O
W
T
IO
pppp
http://www.iotworkshop.com - 22 -
HF5111B Serial Server Device User Manual
abcde
P
O
SH
RK
Figure 19. HTTP transmit example
When device work in Telnetd mode, UART port can connect to user device console port(some
gateway and switch device may have this console port to set parameters of its working mode). May
W
http://www.iotworkshop.com - 23 -
HF5111B Serial Server Device User Manual
P
O
SH
Figure 20. IOTManager Software Configure Protocol
RK
O
Connect device UART to user device console port(The example use NC916) and create Telnet
W
http://www.iotworkshop.com - 24 -
HF5111B Serial Server Device User Manual
To improve device security and ensure the data won’t be cracked and illegal used, The HF5111
device can do encryption to UART data before transmit to network.
P
O
SH
RK
O
3.6. Keepalive
When TCP connection between device and server became abnormal. The device will check the
obnormal status and reconnect to server ( when the device working in TCP Client Mode), When the
device working in TCP Server, It will break the TCP client and wait for next connection.
http://www.iotworkshop.com - 25 -
HF5111B Serial Server Device User Manual
P
O
Figure 25. Web Page Config Keepalive
SH
3.7. Timeout
The device will break the TCP connection after some time(default is 300 seconds and it can be
modified)if there is no data packet received from DES3tination TCP target . It will reconnect to
server(When device works in TCP Client mode). When device working in TCP Server, It will
RK
disconnect with TCP Clien. This mechanism can effectively restore TCP abnormal connection.If set it
to “0”, this function will be close.
O
W
T
The data received from Socket channel can be set to another socket channel. (Default: socket
DES3tination channel is UART, It also can be other Socket channel, Or take the Socket as log print
usage)
The below example shows the default netp Socket channel route setting to Socket1, Socket1
configure as TCP Server mode and route setting to UART. So the netp Socket channel received
UART data will output to Socket1, and Socket1 channel will output to serial output.
http://www.iotworkshop.com - 26 -
HF5111B Serial Server Device User Manual
P
O
SH
Figure 27. Route function setup example
RK
O
W
HF5111 support UART Free-Frame function, If user select to open this function,Module will check the
intervals between any two bytes when receiving UART data, If the interval time exceed the setting
value, It will think it as the end of one frame, Or it will receive data utill greater than internal buffer
bytes( Default: 512, the largest 1400 bytes), then transfer to Socket Channel.
Module default UART Free-Frame interval time is 50ms, it will packaged into another frame if received
UART data interval time is greater than 50ms. User also can set this interval time to minimum 10ms
through Cli command and webpage.
If interval time is set to 10ms and customer MCU cann’t send next byte within 10ms, The serial data
will be break into two frame.
http://www.iotworkshop.com - 27 -
HF5111B Serial Server Device User Manual
HF5111 support UART Auto-Frame function, If user select to open this function,setting frame tigger
length and auto frame trigger time parameters, Then the product will auto framing the data which
P
received from UART port and transmitting to the network as pre-defined data structure.
O
Auto-Frame trigger length: The fixed data length that product used to transmitting to the network.
Auto-Frame trigger time: After the trigger time, If UART port received data cann’t reach auto-frame
SH
trigger length, Then product will transmitting available data to network and bypass the auto-frame
trigger length condition.
Eport E10 support lable function, If user select to open this function, The UART port will send all
suitable one frame data to network.
http://www.iotworkshop.com - 28 -
HF5111B Serial Server Device User Manual
P
Figure 32. UART Auto-Frame Tag Function
O
3.10. Modbus Protocol
HF5111 support ModbusRTU to ModbusTCP and ModbusTCP to ModbusRTU. It’s very convenient to
SH
connect with Modbus device. Modbus protocol setting as below:
RK
Figure 33. UART Modbus Function
O
Cli command is used for setting module configure parameters. Detailed command function and setting
is in next chapter, Cli command can be set through UART port or Telnet function (Appendix C), The
waiting time of below picture means use timeout time. If it exceed default 300s when no Cli command
is input, it will exit Cli command mode. When the HF5111 receive continuous UART data of “+++”, it
T
will enter into Cli command. ( The device working in transparent transmission mode by default) May
also set the device working in Cli command mode by default or disable this function .
IO
http://www.iotworkshop.com - 29 -
HF5111B Serial Server Device User Manual
HF5111 support software and hardware UART flow control. If use hardware follow control, must use
RS232 interface. If use software follow control, then It allowed the device output UART data after
receive single UART 0x11 data(Default: value can be modified). It will stop output UART data after
receive single UART 0x13 data(Default: value can be modified).
P
O
SH
Figure 35. UART Flow Control
If set to “Half Duplex”, the product enable RS485 interface, it is by default enabled.
RK
Figure 36. UART Half Duplex Function
O
HF5111 support OTA(over the air) firmware upgrade. User can use webpage to upgrade its firmware,
whether external or internal webpage(192.168.0.101/hide. Internal webpage can be used for upgrade
external webpage). Please check below example. IP address is assigned by router.
T
IO
http://www.iotworkshop.com - 30 -
HF5111B Serial Server Device User Manual
P
Figure 38. Internal web page
O
3.14. Web Page Function
SH
Web page function can be enabled or disabled.
RK
Figure 39. Web Page Function Setting
O
Connect device Ethernet with PC, the device will use default auto IP. The PC may use this IP to
config the device or transfer data(PC will need about 15 seconds to use default 169.254.xxx.xxx IP,
then this communication can be created). As the following example, 169.254.173.207(If occure IP
conflict, it will use other ip instead)
T
IO
http://www.iotworkshop.com - 31 -
HF5111B Serial Server Device User Manual
P
Figure 41. AUTO-IP Config Device
O
SH
RK
Figure 42. Cli Command Query Device IP
The HF5111 device parameters can be exported and loaded into other equipment..
W
T
IO
http://www.iotworkshop.com - 32 -
HF5111B Serial Server Device User Manual
Support NTP function(default is disabled). Support set NTP server, port, time zone information, more
detailed usage see application document of “UART Fast Config”.(112.124.43.15 is High-Flying test
NTP server)
P
O
SH
Figure 44. IOTManager Tools NTP Setting
RK
O
W
Support heartbeat function, can set the heartbeat time and content(heartbeat time is the same as
keepalive setting), if the product does not receive data from TCP server within heartbeat time, it will
IO
send heartbeat to server. The heartbeat function can only be enabled when socket is set as TCP client.
http://www.iotworkshop.com - 33 -
HF5111B Serial Server Device User Manual
Product support Cli command to config its parameters, but also support special HEX format UART
data for fast config, see application manual for detailed usage.
P
O
SH
RK
O
W
T
IO
http://www.iotworkshop.com - 34 -
HF5111B Serial Server Device User Manual
The device will enter into default transparent transmission mode after powered on. User can switch to
Cli command mode through special UART data. Module default UART parameters are as below:
P
O
SH
RK
O
In Command mode, User can use UART port to set module through Cli command.
Notes:
T
Steps:
Input “+++” via UART tools, the device will output “EPORT>” after received“+++”. Then the
device already enters into Cli command mode.
Notes:
”+++” should be in one frame. Other data is not allowed before or after “+++”
http://www.iotworkshop.com - 35 -
HF5111B Serial Server Device User Manual
P
O
<Notes>: SH
Figure 48. Switch Transparent Transmission Mode to Cli Command Mode
RK
In Cli command mode, users can set or query parameters. Cli command details see next chapter
Cli command can be input through terminal (SecureCRT or other UART tools) or by user device MCU
programming. As below picture, we use SecureCRT tool. Press “Tab” key, it will list current available
Cli command or directory. If intput first character and then press “Tab” key, it will show the Cli
W
http://www.iotworkshop.com - 36 -
HF5111B Serial Server Device User Manual
P
O
SH
RK
Figure 50. Cli Command SYS Tree
O
W
T
IO
http://www.iotworkshop.com - 37 -
HF5111B Serial Server Device User Manual
P
O
SH
RK
O
W
T
IO
http://www.iotworkshop.com - 38 -
HF5111B Serial Server Device User Manual
P
Cli command is in ASCII format. The usage is similar to Linux terminal. Command format as following:
Format Notes
O
< >: Cli command name or directory.
[ ]: Cli command parameters.
SH
Command Message
<CMD> [para-2 para-3 para-4…]<CR>
<CMD>: Main directory or command name;
[para-n] : command parameters. If have multiple directory, it can also can be the son
directory. As below example;
RK
<CR>: Command Terminator, “Enter” key, HEX data: 0x0a or 0x0d
<Notes>
If the input command not existed, UART will output again “EPORT>” to allow next command input.
O
If need enter into son directory, press “space” key between the directorys.
T
If need to display all the directory or commands in the current directory, press “Tab” key to query.
IO
http://www.iotworkshop.com - 39 -
HF5111B Serial Server Device User Manual
Show [SYS/UART/SOCK]
Parameter:
Show all information if no parameters. Parameter can be one of the following:
SYS: System running status
UART: UART status
SOCK: Socket status
P
O
4.2.1.2. SYS Directory
SH
Function: Display/Set all system related information
RK
Format:
Tab Query
O
detail)
Format:
Tab Query
T
Function: Display/Set web or Telnet Cli command login user name. (function see
appendix)
Format:
Query
<User>
Set
<User> [value]
Parameter:
Setting is valid immediately.
User: Login user name. Default: admin
http://www.iotworkshop.com - 40 -
HF5111B Serial Server Device User Manual
P
Setting is valid immediately
Password: Login password. Default: admin
value: set value. Length range 1~29 characters
O
4.2.1.6. SYS/Network Directory
SH
Function: Display/Set related network information.
Format:
Tab Query
RK
4.2.1.7. SYS/Network/Show Command
Function: Display network related information
Format:
O
Query
<Show>
Set
<DHCP> [Enable/Disable]
IO
Parameter:
Setting is valid after reboot.
Enable: Enable DHCP function. The device will get DHCP IP from router when
Ethernet port is connected to router LANN port. Default: Enable.
Disable: Disable DHCP function. Allocate device static IP address according to the
hit of intputting IP and gateway address.
http://www.iotworkshop.com - 41 -
HF5111B Serial Server Device User Manual
<DNS>
Set
<DNS> [IP]
Parameter:
When DHCP function is Disabled, this setting is valid. Setting is valid after reboot.
IP Address: DNS server address. Default: 10.10.100.254.
P
Query
<Hostname>
Set
O
<Hostname> [name]
Parameter:
SH
Hostname is the name which show in router DHCP client list. Setting is valid
immediately.
Name Address: Hostname, length range: 1~30 characters. Default: HF5111.
Set
<Telnet> [Enable/Disable]
Parameter:
W
See appendix for detailed Telnet function usage. Telnet is used for remote send Cli
command or transmit data, Setting is valid after reboot.
Enable: Enable Telnet function. Default: Enable.
Input Port Numbver: Telnet Port Number. Default: 23
Input Echo Mode: Enable/Disable Cli command echo function. Default: Enable
T
http://www.iotworkshop.com - 42 -
HF5111B Serial Server Device User Manual
P
Parameter:
Global unique MAC Address. It is not allowed to modify it.
value: MAC address value.
O
4.2.1.14. SYS/JCMD Instruction
SH
Function: Display/Set Jason command function.
Format:
Query
<JCMD>
Set
RK
<JCMD> [Enable/Disable]
Parameter:
Jason command is used for config module. IOTManage software use this mechanism. If
disable JCMD function, IOTManage is no longer valid. Setting is valid after reboot.
O
Set
<NTP> [Enable/Disable]
IO
Parameter:
NTP is used for product to get and output real time. See uart fast config application
manual to fast query. Setting is valid immediately.
Enable: Enable NTP Function.
NTP Server Address: NTP Server address, domain name or IP address
NTP Server Port: port number, Default:123, Range;0~127
GMT: Time zone, default is 0, Range:-12~12.
Disable Disable NTP Function, Default value.
http://www.iotworkshop.com - 43 -
HF5111B Serial Server Device User Manual
Format:
Tab key query
P
<Show>
O
Function: Display/Set UART baud rate function.
Format:
SH
Query
<Baudrate>
Set
<Baudrate> [value]
Parameter:
RK
Setting is valid immediately.
Value: Default: 115200. Can choose 2400, 4800, 9600, 38400, 57600, 115200,
230400, 460800
Query
<Databits>
Set
<Databits> [value]
Parameter:
T
http://www.iotworkshop.com - 44 -
HF5111B Serial Server Device User Manual
P
4.2.1.22. UART/Buf Directory
O
Function: Display/Set UART Buffer directory.
Format:
Tab key query
<Bufsize> [value]
Parameter:
Buffer is used for cache UART received data. If the received data of one frame is larger
W
than buffer size. The data frame will be break into two packet send to network. Setting is
valid after reboot.
Value: Default: 512. Length range: 32~1400 bytes.
Query
<GapTime>
Set
<GapTime> [value]
Parameter:
GapTime is used for setting UART free frame time gap. If the received data gap time is
more than setting value, the data packet will be breaked into two frame.
Value: Default: 50ms. Length Range: 10~1000ms.
http://www.iotworkshop.com - 45 -
HF5111B Serial Server Device User Manual
P
flow control pin(CTS/RTS) will be useless. Software flow control use special UART data
for control. Hardware flow control use CTS/RTS pin control. Setting is valid immediately.
O
Flow Control: Flow control function.
Half-Duplex: Enable RS485 half-duplex function, UART0_RTS is used for RS485
chip control function.
SH
Disable: Flow control function. Default: Disable.
Parameter:
Enable software flow control function. The device UART can output data After UART
received Xon single-byte enable data. When UART received Xoff single-byte disable
W
http://www.iotworkshop.com - 46 -
HF5111B Serial Server Device User Manual
[Input Serail String]: Default: +++, Range1~10 bytes. Also can input hex
format data. The HEX data are separated by Spaces, Like【30 31 32 33 34】,
When it recieved string data “01234”, then It can enter into Cli command.
Always: Always work in Cli command mode when device power on.
Disable: Disable Cli command mode. UART and Telnet both can’t use Cli
Command.
P
<Cli-WaitTime>
Set
<Cli-WaitTime> [timeout]
O
Parameter:
Set Cli command mode timeout exit time. If there is no Cli command sent for the
SH
waitfime, It will exit Cli command mode to transparent transmission, Setting is valid
immediately.
timeout: Default: 300s, Range 0: Disable WaitTime function, 1~300s.
Set
<Proto> [NONE/Modbus/Frame]
Parameter:
W
command.
IO
http://www.iotworkshop.com - 47 -
HF5111B Serial Server Device User Manual
<FrameLen>
Set
<FrameLen> [value]
Parameter:
Set UART auto-frame length, Setting is valid immediately.
value: Default: 8, Range: 8~1400.
P
Query
<FrameTime>
Set
O
<FrameTime> [value]
Parameter:
SH
Set UART auto-frame time, Setting is valid immediately.
value: Default: 100ms, Range: 100~10000.
<Tag> [Enable/Disable]
Parameter:
Set UART auto-frame tag. Only transmit data from tag head to tag tail. Filter the other
W
http://www.iotworkshop.com - 48 -
HF5111B Serial Server Device User Manual
<Clean>
Parameter:
Clear the UART data count(Data packet/Frame/Error packet and so on) shown in
webpage.
P
Netp and UDP are created socket channel. Itsupport maximum 5 Sockets.
O
4.2.1.37. SOCK/Show Command
Function: Display Socket information function.
SH
Format:
Query
<Show>
Parameter:
There is a default socket created(netp). It support max 5 socket channel. Every channel
can be set as TCP/UDP/HTTP and so on. Setting is valid immediately.
W
received UART data will be send to this IP and port, not the setting
DES3tination.
UDP-CLIENT: UDP Client Mode.
HTTP: HTTP Protocol transmission. The received UART data will
transform to HTTP format and it will remove the HTTP header information
and only output the HTTP data to UART.
TELNETD: Telnetd Mode. Use Telnet to config the UART Console
equipment.
TLS: Function is reserved. We will update it soon.
TCP Server Mode:
http://www.iotworkshop.com - 49 -
HF5111B Serial Server Device User Manual
Input Local Port[0]: Set local port, Range 1~65535, 0 is random port. For
TCP Server and UDP application, set it to a fixed 1~65535(TCP port 80 is
used for its webpage). For TCP Client application, usually set it to 0.
Input Buffer size[512]: Set Buffer size. Default: 512 bytes, Range:1~1400.
Input KeepAlive[60]: Set TCP keepalive, Heartbeat time, Defalut 60s,
Range: >=0.
Input Timeout[300]: Set TCP timeout, If exceed setted time and don’t received
any network data package, It will break TCP connection. If working in TCP
client mode, it will reconnect immediately. If it work in TCP server mode, the
TCP client need to create the connction. Set this value to 0 is to close the
P
function. The function is used for TCP to restore abnormal connection.
Recommend to enable. Default: 300s, Range 0~600.
Input Sock Security[Disable]: Security options, Used for data special
O
encryption. Default: disable no encryption.
Disable: No encryption
SH
TLS: TLS1.2 encryptioin, only support in TCP client mode.
AES: AES encryption, TCP/UDP all support this.
DES3: DES3 encryption, TCP/UDP all support this.
Input key: AES or DES3 key. For AES encryptiont, the key is fixed
16 bytes length, the IV value is the same as key. For DES3
RK
encryption, the key is fixed 24 bytes length, the IV value the first 8
Bytes of key. The key can be ASCII or Hex format data. Hex format
data need to use “space” character as separator, ex, “01 02 03…”
Input Rout[uart]: Set the Socket channel output, Can choose UART and other
O
http://www.iotworkshop.com - 50 -
HF5111B Serial Server Device User Manual
P
should be less than 250 bytes.
O
4.2.1.39. SOCK/netp directory
Function: Display/Set Socket netp channel directory.
SH
Format:
Tab key query
RK
Every created Socket channel can be modified through name. The above command
function is the same as New Socket command description
Set
<Clean>
Parameter:
The network data packets information can be checked from webpage. The command
will reset the data count.
T
Default: data sent in ASCII format. Also can change to send by HEX, The command is
used for Cli command mode to transfer data.
http://www.iotworkshop.com - 51 -
HF5111B Serial Server Device User Manual
Set
<Restart>
P
corresponding parameters. Parameter can including one of the below three:
SYS: Restore system setting relevant paramter
UART: Restore UART setting relevant paramter
O
SOCK: Restore Socket relevant paramter
SH
Function: Exit Cli Command mode instruction
Format:
Set
<Exit>
RK
4.2.1.45. Quit Command
Function: Quit the current and go the father Cli command directory.
Format:
O
Set
<Quit>
Parameter:
Do upgrade function, if upgrade success, it will feedback “Upgrade OK”, if fail, output
IO
http://www.iotworkshop.com - 52 -
HF5111B Serial Server Device User Manual
APPENDIX A:REFERENCES
A.1.Test Tools
http://gb.hi-flying.com/downloadsfront.do?method=picker&flag=all&id=8c366199-b599-47a4-8d9c-
20fa0b68bfcf&fileId=89&v=0.zip
P
O
SH
RK
UART、Network Test software:
http://www.hi-
flying.com/download_list_dc/&downloadcategoryid=14&isMode=false&comp_stats=comp-
O
FrontDownloadsCategory_show01-1376450727769.html
http://www.hi-flying.com/products_detail/productId=96.html
T
IO
http://www.iotworkshop.com - 53 -
HF5111B Serial Server Device User Manual
B.2.Telnet Features:
P
a)Telnet support echo mode,
O
b)Telnet only support one Client port.
SH
d)Telnet connected with TCP, If Client port don’t transmit data in 300s, It will auto
disconnect.
RK
B.3.Telnet Usage:
Telnet function default as ON, If can’t connect, Pls use webpage or configuration to check the
function is on or off.
O
W
a)Configure Secure CRT module and connect parameter, Equipment need to connect
T
with LAN, Can use equipment LAN IP to access , If need remote to access the
IO
equipment, It need router have public IP address as port and mapped to internal
http://www.iotworkshop.com - 54 -
HF5111B Serial Server Device User Manual
P
O
SH
b)Use webpage account and password login in module, Then interface will show
RK
“EPORT>” .
O
W
T
IO
c)Later use are same as UART cli command, And can realise Telnet data with UART
http://www.iotworkshop.com - 55 -
HF5111B Serial Server Device User Manual
P
O
Telnet Software implementation principle:
SH
Step 1 Establish TCP connection with module
RK
Step 2 Module send “login”, Client port send user name(need end with Enter key,Tools
Step 3 Module send 0xFF 0xFB 0x01 Close telnet input display.
http://www.iotworkshop.com - 56 -
HF5111B Serial Server Device User Manual
Step 5 Module send 0xFF 0xFC 0x01 Open telnet input display
P
O
SH
RK
Step 6 It can send and receive Cli command After Enter into Cli command mode.
O
W
T
IO
http://www.iotworkshop.com - 57 -
HF5111B Serial Server Device User Manual
------------------------------------------------------------------------------------------------------------
Address: Room 1002,Building 1,No.3000,Longdong Avenue,Pudong New
Area,Shanghai,China,201203
Web: www.iotworkshop.com or www.hi-flying.com
Contact:
P
Sales: sales@iotworkshop.com
Support: support@iotworkshop.com
O
Service: service@iotworkshop.com
Business: business@iotworkshop.com
---------------------------------------------------------------------------- -------------------------------
SH
For more information about IOTworkshop modules, applications, and solutions, please visit our web
site www.iotworkshop.com
RK
O
<END OF DOCUMENT>
W
T
IO
http://www.iotworkshop.com - 58 -