Hi-Link HLK-RM58S UART-WIFI module User Manual
- June 5, 2024
- Hi-Link
Table of Contents
- Hi-Link HLK-RM58 S UART-WIFI module
- Product profile
- Product Characteristics
- Technical Specifications
- Functional Description
- Serial port-network data conversion
- AT Instructions
- AT command control code routine
- Serial to Wifi client (static ip address)
- Serial to wifi server(dynamic ip address)
- Configuration Software Description
- Upgrade Introduction
- Antennas
- FCC Warning
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
Hi-Link HLK-RM58 S UART-WIFI module
Product profile
Overview
HLK-RM58S is a new low-cost embedded UART-WIFI module (serial-Wireless network) developed by Shenzhen Hi-Link co., Ltd. This product is an embedded module based on the serial interface in line with the network standard , built-in TCP/IP protocol stack, can realize the user serial port-wireless network (WIFI) conversion. Through the HLK-RM58S module, the traditional serial device can transmit its own data through the Internet network without changing any configuration, which provides a complete and fast solution for the user’s serial port device to transmit the data through the network.
Product Characteristics
- Compatible IEEE 802.11 a/n
- Dedicated high-performance 32-bit RISC CPU
- Support for 5 GHz band
- Support two working modes of STA/AP
- Built-in TCP/IP protocol stack
- Support various AT instructions
- Support one-click configuration of intelligent networking features
- Support wireless upgrade (OTA)
- 5V single power supply, low power consumption
- Fast transmission speed of serial port
Product Packaging
Technical Specifications
Module
| Model| HLK-RM58S
---|---|---
Package| Plug-in
Wireless parameter
| Wireless standard| IEEE 802.11 a/n
Frequency range| 5150-5250MHz, 5725-5825MHz
Transmitting power
| 802.11n: +13 +/-2dBm
802.11a: +15 +/-2dBm
Receiving sensitivity
| 802.11n: -73.6dBm
802.11a: -75.0 dBm
Antenna form| Internal Antenna
Hardware parameters
| Hardware interface| UART, IIC, PWM, GPIO, SPI
Working voltage| 5V
GPIO drive capability| Max:16ma
Working current
| Continuous send=>
Average value: ~100mA, peak value:120mA In normal mode =>
Average: ~100mA, Peak: 110mA
Working temperature| -40℃~80℃
Storage environment| Temperature: <40℃, The relative humidity: <90% R.H.
Serial transmission| Transmission speed| 110-921600bps
TCP Client| 2
Software parameters
| Wireless network type| STA/AP
Security mechanism| WEP/WPA-PSK/WPA2-PSK
Encryption type| WEP64/WEP128/TKIP/AES
Firmware upgrade| Wireless, uart
networking protocol| IPv4, TCP/UDP
User configuration| AT+instruction, smart config
Pins introduction
Pin | Network Name | Type | Explanation |
---|---|---|---|
1 | GND | Ground | Ground |
2
|
GPIO0
|
I/O
| ES0 pin, pull down 1 second, serial 0 into AT
command mode ;Pull down ≥ 8 seconds, restore factory default parameter settings
3| NC| | NC
4| UART_RXD1| I| Serial port 1 receiving
5| UART_TXD1| O| Serial port 1 sending
6| NC| | NC
7| NC| | NC
8| NC| | NC
9| NC| | NC
10| NC| | NC
11| NC| | NC
12| NC| | NC
13| NC| | NC
14| NC| | NC
15| NC| | NC
16| NC| |
17| NC| | NC
18| NC| | NC
19| NC| | NC
20| NC| | NC
21| NC| | NC
22| NC| | NC
23| NC| | NC
24| VCC_5V| P| External power supply pin 1: 5V @ 500mA
25| GND| GND| Ground
26| VDD_3V3| P| External power supply foot 2: 3.3V @ 500mA
External power pin: 3.3V @ 200mA
27 | NC | NC | |
---|---|---|---|
28 | NC | NC | |
29 | NC | NC | |
30 | SYS_RST_N | I | Module reset, low level effective, reset time ≥ 500ms |
31 | NC | NC | |
32 | UART_TXD0 | O | Serial 0 output |
33 | UART_RXD0 | I | Serial 0 input |
34 | NC | NC | |
35 | NC | NC | |
36 | GPIO33 | I/O | Wifi indicator light |
37 | ANT | I/O | optional, default unavailable |
38 | GND | Ground | Ground |
Interface definitions
Mechanical dimensions
Functional Description
HLK-RM58S supports serial port to WIFI STA, serial to WIFI AP mode.
WiFi indicator flashing description
The module is flashed by the LED indicator in different modes, so that the
module running status can be quickly and easily known. The WiFi indicator of
the module mainly has the following status:
(1) The wifi indicator flashes twice periodically: indicates that the module
is in the one-click distribution mode.
(2) The wifi indicator flashes thirdly periodically: indicates that the module
is in the sta mode and the target ap hotspot is not connected.
(3) The wifi indicator flashes periodically: indicates that the module is in
the 5.8g ap mode, but it does not indicate whether there is a sta client
device connected.
(4) The wifi indicator flashes quickly: indicates that the module is in the
sta mode and is connected to the wifi hotspot. When there is data
transmission, the module LED will flash quickly.
Wifi connection status indicator pin
GPIO58 pin is used as the indicator pin of the module’s wifi connection status
in sta mode. When the module’s wifi is connected to the router, GPIO58 will
output a high level, otherwise will output low level, and other modes will
output low level.
Socket connection status indicator pin
The GPIO59 pin is used as the indicator pin of the module socket’s connection
status. When the socket connection is successful, the GPIO outputs a high
level, otherwise outputs low level.
One-click distribution mode
For the IOT wifi module, based on cost and performance considerations, there is no touch screen interactive interface like a mobile phone. Users can see the ap list on the mobile phone and click the password to connect to the network. What should I do? One-click configuration is the wifi module in promiscuous mode (can capture all 802.11 frames in the air), APP sends the SSID and password to the wifi module through UDP broadcast or multicast through certain encoding rules, the module parses out, and then connects to the router. Install the Android app HLK-TCPdemo, then select Configure Networking, select the elian mode, then select V5, input the password, click to open the configuration and start the configuration. When the distribution network is successful, the module will change from double flash to quick flash, indicating the network successfully connected.
When the module is on the one-click distribution, you need to set the module to the one-click distribution mode. Serial configuration tool can be used to set the module to the one-click distribution mode.
Web distribution function
When the module is on the one-click distribution, you need to set the module to the one-click distribution mode. Serial configuration tool can be used to set the module to the one-click distribution mode. When the module is on the one-click distribution, you need to set the module to the one-click distribution mode. Serial configuration tool can be used to set the module to the one-click distribution mode.
Serial to WIFI STA
Serial to WIFI AP
Serial port working state conversion
After the HLK-RM58S is powered on, the default mode is transmission mode. By
pulling down the pin ES0 (GPIO0) to enter at instruction mode longer than
50ms, the module will process the received data as at instructions, send at
instructions to let the module into transparent mode, After the network
connection, the data received by the serial port will be transmitted as
transparent data.
Serial port-network data conversion
Module as TCP Client
In this mode, the module listens to the specified port, waits for TCP Client connection, and after the connection, all TCP data is directly sent to the serial port end, and the data of the serial port end is sent to all TCP Client ends. When the module is used as the TCP server, the most supporting two TCP clients are connected to the TCP server.
Module as UDP Server
In this mode, the module opens the local designated port, once it receives the data sent to the port, the module sends the data to the serial port and records the remote ip, port. The module only records the remote information on the last connection, and the data sent by the serial port is sent directly to the recorded remote ip, port.
Module as UDP Client
In this mode, the module sends the serial port data directly to the specified ip, port, and the data returned from the server will be sent to the serial port.
Application areas
- Smart home;
- Instruments and instruments;
- Wi-Fi remote monitoring / control;
- Toy field;
- Color LED control;
- Fire protection, security intelligent integrated management;
- Smart card terminals, wireless POS machines, handheld devices and so on.
AT Instructions
Instruction format: in AT instruction mode, the system can be configured through the AT instructions of the serial port. The command format is as follows:
- at+[command]=[value],[value],[value]……
All commands begin with “at” and “\ r” end. If the command is not encapsulated in this format, it will not be processed and will return a different return value depending on the command module.
- For example:“at+ver=?”
- Module will return: HLK-RM58S (V1.00 (Nov 30 2017)
- Query instruction format: at+[command]=?
Query current module version: at+ver
Command type | Grammar | Return and description |
---|---|---|
EO | at+ver=? | at+ver=HLK-RM58S(V1.00(Nov 30 2017)): current version |
Local port operation: at+CLport
Command type | Grammar | Return and description |
---|
EO
| ****
at+CLport=8080
| at+CLport=8080 Ok
Description: set the local port to port 8080
at+CLport=?
| at+CLport=? 8080
Description: Query local port
Set up serial Port: at+uart
Command Type | Grammar | Return and description |
---|
EO
| ****
at+uart=115200,8,n,1
| at+uart=115200,8,n,1 Ok
Description: Set up serial Port parameters
Query Command
| ****
at+uart=?
| at+uart=? 115200,8,n,1
Description:query serial port parameters
Set up DHCP: at+dhcpc
Command Type | Grammar | Return and description |
---|
EO
| ****
at+dhcpc=1
| at+dhcpc=1 ok
Query Command
| ****
at+dhcpc=?
| at+dhcpc=? 1
Description: 1: dhcp mode, 0: static ip
Set up wifi connection mode: at+netmode
Command Type | Grammar | Return and description |
---|
EO
| ****
at+netmode=3
| at+netmode=3 Ok
Description: set the module to ap mode
Query Command
| ****
at+netmode=?
| at+netmode=? 3
Description: 1: One-click distribution network 2: sta
mode, 3: 5.8G ap mode
Set up tcp connection mode: at+mode
Command Type | Grammar | Return and description |
---|
EO
| ****
at+mode=client
| at+mode=client Ok
Description: set the module to client mode
Query Command
| ****
at+mode=?
| at+mode=? client
Description: client: server:
Set up remote IP when modules work as client: at+remoteip
Command Type | Grammar | Return and description |
---|
EO
| ****
at+remoteip=192.168.11.102
| at+remoteip=192.168.11.102 ok
Description: set the remote ip of the mode
Query Command
| ****
at+remoteip=?
| at+remoteip=? 192.168.11.102
Description: query remote ip
Set up remote port when module act as client: at+remoteport
Command Type | Grammar | Return and description |
---|
EO
| ****
at+remoteport=1234
| at+remoteport=1234 ok
Description: set the remote port of the mode
Query Command
| ****
at+remoteport=?
| at+remoteport=? 1234
Description:query remote port
Set parameter submission: at+net_commit
Command Type | Grammar | Return and description |
---|
EO
| ****
at+net_commit=1
| at+net_commit=1 Ok
Description: submit setup parameters
System restart: at+reconn
Command Type | Grammar | Return and description |
---|---|---|
EO | at+reconn=1 | at+reconn=1 |
Description: Quit at command mode
EO
| ****
at+net_commit=1 at+reconn=1
| at+net_commit=1 ok
at+reconn=1 ok
Description: System restart
Set the module’s ssid and password: at+wifi_conf
Command Type | Grammar | Return and description |
---|
EO
| at+wifi_conf=HI-LINK_5FE8,n
one,12345678
| at+wifi_conf=HI-LINK_5FE8,none,12345678 ok
Description: set the ssid and password of the module
Query Command
| ****
at+wifi_conf=?
| at+wifi_conf=?
HI-LINK_5FE8,none,12345678
Description: Query the ssid and password of the module
Set up socket connection Protocol: at+remotepro
Command Type | Grammar | Return and description |
---|
EO
| ****
at+remotepro=tcp
| at+remotepro=tcp ok
Description: set the module socket protocol to tcp
Query Command
| ****
at+remotepro=?
| at+remotepro=? tcp
Description: query module socket connection protocol
Set network connection parameters: at+net_ip
Command Type | Grammar | Return and description |
---|
EO
| at+net_ip=192.168.16.254,255.
255.255.0,192.168.16.254
| at+net_ip=192.168.16.254,255.255.255.0,192.168.16.254
ok
Description: set the ip, gateway, dns of the module
Query Command
| ****
at+net_ip=?
| at+net_ip=? 192.168.16.254,255.255.255.0,192.168.16.254
Description: query module ip, gateway, dns
Query network connection status in STA mode: at+wifi_ConState
Command Type | Grammar | Return and description |
---|
Query Command
| ****
at+wifi_ConState=?
| at+wifi_ConState=? Disconnected
Description: in sta mode, the module wifi is not connected, and the
Connected indicates that the network is connected
Query module MAC address: at+Get_MAC
Command Type | Grammar | Return and description |
---|
Query Command
| ****
at+Get_MAC=? 40:D6:3C:15:5F:E8
| at+Get_MAC=? 40:D6:3C:15:5F:E8
Description: query module mac address
Set up frame length: at+uartpacklen
Command Type | Grammar | Return and description |
---|
EO
| ****
at+uartpacklen=64
| at+uartpacklen=64 ok
Description: Set the module’s frame length to 64 bytes.
Query Command
| ****
at+uartpacklen=?
| at+uartpacklen=? 64
Description: Query module’s frame length as 64 bytes.
Set up frame time: at+uartpacktimeout
Command Type | Grammar | Return and description |
---|
EO
| ****
at+uartpacktimeout=200
| at+uartpacktimeout=200 ok
Description: Set the module’s frame time is 200ms
Query Command
| ****
at+uartpacktimeout=?
| at+uartpacktimeout=? 200
Description: Query the module’s frame time as 200ms
AT command control code routine
Query configuration information
Code:
- char *query=”\\ // Defining a string pointer
- at+netmode=?\r\n\ // Query WiFi connection mode
- at+wifi_conf=?\r\n\ // Query the SSID and password of the module
- at+dhcpc=?\r\n\ // Query dhcp
- at+net_ip=?\r\n\ // Query module ip
- at+remoteip=?\r\n\ // Query remote ip
- at+remoteport=?\r\n\ // Query the port
- at+remotepro=?\r\n\ // Query socket connection protocol
- at+mode=?\r\n\ // Query tcp connection mode
- at+uart=?\r\n\ // Query the serial port parameter
- at+uartpacklen=?\r\n\ // Query serial port frame length
- at+uartpacktimeout=?\r\n\ // Query serial port frame time
- at+ver=?\r\n\ // Query firmware version number
- “;Com_send(query); // Send these data out of the serial port
Run back:
- at+netmode=? 0
- at+wifi_conf=? Hi-Link,wpa2_aes,12345678 at+dhcpd=? 0
- at+dhcpc=? 1
- at+net_ip=? 192.168.15.254,255.255.254.0,192.168.11.1
- at+remoteip=? 192.168.11.245
- at+remoteport=? 8080
- at+remotepro=? tcp
- at+mode=? server
- at+uart=? 115200,8,n,1
- at+uartpacklen=? 64
- at+uartpacktimeout=? 10
- at+ver=? V1.39(Dec 6 2012)
Serial to Wifi client (static ip address)
Code:
- char *commands_wifi_client_static=”\\
- at+netmode=2\r\n\ //Set to wireless network card sta mode
- at+wifi_conf=HI-LINK,wpa2_aes,12345678\r\n\ //Set wifi, encryption and password
- at+dhcpc=0\r\n\ //Use static ip mode
- at+net_ip=192.168.11.254,255.255.255.0,192.168.11.1\r\n\ // Set mode ip
- at+remoteip=192.168.11.245\r\n\ // Set the remote ip to be connected
- at+remoteport=8080\r\n\ // Set the remote port to be connected
- at+remotepro=tcp\r\n\ // Set socket’s connection methods
- at+mode=client\r\n\ //Use client mode to connect to the remote server
- at+uart=115200,8,n,1\r\n\ // Set the serial port parameter
- at+uartpacklen=64\r\n\ // Set the frame length
- at+uartpacktimeout=10\r\n\ // Set the frame time
- at+net_commit=1\r\n\ // Submit parameters
- at+reconn=1\r\n\”; // Restart the module
- Com_send(commands_wifi_client_static); //Send parameters out of the serial port
Run back:
- at+netmode=2 ok
- at+wifi_conf=HI-LINK,wpa2_aes,12345678 ok
- at+dhcpc=1 ok
- at+remoteip=192.168.11.245 ok
- at+remoteport=8080 ok
- at+remotepro=tcp
- at+mode=server
- at+uart=115200,8,n,1 ok
- at+uartpacklen=64 ok
- at+uartpacktimeout=10 ok
- at+net_commit=1
Serial to wifi server(dynamic ip address)
Code:
- char *commands_wifi_ap=”\
- at+netmode=2\r\n\ // Set to wireless network card mode
- at+wificonf=Hi-Link,wpa2_aes,0000000000\r\n\ // Set the hotspot name and password for the wifi connection
- at+dhcpc=1\r\n\ // Use dynamic way to get ip
- at+remoteport=8080\r\n\ // Set the local monitor port
- at+remotepro=tcp\r\n\ // Set socket’s connection methods
- at+mode=server\r\n\ // Socket as a server to connect
- at+uart=115200,8,n,1\r\n\ // Set serial port parameters
- at+uartpacklen=64\r\n\ // Set the frame length
- at+uartpacktimeout=10\r\n\ // Set the frame time
- at+net_commit=1\r\n\ // Submit parameters
- at+reconn=1\r\n\”; // Restart the module
- Com_send(commands_wifi_ap);
Run back:
- at+netmode=2 ok
- at+wifi_conf=HI-LINK,wpa2_aes,12345678 ok
- at+dhcpc=1
- at+remoteip=192.168.11.245 ok
- at+remoteport=8080 ok
- at+remotepro=tcp
- at+mode=server
- at+uart=115200,8,n,1 ok
- at+uartpacklen=64 ok
- at+uartpacktimeout=10 ok
- at+net_commit=1
Restore factory settings
- Code:
- char *commands_device_default=”\\
- at+default=1\r\n\ //Reset
- Com_send(commands_device_default);
- Run back:
- at+default=1
After 30s, the module starts normally and all configuration parameters are factory configured. More functions are configured with the serial port software, and the serial port on the left side of the software automatically generates the corresponding setting command.
Configuration Software Description
- command window to be sent
- serial port number selection
- mode selection
- wifi name and password
- network protocol selection
- serial port parameters
- commit configuration
- query configuration
- enter transparent mode
- restore factory setting
- serial return command
Upgrade Introduction
The upgrade of HLK-RM58S module can be carried out through serial port or network, and the appropriate upgrade method can be selected according to the field environment.
Introduction of Serial Port Upgrade Method
In the upgrade folder there is a img file, upgrade software mainly read the files inside to upgrade; There are three files in the img folder, where HLK- RM58S.img and HLK-RM58S (b.1.00.1 20180611182552). Img file contents are the same, only file names are different, HLK-RM58S (b.1.00.120180611182552). Txt records the default parameter for this firmware; HLK-RM58S (b.1.00.120180611182) 552) “is the firmware version number, when the module runs this firmware query version number and this version number the same, each firmware has a unique version number, automatically generated by the compilation system; When there is a new firmware to upgrade, the three files can be overwritten.
Open Serial Port upgrade Software
Open serial port upgrade software HLK-RM58S_uart.exe, input lowercase string
c, select serial port number, select the corresponding baud rate through
digital key 1 / 2 / 3 / 4
Start to upgrade
Enter the space bar, press and hold the ES0 (GPIO0) and RST (SYS_RST_N)
buttons at the same time, then release the button RST,0.5s then release the
button ES0, computer side software will automatically upgrade the module.
Introduction of Network upgrade methods
In order to realize the network upgrade of the module, it is necessary to
connect the line module through wifi, and then to upgrade the data
transmission according to the ip of the module.
Router Connection
Modules that need to be upgraded can be configured and connected to routers
through serial port configuration tools, or ap mode can be used.
Lookup module ip
Because you need to input the ip, of the module when upgrading, you can go to
the router to find the corresponding ip, of the module or use HLK-
RM58S_Discover to search the corresponding ip. for the module in the local
area network.
Program upgrades
Enter the module’s ip address on the software HLK-RM58S_wifi.exe, and then
enter:
Appears as shown in the figure to indicate that the upgrade is in progress
Appears as Update finish!, indicates upgraded successfully.
Restoration of factory setting method
Press the ES0 button on the base plate for 6 seconds to restore the factory
setting Integration instructions for host product manufacturers according to
KDB 996369 D03 OEM Manual v01
Version No. | Revised scope | Date |
---|---|---|
V1.21 | Power supply changed from 3.3v to 5v | |
V1.22 | Add upgrade function description |
V1.23
| Add the instruction of the at command netmode, update the picture of the serial port configuration tool
Add wifi, socket indicated pin description
Add one-click distribution description, web set description
|
V1.25| Add AT command sample code|
V1.26| Add demo code description|
RF exposure considerations
This equipment complies with the FCC RF radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with a minimum distance of 20cm between the radiator and any part of your body.
Antennas
Antenna Specification are as follows:
- Type: Internal Antenna
- Gain: 5.2G WiFi: 3.0 dBi, 5.8G WiFi: 2.0 dBi
Label and compliance information
Remind end customers to add “Contain FCC ID: 2AVZEMRMCRUS20PT-01”.
FCC Warning
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
- This device may not cause harmful interference, and
- this device must accept any interference received, including interference that may cause undesired operation.
Any changes or modifications to this unit not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
- Reorient or relocate the receiving antenna.
- Increase the separation between the equipment and receiver.
- Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
- Consult the dealer or an experienced radio/TV technician for help.
Information that must be placed in the end user manual:
The OEM integrator has to be aware not to provide information to the end user
regarding how to install or remove this RF module in the user’s manual of the
end product which integrates this module. The end user manual shall include
all required regulatory information/warning as show in this manual.
OEM integration instructions:
This device is intended only for OEM integrators under the following conditions: The transmitter module may not be co-located with any other transmitter or antenna. The module shall be only used with the external antenna(s) that has been originally tested and certified with this module. As long as the conditions above are met, further transmitter test will not be required. However, the OEM integrator is still responsible for testing their end-product for any additional compliance requirements required with
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>