ESP8266: Configure as a Station / Client

Wire & configure ESP8266 07 Wi-Fi Module

The ESP8266 Wi-Fi module can function as a Station / Client which allows other Access Points (APs) to connect to it. Station (STA) mode is useful when the module will only send / push data to another device as opposed to receiving / serving data. Prior to setting up the module as a Station, wire & configure ESP8266 module. It is also possible to configure ESP8266 module as an Access Point or both AP and STA modes simultaneously.

 

Connect to an Access Point

Search for and list available wireless networks.

AT+CWLAP

 

Connect to a wireless network.

AT+CWJAP="SSID","PASS"

Command takes 2 arguments, SSID which is the name of the network and the PASS which is the password of the same network.

 

Verify the connection was successful.

AT+CWJAP?

 

Disconnect from the Access Point.

AT+CWQAP

 

Set ESP8266 Station IP Address

Get the IP address of the Station / Client.

AT+CIPSTA?

 

Set the IP address of the Station / Client.

AT+CIPSTA="192.168.0.101"

 

Set ESP8266 Station MAC Address

Get the MAC address of the Station / Client.

AT+CIPSTAMAC?

 

Set the MAC address of the Station / Client.

AT+CIPSTAMAC="1a:fe:34:a4:35:42"

 

Once the module has been configured in Access Point, Station or both modes simultaneously it can be used to send & receive data.