HF HF2411 User manual

4G_2G DTU Products Function
http://www.iotworkshop.com - 3 -
TABLE OF CONTENTS
TABLE OF CONTENTS...........................................................................................................................3
LIST OF FIGURES ..................................................................................................................................6
LIST OF TABLES....................................................................................................................................6
1. FUNCTION DESCRIPTION .................................................................................................8
1.1. Basic Network Protocol...................................................................................................8
1.2. Working Mode ..................................................................................................................8
1.2.1. Transparent Throughput Mode ..................................................................................8
1.2.2. SMS Throughput Mode .............................................................................................10
1.2.3. SOCKA HTTP Mode...................................................................................................10
1.2.4. SOCKA WebSocket Mode.........................................................................................14
1.2.5. SOCKA MQTT Mode ..................................................................................................16
1.3. Registration Package Function....................................................................................17
1.4. Heartbeat Package Function ........................................................................................18
1.5. Multi-Socket Communication Function.......................................................................19
1.6. Multi-Socket Data Differentiation Function.................................................................19
1.7. Serial Frame Scheme.....................................................................................................20
1.8. Firmware Updates..........................................................................................................20
1.9. IOTService Software......................................................................................................22
1.9.1 IOTService Serial Port Configuration.............................................................................22
1.9.2 IOTService Network Mode Configuration......................................................................24
1.10. Modbus Protocol............................................................................................................26
1.11. NTP Function..................................................................................................................27
1.12. Virtual Serial Port Function...........................................................................................27
1.13. HIS Script Funciton(Only 4G Product Support)..........................................................28
2. AT INSTRUCTION INTRODUCTION.............................................................................................30
2.1. Working Mode ................................................................................................................30
2.1.1. Switching to Command Mode ........................................................................................30
2.2. Send AT Command in Transparent Transmission Mode...........................................31
2.3. SMS AT Command.........................................................................................................32
2.4. Overview of the AT Instruction Set..............................................................................32
2.4.1. Instruction Syntax Format ...............................................................................................32
2.4.2. AT Instruction Set............................................................................................................ 33
2.4.2.1. AT+H...............................................................................................................................35
2.4.2.2. AT+E ...............................................................................................................................35
2.4.2.3. AT+CMDPW.....................................................................................................................35
2.4.2.4. AT+WEL ..........................................................................................................................36
2.4.2.5. AT+HOST.........................................................................................................................36
2.4.2.6. AT+ENTM ........................................................................................................................36
2.4.2.7. AT+VER ...........................................................................................................................37

4G_2G DTU Products Function
http://www.iotworkshop.com - 4 -
2.4.2.8. AT+GVER.........................................................................................................................37
2.4.2.9. AT+APPVER .....................................................................................................................37
2.4.2.10. AT+RELD........................................................................................................................37
2.4.2.11. AT+CFGTF......................................................................................................................37
2.4.2.12. AT+FCLR ........................................................................................................................37
2.4.2.13. AT+SRST ........................................................................................................................37
2.4.2.14. AT+Z .............................................................................................................................38
2.4.2.15. AT+UART .......................................................................................................................38
2.4.2.16. AT+UARTTM .................................................................................................................. 38
2.4.2.17. AT+MODBUS..................................................................................................................38
2.4.2.18. AT+SMSID......................................................................................................................39
2.4.2.19. AT+NETP .......................................................................................................................39
2.4.2.20. AT+NETPLK ....................................................................................................................40
2.4.2.21. AT+TCPTO ..................................................................................................................... 40
2.4.2.22. AT+NETPIDEN ................................................................................................................41
2.4.2.23. AT+NETPID ....................................................................................................................41
2.4.2.24. AT+DATA....................................................................................................................... 41
2.4.2.25. AT+NREGEN...................................................................................................................42
2.4.2.26. AT+NREGDT...................................................................................................................42
2.4.2.27. AT+NREGSND................................................................................................................. 43
2.4.2.28. AT+HEART .....................................................................................................................43
2.4.2.29. AT+HTPTP......................................................................................................................44
2.4.2.30. AT+HTPURL ...................................................................................................................44
2.4.2.31. AT+HTPHEAD.................................................................................................................44
2.4.2.32. AT+WEBSOCKET.............................................................................................................44
2.4.2.33. AT+MQTOPIC.................................................................................................................45
2.4.2.34. AT+MQLOGIN ................................................................................................................45
2.4.2.35. AT+MQID.......................................................................................................................45
2.4.2.36. AT+LOCATE....................................................................................................................46
2.4.2.37. AT+UPGRADE.................................................................................................................46
2.4.2.38. AT+GOTA.......................................................................................................................46
2.4.2.39. AT+GETIP.......................................................................................................................47
2.4.2.40. AT+PING........................................................................................................................47
2.4.2.41. AT+GSLQ .......................................................................................................................47
2.4.2.42. AT+GSMST.....................................................................................................................47
2.4.2.43. AT+ICCID .......................................................................................................................48
2.4.2.44. AT+IMEI ........................................................................................................................48
2.4.2.45. AT+IMSI.........................................................................................................................48
2.4.2.46. AT+APN.........................................................................................................................48
2.4.2.47. AT+NTIME .....................................................................................................................49
2.4.2.48. AT+IOTEN...................................................................................................................... 49
2.4.2.49. AT+IOTUID..................................................................................................................... 49
2.4.2.50. AT+PID ..........................................................................................................................49
2.4.2.51. AT+PCID ........................................................................................................................50

4G_2G DTU Products Function
http://www.iotworkshop.com - 5 -
2.4.2.52. AT+NDBGL.....................................................................................................................50
2.4.2.53. AT+SCRIPT .....................................................................................................................50

4G_2G DTU Products Function
http://www.iotworkshop.com - 6 -
LIST OF FIGURES
Figure 1. Network Application.........................................................................................................................8
Figure 2. Transparent Throughput Mode........................................................................................................9
Figure 3. AT+NETP Setting Case...................................................................................................................9
Figure 4. Transparent Data Example............................................................................................................10
Figure 5. Transparent Transmission Mode Registration Packet Function Transmission ..............................10
Figure 6. HTTP Mode Transmission.............................................................................................................11
Figure 7. HTTP GET Request Example........................................................................................................12
Figure 8. HTTP POST Request Example .....................................................................................................13
Figure 9. IOTService UART Set HTTP Parameter........................................................................................13
Figure 10. IOTService Remote Set HTTP Parameter.....................................................................................14
Figure 11. Websocket Basic Concept.............................................................................................................14
Figure 12. IOTService Tools UART Config.....................................................................................................15
Figure 13. IOTService Network Config ...........................................................................................................15
Figure 14. MQTT Concept..............................................................................................................................16
Figure 15. IOTService Tools UART Config.....................................................................................................16
Figure 16. IOTService Tools Network Config..................................................................................................17
Figure 17. Transparent Transmission Mode Registration Packet Function Transmission ..............................18
Figure 18. Transparent Transmission Mode Registration Package Function Example...................................18
Figure 19. Transparent Transmission Mode Heartbeat Packet Function Transmission..................................19
Figure 20. Multi-Socket Communication Transmission...................................................................................19
Figure 21. Specify Socket Channel Communication Transmission.................................................................20
Figure 22. Serial Frame Scheme....................................................................................................................20
Figure 23. IOTService Serial Port Update.......................................................................................................21
Figure 24. IOTService Network MethodUpgrade............................................................................................21
Figure 25. IOTBridge Industrial Cloud Function..............................................................................................22
Figure 26. Serial Port Modbus Function..........................................................................................................27
Figure 27. Virtual Serial Port Function............................................................................................................28
Figure 28. Scirpt Funciton...............................................................................................................................29
Figure 29. Default UART Parameters.............................................................................................................30
Figure 30. Switching to Command Mode........................................................................................................31
Figure 31. AT Instruction Set..........................................................................................................................32
LIST OF TABLES
Error Code Description ............................................................................................................................33
List of AT+ Instruction Set ........................................................................................................................33
历史记录
V 1.0 01-24-2018. First Version
V 1.1 01-25-2018. Correction section AT command description

4G_2G DTU Products Function
http://www.iotworkshop.com - 7 -
V 1.2 03-22-2018. Add AT+LOCATE commend
V 1.307-25-2018. Add EG model
V 1.411-28-2018. Add HF2411, HF2111A type. Add AT+HTPXX series command
V 1.5 12-10-2018. Add AT+CMDPW, AT+TCPTO command
V 1.6 12-19-2018. Add AT+GOTA, AT+GVER command. Add Gport-G43 Type
V 1.7 02-01-2019. Add AT+APN,AT+SMSID,AT+HOST
V 1.8 04-29-2019. Update MQTT, websocket, Ali-IOT

4G_2G DTU Products Function
http://www.iotworkshop.com - 8 -
1.FUNCTION DESCRIPTION
The products to which this document applies have the following characteristics.
➢Connect the device to a PC or other server by establishing TCP/UDP or Telnet to support up
to 3 socket communications.
➢One or Two independent serial ports work.
➢Support IOTService to remotely modify module working parameters.
1.1. Basic Network Protocol
The products uses IP address for network communication. Transmit by TCP, the data can be
ensured without loss or duplication, and reach the communication destination address accurately. And
transmit by UDP, the data can be transmitted to the destination address quickly and efficiently.
Figure 1. Network Application
1.2. Working Mode
1.2.1. Transparent Throughput Mode
The device supports a serial interface for transparent throughput mode. In this mode, the user
only needs to set some necessary parameters (network communication parameters). After power-on,
the device can automatically connect to the default network and server. Use the IOTService software
to set communication parameters.

4G_2G DTU Products Function
http://www.iotworkshop.com - 9 -
Figure 2. Transparent Throughput Mode
Under this mode, the user's serial device can send data to the specified server on the network
through this module. The module can also receive data from the server and forward the information to
the serial device.
The user does not need to pay attention to the data conversion process between the serial port
data and the network data packet, and the data transparent communication between the serial port
device and the network server can be realized by simple parameter setting.
This module supports 3 socket connections, which are SOCKA, SOCKB, and SOCKC, which are
independent of each other. Each socket supports TCP client or UDP client.
For TCP connections, users can set the communication method for long or short connections. A
short connection means that the connection is initiated when the serial port data is received, and the
connection is automatically disconnected after a certain period of time. The server resources are
greatly saved, but the connection process takes a certain amount of time, causing data transmission
delay, and the server cannot actively send data to the device. Long connection means that data can
be sent and received at any time, but it takes up server connection resources.
The data transmission case is as follows:
1、After setting the following communication parameters command, the device will restart,
nat2.iotworkshop.com, port:3006 is High Flying’s TCP test server (3008 port for UDP).
Figure 3. AT+NETP Setting Case

4G_2G DTU Products Function
http://www.iotworkshop.com - 10 -
2、Waiting for the network LED shows register to the network. After sending the UART data, the
server replies with the IP address, port number and received data, as shown below:
Figure 4. Transparent Data Example
1.2.2. SMS Throughput Mode
In this mode, the UART data can be sent to and receive from short message.
AT+SMSID command to set SMS parameters
Figure 5. Transparent Transmission Mode Registration Packet Function Transmission
1.2.3. SOCKA HTTP Mode
SOCKA channel support HTTP protocol. Under this mode, the user's terminal device can send
request data to the specified HTTP server through this module. The module will receive the data from
the HTTP server, parses the data and sends the results to the serial device. The user does not need
to pay attention to the data conversion process between the serial port data and the network data

4G_2G DTU Products Function
http://www.iotworkshop.com - 11 -
packet, and the data request of the serial port device to the HTTP server can be realized by simple
parameter setting.
Figure 6. HTTP Mode Transmission
For GET request, the received UART packet AAA will put after the HTTP path (auto add “?”
between path and parameters), for POST request, packet is put in the content (auto add Content-
Length header information).
Product will send the below data to HTTP Server when UART receive “pppp” data for GET
request.
GET /1111?pppp HTTP/1.1
Host: 192.168.83.107
Product will output “DDDDD” when get response from the HTTP server.
HTTP/1.1 200 OK
Server: nginx
DDDDD

4G_2G DTU Products Function
http://www.iotworkshop.com - 12 -
Figure 7. HTTP GET Request Example
Product will send the below data to HTTP Server when UART receive “pppp” data for POST
request.
POST /1111 HTTP/1.1
Host: 192.168.83.107
Content-Length:4
pppp
Product will output “DDDD” when get response from the HTTP server.
HTTP/1.1 200 OK
Content-Length: 4
Connection: close
DDDD

4G_2G DTU Products Function
http://www.iotworkshop.com - 14 -
Figure 10. IOTService Remote Set HTTP Parameter
1.2.4. SOCKA WebSocket Mode
Device support WebSocket Client send data to WebSocket Server. (Use IOTService or Webpage
to config). When in WebSocket Mode, device side will auto add WebSocket protocol header to server
when receive UART data. And remove the protocol header and send the content to UART.
More WebSocket Case refer to following link.
http://www.hi-flying.com/download-center-1/application-notes-1/download-item-industry-products-
application-manual-20180415
Figure 11. Websocket Basic Concept

4G_2G DTU Products Function
http://www.iotworkshop.com - 16 -
1.2.5. SOCKA MQTT Mode
Device support MQTT Client send data to MQTT Server. (Use IOTService or Webpage to config).
More MQTT Case refer to following link.
http://www.hi-flying.com/download-center-1/application-notes-1/download-item-industry-products-
application-manual-20180415
Figure 14. MQTT Concept
Figure 15. IOTService Tools UART Config

4G_2G DTU Products Function
http://www.iotworkshop.com - 17 -
Figure 16. IOTService Tools Network Config
1.3. Registration Package Function
Under the transparent transmission mode, the registration package function can be enabled.
When the connection is established (TCP only) or the serial port data is received, the content of the
registration package is automatically added to the server, and the content of the registration package
can be used with the version number, ICCID, IMEI, etc. Details refer to AT+NREGDT command.

4G_2G DTU Products Function
http://www.iotworkshop.com - 18 -
Figure 17. Transparent Transmission Mode Registration Packet Function Transmission
The example of registration package function is as follows: The following commands respectively
enable the registration function of Socket A, set the content of the registration package to version
number + signal strength + ABCD, enable the registration package when establishing connection and
sending data.
Figure 18. Transparent Transmission Mode Registration Package Function Example
1.4. Heartbeat Package Function
In the transparent transmission mode, the heartbeat packet function can be enabled, and the
module periodically sends heartbeat data to the server or the serial port. For details, refer to the
AT+HEART command. The main purpose of sending to the network is to keep the connection with the
server, and to make the connection status valid for modules that are idle for a long time (the data will
not be sent to the server for a long time). When the connection is abnormal, the module detects that
the heartbeat packet data cannot be sent to the server. If the number of failed transmissions is greater
than 3, the module considers that the connection is abnormal and will try to reconnect to the server.
In an application where the server sends a fixed query command to the device, in order to reduce
the communication traffic, the user can choose to send a heartbeat packet (query command) to the
serial device to replace the sending of the query command from the server.

4G_2G DTU Products Function
http://www.iotworkshop.com - 19 -
Figure 19. Transparent Transmission Mode Heartbeat Packet Function Transmission
1.5. Multi-Socket Communication Function
The module supports max 3 sockets for simultaneous communication, and each channel can set
serial port channels. In the multi- TCP link connection mode, data from TCP will be forwarded one by
one to the serial port. The data coming from the serial port will be copied into multiple copies and
forwarded on each TCP link. The specific operation is as follows:
Figure 20. Multi-Socket Communication Transmission
1.6. Multi-Socket Data Differentiation Function
In the multi-Socket application process, user can specify the serial port data to be sent to a
specific Socket channel. The data received by the Socket will also be added with the channel tag, so
that the serial port can determine which channel sends the data. For details, see: AT+NETPIDEN and
AT+NETPID command.

4G_2G DTU Products Function
http://www.iotworkshop.com - 20 -
Figure 21. Specify Socket Channel Communication Transmission
1.7. Serial Frame Scheme
When the DTU receives data from the UART, it constantly checks the interval between two
adjacent bytes. If the interval is greater than a certain value, then one frame is considered to have
ended, otherwise the data is received until the buffer byte (512 bytes). The module determines that the
Socket channel is forwarded after the end of one frame on the serial port.
The default 2-byte interval of the module is 200ms, that is, when the interval is greater than
200ms, one frame ends.
Figure 22. Serial Frame Scheme
1.8. Firmware Updates
DTU supports firmware upgrade through serial port and network mode.
This manual suits for next models
9
Table of contents
Other HF Network Hardware manuals
Popular Network Hardware manuals by other brands

Direct IP
Direct IP Idis DR-3104P installation manual

Proxim
Proxim Tsunami QuickBridge.11-R Series Quick install guide

FieldServer
FieldServer Hanning FS-8700-127 Driver manual

Airespace
Airespace AS-4012 Product guide

Buffalo
Buffalo LinkStation Live Shared Network Storage user manual

Altronix
Altronix TROVE T2SK78DV installation guide