ESP32:How to use micopython ethernet to ap?How to route ethernet to ap?
import network
import time
from machine import Pin
lan = network.LAN(mdc=Pin(16), mdio=Pin(17), power=None, id=None, phy_addr=1, phy_type=network.PHY_LAN8720)
try:
lan.active(True)
except Exception as err:
print("err:", err)
ret = lan.ifconfig()
print(ret)
ap = network.WLAN(network.AP_IF) # create access-point interface
ap.config(essid='ESP-AP') # set the ESSID of the access point
ap.config(max_clients=10) # set how many clients can connect to the network
ap.active(True) # activate the interface
ap.ifconfig()
print("ap ip:", ap.ifconfig())
Lan and ap can get the right ip. Lan can connect to the ethernet,but my phone conncet the ap but can not conncet to ethernet.
How to connect to an ESP32 from a mobile application?
I want to communicate ESP32 with my mobile app. I done micopython coding as follows :
import network
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid='ESP32')
ap.config(authmode=3, password='123456789')
In this code Access point is created and it is visible in my android mobile.
But when i connect my mobile to access point it is showing “saved” message instead of “connected” even though i have entered correct password.
I followed same procedure using arduino code then i am able to connect my mobile with access point created by esp32. Any help is highly appreciable .