Page 20 / 30
at+mode=? server
at+uart=? 115200,8,n,1
at+uartpacklen=? 64
at+uartpacktimeout=? 10
at+ver=? V1.39(Dec 6 2012)
4.2. Serial port 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 method and
password
at + dhcpc = 0 \ r \ n \ // Use static IP method
at + net_ip = 192.168.11.254,255.255.255.0,192.168.11.1 \ r \ n \ // Set the module's IP
at + remoteip = 192.168.11.245 \ r \ n \ // Set the IP to be connected to the remote end
at + remoteport = 8080 \ r \ n \ // Set the port to be connected at the remote end
at + remotepro = tcp \ r \ n \ // Set the socket connection method
at + mode = client \ r \ n \ // Use client mode to connect to remote server
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_client_static); // Send parameters from the serial port