ESP8266 WiFi Bee: Setting an Access Point with AT commands

The objective of this post is to explain how to set an access point using a ESP8266 WiFi Bee board from DFRobot and the pre-loaded firmware that supports AT commands.


Introduction

The objective of this post is to explain how to set an access point using a ESP8266 WiFi Bee board from DFRobot and the pre-loaded firmware that supports AT commands. We will use the Arduino IDE serial monitor to send the commands to the board.


Interacting with the module

As usual, after opening the serial monitor and receiving the ready message, we will send the AT command, just to confirm that we can talk to the WiFi Bee and we get an answer.

After that, we will set the WiFi mode, so the device operates both as station and access point. To do so, we just send the following command:

AT+CWMODE=3

We should get an OK message, as indicated in figure 1. Please note that more WiFi modes are supported. The various options are documented in the AT command firmware manual.

WiFi Bee set WiFi Mode AT command

Figure 1 – Output of the AT command to set the WiFi mode.

Then, we will configure the access point we are setting with the AT+CWSAP command. This command receives as parameters the name of the network we are setting, the password, the channel and the encryption mode. Note that this last parameter is passed as a number, with the options available listed bellow:

  • 0 – Open
  • 2 – WPA_PSK
  • 3 – WPA2_PSK
  • 4 – WPA_WPA2_PSK

We are going to call our network “ESP”, set a password equal to “password”, define channel 1 and encryption type equal to WPA_WPA2_PSK. Check the command we need to send to the device bellow:

AT+CWSAP=”ESP”,”password”,1,4

The result of the command is shown in figure 2. As can be seen, an OK message should be returned if everything is correctly configured.

WiFi Bee set AP configs

Figure 2 – Setting the AP configurations.

Our new network should be accessible from other devices. As can be seen in figure 3, it shows on Windows 8 available networks. Connect to it from a device using the previously defined password.

WiFi Bee AT command created network

Figure 3 – Created WiFi network showing on the list of available networks in Windows 8.

To finish this tutorial, we will check the IP of devices that have joined the network. To do so, we just sent the AT+CWLIF command. As can be seen in the figure bellow, both the IP assigned to the device and its MAC are shown.

WiFi Bee showing Soft AP devices connected IPs

Figure 4 – IP and MAC addresses of the device previously connected to the ESP8266 access point.


Related content


Related Posts

Advertisements
This entry was posted in ESP8266 and tagged , , , , , . Bookmark the permalink.

4 Responses to ESP8266 WiFi Bee: Setting an Access Point with AT commands

  1. ARJ says:

    see my last post

    CYOL 001

    CYOL ~ Create Your Own Lang

    Like

  2. dfrobots says:

    Reblogged this on DFRobot and commented:
    useful~

    Like

  3. Pingback: ESP8266 WiFi Bee: Setting an Access Point with AT commands – ToberWell

  4. Pingback: ESP8266 WiFi Bee: Setting an Access Point with AT commands – DFRobot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s