• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

choose Wi-Fi network to connect to from my esp32,

Q&A Forum › Category: ESP32 › choose Wi-Fi network to connect to from my esp32,
0 Vote Up Vote Down
Cristian Luna asked 5 years ago

Hello, I would like to be able to choose which Wi-Fi network to connect to from my esp32, so far I have not been able to do so.
Could you help me

 

Question Tags: ssid wifi ssid
8 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Cristian.
Can you provide more details about what you’re trying to achieve?
Also, what do you have built so far? Do you get any errors? 
Do you want something like a “Wi-Fi Manager”?
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 5 years ago

I’m guessing Cristian would like to be able to select the WiFi SSID to connect to somehow rather than hard coding into the sketch. That’s something I would like to be able to do as well.
i have been theorizing on it. I believe the preferences library is what we need to use. In the setup function check whether there is an SSID and password. If not create a soft access point and web page at 192.168.4.1 that will show all WiFi SSIDs in range probably in a pop up menu. Then you need a text box for the password. Once submitted try to connect. If that works save to preferences and reboot the ESP32. Now it’s available the setup function can directly connect.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

You can follow this discussion for more information: https://rntlab.com/question/esp32-wifimanager/
Unfortunately, we don’t have a complete example about setting that up.
You’ll probably need to combine some of our tutorials to do that.
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 5 years ago

I found this which looks up to date and has extensive documentation.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Thanks for sharing 🙂

0 Vote Up Vote Down
Cristian Luna answered 5 years ago

I thank everyone for the help, I will try the one that Steve makes, of all the ones that I tried the most versatile is <https://github.com/Hieromon/AutoConnect> and the last update is three months ago.
I will keep testing and comment if there is one that works better.
Regards

0 Vote Up Vote Down
Steph answered 5 years ago

You can also develop it yourself!
It’s an excellent exercise 😉
The icing on the cake is to implement a captive portal as well…

0 Vote Up Vote Down
Steve Mercer answered 5 years ago

Thanks for that link Christian. I’ll check it out.
 
I’m not a big fan of reinventing the wheel and will use other examples to build by own. I will probably take bits from both of these and toss out the bits I don’t need.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.