I would like to run my ESP32-WROOM-32 in wifi softAP and station mode simultaneously

HoldMyBeer
Posts: 4
Joined: Tue Dec 14, 2021 12:37 pm

I would like to run my ESP32-WROOM-32 in wifi softAP and station mode simultaneously

Postby HoldMyBeer » Thu Dec 16, 2021 5:35 am

I have gone through the examples given for ESP-IDF. I successfully used the mcu in softAP mode, and then in station mode. But I want to use it in softAP and station mode at the same time. I edited the station code and added the softAP mode functionalities to it. I changed the mode from WIFI_MODE_STA to WIFI_MODE_APSTA, added AP config details (ssid, password, channel) in the wifi_config struct, so that it will not also have AP mode. But when I flash it on the mcu, it still acts in only softAP mode and doesn't act as a station. It keeps trying to connect to an AP and finally after the max connection tried is overflown, it gives the message "connect to the AP failed." Any thoughts on how I can solve this issue? I can share the code also if needed.

Also, another question. If I use the mcu in softAP + station mode, then if I connect from another device to the mcu, will I get internet since the mcu is also connected to a router via station mode?

Who is online

Users browsing this forum: Baidu [Spider], ok-home and 339 guests