AP mode and STA mode at the same time

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

AP mode and STA mode at the same time

Post by liudr » Wed Aug 01, 2018 3:45 pm

I am using loboris firmware but my question applies to the official firmware as well.

I want to set up a data logger with ESP32. Apparently if I set it up in AP mode and enable FTP server, I can use a computer to download data files off the logger. This is easy since the AP's IP address is always 192.168.1.1 and everyone with a smart phone or laptop knows how to connect to a router.

On the other hand, a remote chance exists that the data logger is near a wifi hotspot (say I set one up for it) and can use it for uploading data to the internet. This requires the logger to be in STA mode. My limited experience with ESP8266 tells me that I can have both enabled. I wonder if this is still the case in ESP32 (not covered in the sticky post about ESP8266 vs. ESP32). In case this can be done on ESP32, how is routing working? I've tried to enable FTP server while on AP mode. Had success connecting to it. Then when I activate STA mode, FTP server can't be started. It says wrong wifi mode.

Post Reply