• 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

ESP32 Acces point mode password with micropython

Q&A Forum › Category: ESP32 › ESP32 Acces point mode password with micropython
0 Vote Up Vote Down
Ilyas Ewan asked 4 years ago

Hi everybody,
I’m trying to set my ESP32 in Acces point mode , and i’m using the code bellow, the ESP32 AP ssid gives the acces to clients without demanding password . the acces stay open. can you help me please to resolve this issue?
Thanks.
from machine import Pin
import network
import esp
esp.osdebug(None)
import gc
gc.collect()
ssid = ‘on-AP’
password= ‘12345678’
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid=ssid, password=password)
while ap.active() == False:
pass
print(‘Connection successful’)
print(ap.ifconfig())

Question Tags: Acces point, AP, MicroPython, password, ssid
6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Can you provide more details about your project?
Do you have a boot.py and a main.py file?
Are you sure you are uploading all the necessary files if that’s the case?
Regards,
Sara

0 Vote Up Vote Down
Ilyas Ewan answered 4 years ago

 
Hi Sara,
I’m using the same code provided in the tutorial “MicroPython: ESP32/ESP8266 Access Point (AP)” without make any changes in order to see the hello world ! page .
the issue is that when i check the status of the network with ssid = ‘on-AP’ the network stays open without requesting the password .
in this case everyone can connect to the Acces point(esp32) without need of password.
Regards,
Ilyas
 
 

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

Hi Ilyas.
 
I tested the code and got the same result as yours.
I’m not sure why that is happening. Maybe it is related to some update on the firmware because it was working before.
Can you try adding the following line

ap.config(authmode=3)

after this:

ap.config(essid=ssid, password=password)

Then, let me know the result.
Regards,
Sara

0 Vote Up Vote Down
Ilyas Ewan answered 4 years ago

It Works , thank you very much Sara !!
Should i use a precise firmware version in order to have better comptibility with your tutorials code ?
Thanks

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

Hi.
It is always better to use the most updated version.
Most of the things keep compatible with older versions.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

0 Vote Up Vote Down
Ilyas Ewan answered 4 years ago

Perfect !

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.