Page 19 / 30
4. AT instruction control code routine
4.1. Query Configuration Information
Code:
char * query = "\\ // define string pointer
at + netmode =? \ r \ n \ // Query WiFi connection mode
at + WiFi_conf =? \ r \ n \ // Query module ssid and password
at + dhcpc =? \ r \ n \ // Query dhcp
at + net_ip =? \ r \ n \ // Query module IP
at + remoteip =? \ r \ n \ // Query the 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 serial port parameters
at + uartpacklen =? \ r \ n \ // Query the frame length of the serial port
at + uartpacktimeout =? \ r \ n \ // Query the frame time of the serial port
at + ver =? \ r \ n \ // Query firmware version number
";
Com_send (query); // Send these data from the serial port
Running returns:
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