← index #7699Issue #3518
Off-topic · high · value 1.572
QUERY · ISSUE

ESP32:How to use micopython ethernet to ap?How to route ethernet to ap?

openby OceanSeekopened 2021-08-24updated 2021-08-26
port-esp32

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.

CANDIDATE · ISSUE

How to connect to an ESP32 from a mobile application?

closedby ShrikantKumbharopened 2017-12-26updated 2019-06-24
port-esp32

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 .

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied