Page 4
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.netTel:0755-23152658-821 Fax:0755-83575189 6.2.41 C2_uart...............................34 6.2.42 C2_uartpacklen...........................34 6.2.43 C2_uartpacktimeout ..........................34 6.2.44 C2_tcp_auto............................34 6.2.45 C2_tcp_client_check ...........................35 ......................35 COMMAND CONTROL CODE ROUTION 6.3.1 Inquiry configuration information......................35 6.3.2 Serial to Ethernet(Dynamic ip address)....................36 6.3.3 Serial to Ethernet(static ip address) .....................37 6.3.4 Serial to wifi client(dynamic IP address)....................38...
Page 5
TCP / IP protocol stack, enabling the user serial port, Ethernet, wireless network (wifi) interface between the conversions. Through the HLK-RM04 module, the traditional serial devices do not need to change any configuration; data can be transmitted through the Internet network. Provide a quick solution for the user’s serial devices to transfer data via Ethernet.
Page 6
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Functional Parameters WIFI work mode Client/AP/Router WDS Function Support WDS wireless bridge connection Wireless MAC address filtering Wireless security function switch Wireless security 64/128/152 bit WEP encryption WPA-PSK/WPA2-PSK、WPA/WPA2 security mechanism Remote Web management Configuration file import and export...
Page 7
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Picture2.Dimensions Unit:mm 2.2.2 Pins and Interface The Pin of this product as shown above is defined as follows: Table2-2 module pin interface Function Direction Explaination Supply Voltage, 5V+/-10% VCC5V Analogue Ground WLAN Activity LED WIFILED 3.3V Output (Suuport Atmost 300mA)
Page 8
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 10/100 PHY Port #1 TXP TXOP1 10/100 PHY Port #1 TXN TXON1 10/100 PHY Port #2 TXP RXIP2 10/100 PHY Port #2 TXN RXIN2 10/100 PHY Port #1 RXN RXIN1 10/100 PHY Port #1 RXP...
Page 9
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 parameters through the web. Now, the module’s IP address is 192.168.16.254. Configuration details can be seen in 5.1. Configurate serial network parameter Opens the browser http://192.168.16.254/ser2net.asp, enter the serial-to-network web configuration page. Configure the serial-to-network parameters as needed through a web page.
Page 10
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Serial to WIFI CLIENT HLK-RM04 WIFI AP WIFI COM1 Client SERIAL DHCP IP /STATIC IP Chart 4.Serial to WIFI CLIENT model In this mode, WIFI enable, module works in the client mode, ETH1, ETH2 function close.
Page 11
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Through the appropriate settings, the data between COM1 and WIFI network can achieve mutual conversion. WIFI safety: support all encryption methods at present. In this mode, WIFI device can connect with the module and become the device under WIFI LAN.
Page 12
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Power up Config. normal? 1. ES/RST pin Transparent 2. Specific serial data command transmission mode mode 1.at+out_trans=0 Chart 7.Serial work mode switching After power-on normally, the module will check whether the current network serial port configuration is normal, if the network connection is normal, the module automatically enters transparent transmission mode, and otherwise the module will enter AT command mode.
Page 13
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 0x1B 0x1B 0x1B >Tpt 400ms< >600ms >Tpt AT COMMAND MODE Chart 9.Serial exit transparent transmission mode Notes: Tpt:Serial framing time The group frame time interval is greater than continuous send three "+", and then wait for about 500ms (400ms <>...
Page 14
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 TCP Client HLK-RM04 TCP Server TCP Client Chart 11.TCP Client In this mode, the module is connected to the specified domain / IP port. All the data sent from the TCP Server-side end will be sent directly to the serial port, the data from the serial end sent to the TCP Server-side.
Page 15
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 HLK-RM04 UDP Server UDP Client Chart 13.UDP Client In this mode, the module directly sends the serial data to the specified ip, port. The serial data returned from the server-side will be distributed to serial port.
Page 16
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Chart 7.WEB configuration page Through the correct module address (default address:http://192.168.16.254/ser2net.asp),you can access to the WEB configuration page. The page can be divided into 3 areas: 1 Network configuration area 2 Serial function configuration areas...
Page 17
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 5.1.1 Serial to Ethernet-dynamic ip Chart 8. Serial to Ethernet-dynamic 5.1.2 Serial to Ethernet-static ip Chart 9. Serial to Ethernet-static 5.1.3 Serial to WIFI CLIENT-dynamic ip Chart 10. serial to WIFI CLIENT dynamic...
Page 18
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 5.1.4 Serial to WIFI CLIENT-static ip Chart 11. Serial to WIFI CLIENT-static 5.1.5 Serial to WIFI AP Chart12. Serial to WIFI AP WEB serial configuration Serial Web configuration page(ser2net.asp)is as follows:...
Page 19
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Current shows the current configuration ,Updated shows the current revision parameters。 Submit submit the revision. Serial Configure:Serial configuration.fomat:Baud rate, data bits, parity bit, stop bit. For example:“115200,8,n,1”. Serial Framing Lenth:The Lenth of Serial Framing Serial Framing Timeout:The time of Serial Framing...
Page 20
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Network Protocol:Use tcp or udp Protocol Network Timeout:Under the server network mode, no data transmission within the timeout period, the connection will be disconnected. 0 specifies never disconnected. Submitting Alteration Click the button ‘Apply’ to submit the configuration of the current page. If some parameters of the network have changed, the submission process may take about 25 seconds.
Page 21
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 netmode Network mode Wifi configuration wifi_conf dhcpc Dhcp client configuration Network ip address net_ip net_dns Network dns address dhcpd Dhcp server configuration dhcpd_ip Dhcp server ip address Dhcp server dns address dhcpd_dns Dhcp sever time allocation...
Page 22
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 C2_uart Serial 2 uart configration C2_mode Serial 2 Serial network mode C2_remoteip Serial 2 remote server domain name or IP address C2_port Serial 2 local or remote port C2_CLport Serial 2TCP/UDP CLIENT local port C2_protocol...
Page 24
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 This parameter is not valid when Dhcp client feature is turned on. Format: At+Net_ip=<ip>,<mask>,<gateway>\r Parameters: Ip:Ip address Mask:Subnet mask Gateway:Gateway Network Element 6.2.6 net_dns Function: Network mode setting This parameter is not valid when Dhcp client feature is turned on Format:...
Page 25
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Format: At+Dhcpd_ip=<ip start>,<ip end>,<mask>,<gateway>\r parameters: Ip start:Ip started address Ip end:Ip ended address Mask:Subnet mask Gateway:Gateway Network Element 6.2.9 dhcpd_dns Function: Dhcp server dns setting Format: At+Dhcpd_dns=<dns1>,<dns2>\r Parameters: dns1:Major dns address dns2:Minor dns address 6.2.10 dhcpd_time Function:...
Page 26
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Table 6-7 submit to network setting value meaning invalid submit 6.2.12 out_trans Function: Exit the transparent transmission mode Format: At+out_trans=<out_trans>\r Parameters: Table 6-8 Exit the transparent transmission mode value meaning Arbitrarily Exit the transparent transmission mode 6.2.13...
Page 27
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Format: At+ remotepro=<remotepro>\r Parameters: Table 6-9 remotepro parameters setting value meaning None No protocol Tcp protocol Udp protocol 6.2.16 timeout Function Network time-out Format: At+timeout=<timeout>\r Parameters: Network time-out server Network mode, when there is not any data transfer during the time-out, the connection will be disconnected.
Page 28
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 At+uart=<baud>,<data>,<parity>,<stop>\r parameters: Baud:Baud rate Data:Data bits Parity:Parity bit Stop:length of stop bit 6.2.19 uartpacklen Function: Serial framing length setting Format: At+uartpacklen =<uartpacklen>\r Parameters: uartpacklen:Serial framing length(Unit:bit).Default value: 64. 6.2.20 uartpacktimeout Function: Serial framing time setting Format:...
Page 29
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Parameter: tcp_auto:0 - close,1 – enable. 6.2.23 save Function: Submitted to serial converter configuration and restart the service. Format: At+ save=<save>\r Parameters: Table 6-11 submit to network setting value meaning invalid submit 6.2.24 reconn Function:...
Page 30
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Parameters: Clport:Local port 6.2.27 RTS Function: Serial output instructions. 485 programs typically require a separate pin to indicate 485 transceiver receiving or sending state. This Function enabled, GPIO_1 pin indicates the serial port output state as an output pin.
Page 31
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 6.2.30 tcp_client_check Function: TCP CLIENT remote status detection Format: tcp_client_check =< tcp_client_check >\r Parameters: tcp_client_check Value meaning close open 6.2.31 S2N_Stat Function: Serial Function status Format: S2N_Stat =?\r Parameters: None 6.2.32 Get_MAC Function: Get MAC address Format:...
Page 33
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 6.2.38 C2_remotepro Function: Serial 2 Protocal type setting Format: At+ C2_remotepro=<remotepro>\r Parameters: Remotepro Value meaning None none Tcp Protocal Udp Protocal 6.2.39 C2_timeout Function: Serial 2 network timeout Format: At+ C2_timeout=<timeout>\r Parameters: Network timeout, in the server network mode, if there is none data transfer during the timeout period, the connection will be disconnected.
Page 34
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 6.2.41 C2_uart Function: Serial 2 uart configuration setting Format: At+ C2_uart=<baud>,<data>,<parity>,<stop>\r Parameters: Baud:Baud rate Data:Data bit Parity:Parity bit Stop:length of stop bit 6.2.42 C2_uartpacklen Function: Serial 2 uart group fram length setting Format: =<uartpacklen>\r C2_uartpacklen Parameters:...
Page 35
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 tcp_auto:0 - close,1 - enable 6.2.45 C2_tcp_client_check Function: Serial 2 TCP CLIENT remote status detection Format: =< tcp_client_check >\r C2_tcp_client_check Parameters: tcp_client_check Value meaning close open AT command control code roution 6.3.1 Inquiry configuration information Code:...
Page 37
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Com_send(commands_eth); Run and return: at+netmode=1 ok at+dhcpc=1 at+remoteip=192.168.11.245 ok at+remoteport=8080 ok at+remotepro=tcp at+timeout=0 ok at+mode=server at+uart=115200,8,n,1 ok at+uartpacklen=64 ok at+uartpacktimeout=10 ok at+net_commit=1 6.3.3 Serial to Ethernet(static ip address) Code: char *commands_eth_static="\ at+netmode=1\r\n\ at+dhcpc=0\r\n\ at+net_ip=192.168.11.254,255.255.255.0,192.168.11.1\r\n\ at+net_dns=192.168.11.1,8.8.8.8\r\n\ at+remoteip=192.168.11.245\r\n\...
Page 38
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 at+remoteip=192.168.11.245 ok at+remoteport=8080 ok at+remotepro=tcp at+timeout=0 ok at+mode=server at+uart=115200,8,n,1 ok at+uartpacklen=64 ok at+uartpacktimeout=10 ok at+net_commit=1 6.3.4 Serial to wifi client(dynamic IP address) Code: char *commands_wifi_client="\ at+netmode=2\r\n\ at+wifi_conf=HI-LINK,wpa2_aes,12345678\r\n\ at+dhcpc=1\r\n\ at+remoteip=192.168.11.245\r\n\ at+remoteport=8080\r\n\ at+remotepro=tcp\r\n\ at+timeout=0\r\n\ at+mode=server\r\n\ at+uart=115200,8,n,1\r\n\ at+uartpacklen=64\r\n\...
Page 39
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 at+uartpacktimeout=10 ok at+net_commit=1 6.3.5 Serial to wifi client(static IP address) Code: char *commands_wifi_client_static="\ at+netmode=2\r\n\ at+wifi_conf=HI-LINK,wpa2_aes,12345678\r\n\ at+dhcpc=0\r\n\ at+net_ip=192.168.11.254,255.255.255.0,192.168.11.1\r\n\ at+net_dns=192.168.11.1,8.8.8.8\r\n\ at+remoteip=192.168.11.245\r\n\ at+remoteport=8080\r\n\ at+remotepro=tcp\r\n\ at+timeout=0\r\n\ at+mode=server\r\n\ at+uart=115200,8,n,1\r\n\ at+uartpacklen=64\r\n\ at+uartpacktimeout=10\r\n\ at+net_commit=1\r\n\ at+reconn=1\r\n\ "; Com_send(commands_wifi_client_static); Run and return: at+netmode=2 ok...
Page 40
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 6.3.6 Serial to wifi AP Code: char *commands_wifi_ap="\ at+netmode=3\r\n\ at+wifi_conf=Hi-Link_,wpa2_aes,0000000000\r\n\ at+dhcpd=1\r\n\ at+dhcpd_ip=192.168.16.100,192.168.16.200,255.255.255.0,192.168.16.254\r\n\ at+dhcpd_dns=192.168.16.254,8.8.8.8\r\n\ at+dhcpd_time=86400\r\n\ at+net_ip=192.168.16.254,255.255.255.0,192.168.16.254\r\n\ at+net_dns=192.168.16.254,8.8.8.8\r\n\ at+remoteip=192.168.11.245\r\n\ at+remoteport=8080\r\n\ at+remotepro=tcp\r\n\ at+timeout=0\r\n\ at+mode=server\r\n\ at+uart=115200,8,n,1\r\n\ at+uartpacklen=64\r\n\ at+uartpacktimeout=10\r\n\ at+net_commit=1\r\n\ at+reconn=1\r\n\ "; Com_send(commands_wifi_ap); Run and return: at+netmode=3 ok at+wifi_conf=Hi-Link_,wpa2_aes,0000000000 ok at+dhcpd=1 ok at+dhcpd_ip=192.168.16.100,192.168.16.200,255.255.255.0,192.168.16.254 ok...
Page 41
Run and return: at+default=1 After 30s, the modules start normally, all configuration parameters change to the factory configuration. Serial configuration tools HLK-RM04 CONFIG is a configuration tools that configurate the module through the serial port. Tool interface is as follows:...
Page 42
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Chart 13 Configuration tools interface Description: ‘Com 11’stands for configuration serial option Search: module searching button Operation mode: work mode selection Wifi Parameter: wireless parameter configuration Network Protocol: Network protocol selection Serial Parameter: Serial parameter configuration...
Page 43
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Response: AT instruction return information area Searching the Module Through the "configure serial port choice" choose PC serial number and click on the "search module" button, the tool will use the specified serial search the module HLK - RM04, the module will be searched if it has been connected and in AT instruction mode .
Page 44
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Chart 17 Serial configuration tool generates AT command Submit the configuration Click the submit configuration button, the tool will send the AT instruction in the ready for sent area to the module immediately. The information of command execution results will be shown in...
Page 45
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 Chart18. Serial configuration tools instruction execution User Data Retention The user parameter holding area provides parameter saving function. Through this function you can save up four sets of parameters at most, respectively, user0 user1, user2, user3. Click "S" button, it will pop up a confirmation dialog shown as below: Chart 19.
Page 46
8 Device Search tools HLK-RM04_Discover is a search tool of network end used to search the module HLK-RM04.The interface is as follows: Chart 21. Device search tools Click on the button“Discover”,the tools will search all the HLK-RMO4 module connected with PCin the LAN.The module being searched will show in the information box soon.The module...
Page 47
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 9 Restore factory Settings Support the following ways to restore the factory settings 1. Through the Web page. 2 By keeping the ES/RST pin low level time greater than Trst. V(ES/RST) >Trst Reset to Default.
Page 48
Hi-Link (HK)Co.,Ltd sky:hlktech Http://www.hlktech.net Tel:0755-23152658-821 100ms Trst 10 Firmware upgrade 1. Restore the factory value. 2. Pc can connect with module through Ethernet, ip: 192.168.16.123/255.255.255.0. Browser visits 192.168.16.254. Username / password: admin / admin. 3. Open the following page. Select the appropriate firmware, click apply upgrades. Wait about 3 minutes.