User's Manual

User Manual
20 30
HLK-B35
4. AT command control code example
4.1. Query configuration information
code
char *query="\ //Define string pointer
at+ver=?\r\n\"; //Query the firmware version number
at+uart=?\r\n\ //Query serial port parameters
at+netmode=?\r\n\ //Query distribution method
at+mode=?\r\n\ //Query tcp connection mode
at+dhcpc=?\r\n\ //Query dhcp
Com_send(query); //Send these data out from the serial port
feedback
at+ver=?
HLK-B35(V1.00Nov 18 2020-23:54:48)
at+uart=?
115200,8,n,1
at+netmode=?
2
at+mode=?
client
at+dhcpc=?
1
4.2. Configure the module as a client (static ip address)
code
char *commands_wifi_client_static="\
at+uart=115200,8,n,1\r\n\ //Set serial port parameters
at+netmode=2\r\n\ //Set the module to STA mode
at+wifi_conf=HI-LINK,wpa2_aes,12345678\r\n\ //Set the name, encryption method and
password of the connection route
at+dhcpc=0\r\n\ //Use static IP
at+net_ip=192.168.8.35,255.255.255.0,192.168.8.5\r\n\ //Set the IP of the module