Home » NodeMCU » Creating NodeMCU WiFi Access Point
NodeMCU WiFi Access Point

Creating NodeMCU WiFi Access Point

You can use WiFi with the NodeMCU (ESP8266) even without a WiFi router. All you need to do is create a NodeMCU WiFi Access Point and the device will now act as a WiFi gateway.

NodeMCU WiFi Access Point Code

For this tutorial, we will modify the code shown on my NodeMCU web server article. The example code below also uses the same schematic (a LED on D7).

You'll see that we used WiFi.softAP() instead of WiFi.begin() (on line 22) --- this creates the NodeMCU WiFi access point. Then to print the NodeMCU's ip, which we need to view the server page, we use WiFi.softAPIP() (line 34).

Upload the code above to your NodeMCU. If successful, the device should be visible as a WiFi access point with the SSID and password you specified in the code above.

You can also use this method to send data between two NodeMCUs. Basically, one device acts as a client and one as a server and also as the access point. The data will only be between the two and so will be much more secure compared to having a WiFi gateway/router.

Check Also

NodeMCU Webserver

NodeMCU MQTT Tutorial

So far, we've been using HTTP in our NodeMCU web servers and while it works, …

Leave a Reply

Your email address will not be published. Required fields are marked *