![Hi-Link HLK-RM58S User Manual Download Page 21](http://html1.mh-extra.com/html/hi-link/hlk-rm58s/hlk-rm58s_user-manual_2128955021.webp)
18
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+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