Shenzhen HI-Link Electronic Co.,Ltd User Manual Version: V1.1 Revised date: 2017-1-16 Copr by Hi-link Electronic Co., Ltd.
Content 1. Product profile ..........................................................................................................................................................1 1.1 Overview ........................................................................................................................................................1 1.2 Product Characteristics ...................................................................................................................................
4. AT command control code routine...........................................................................................................................16 4.1 Query configuration information...................................................................................................................16 4.2 Serial to wifi client (static ip address)...........................................................................................................17 4.
1. Product profile 1.1 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.
1.4 Technical Specifications Table 1 Product Technical specifications Module HLK-RM58S Model Plug-in Package Wireless standard IEEE 802.11 a/n Frequency range 5150-5250MHz, 5725-5825MHz 802.11n: +13 +/-2dBm Wireless Transmitting power parameter 802.11a: +15 +/-2dBm 802.11n: -73.6dBm Receiving sensitivity 802.11a: -75.
Pin Network Name Type 1 GND Ground I/O Explanation Ground ES0 pin, pull down 1 second, serial 0 into AT command mode ;Pull down ≥ 8 seconds, restore factory default parameter settings 2 GPIO0 3 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
27 NC NC 28 NC NC 29 NC NC 30 SYS_RST_N 31 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 1.
1.7 Mechanical dimensions Unit: mm (mm) Figure 3 Module detail dimensions 2. Functional Description HLK-RM58S supports serial port to WIFI STA, serial to WIFI AP mode. 2.1 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.
2.2 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. 2.3 Socket connection status indicator pin The GPIO59 pin is used as the indicator pin of the module socket's connection status.
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. Figure 5 Set to one-click distribution mode 2.5 Web distribution function When the module is in ap mode, input 192.168.16.254 in the browser, and then input the account and password admin, later enter the web page setting interface.
2.6 Serial to WIFI STA Figure 7 Module as STA The module converts the serial port data into wifi data to achieve the purpose of networking. 2.7 Serial to WIFI AP Figure 8 Module work as ap In AP mode, mobile phone, PC or other wifi devices can be connected to RM58S module through wifi, and serial port devices can transmit data through RM58S module and other wifi devices.
2.8 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.
2.9.2 Module as TCP Client TCP Server TCP Client Figure 11 TCP Client In this mode, the module will actively connect to the specified IP, port, all the data sent from the TCP Server end is sent directly to the serial port, and the data from the serial port to the TCP Server side. Abnormal network disconnection can result in active re-connection of the module. 2.9.3 Module as UDP Server UDP Client UDP Server Figure 12.
2.9.4 Module as UDP Client UDP Server UDP Client Figure 13. 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. 2.
3.1 Query current module version: at+ver Grammatical rules: Command type Grammar Return and description EO at+ver=? at+ver=HLK-RM58S(V1.00(Nov 30 2017)): current version 3.2 Local port operation: at+CLport Command type Grammar Return and description at+CLport=8080 at+CLport=8080 Ok Description: set the local port to port 8080 EO at+CLport=? at+CLport=? 8080 Description: Query local port 3.
3.5 Set up wifi connection mode: at+netmode Command Type EO Grammar Return and description at+netmode=3 Ok Description: set the module to ap mode at+netmode=3 at+netmode=? Query Command 3 at+netmode=? Description: 1: One-click distribution network 2: sta mode, 3.6 3: 5.
3.9 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 3.10 System restart: at+reconn Command Type Grammar EO at+reconn=1 at+net_commit=1 EO 3.
3.14 Query network connection status in STA mode: at+wifi_ConState Command Type Grammar Return and description at+wifi_ConState=? Query Command at+wifi_ConState=? Disconnected Description: in sta mode, the module wifi is not connected, and the Connected indicates that the network is connected 3.15 Query module MAC address: at+Get_MAC Command Type Query Command 3.
4. AT command control code routine 4.1 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
4.2 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 conne
4.3 Serial to wifi server(dynamic ip address) Code: char *commands_wifi_ap="\ at+netmode=2\r\n\ // Set to wireless network card mode at+wifi_conf=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+u
4.4. 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. 4.5 Configuration Software Description Figure 14.
3: mode selection 4: wifi name and password 5: network protocol selection 6: serial port parameters 7: commit configuration 8: query configuration 9: enter transparent mode 10: restore factory setting 11: serial return command 5. 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. 5.
5.1.1 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 Figure 16. Serial upgrade interface 5.1.2 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. Figure 17.
5.2.1 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. 5.2.2 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. Figure 18. Lookup module ip 5.2.
Appears as shown in the figure to indicate that the upgrade is in progress Figure 20. Upgrade in progress Appears as Update finish!, indicates upgraded successfully. Figure 21. Upgrade completed (If your computer turns on a dual network card, you may not be able to upgrade and you will need to shut down a network card, if it is generated by the installation virtual machine.) 6. Restoration of factory setting method Press the ES0 button on the base plate for 6 seconds to restore the factory setting.
Version No. Revised scope 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 Date Integration instructions for host product manufacturers according to KDB 996369 D03 OEM Manual v01 2.
FCC Warning This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference, and (2) 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.