Skip to content
Discussion options

You must be logged in to vote

I don't think it's necessary to modify the "network_wlan.c" code to enable both STA and AP simultaneously. All you need to do is the following:

import network
from time import sleep

STI, STK = "wifi-234", "KeyMeIn123"   # your Wifi cred
API, APK = "my_ap_id", "my_ap_pwd"    # what your AP looks like

APIP = ('10.10.6.1', '255.255.255.0', '10.10.6.1', '10.10.6.255')  # your AP network

# Station
sta = network.WLAN(network.STA_IF)
sta.active(True)
sta.connect(STI, STK)
while (sta.isconnected() == False):
   print('Sta not ready!')
   sleep(1)
else:
   print('Connected to external Wi-Fi with IP:', sta.ifconfig()[0])

# Access point
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(e…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lbuque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
2 participants