# esp-idf-wifi-apsta
Example to WIFI_MODE_APSTA with esp-idf.
esp-idf contains examples in station mode (WIFI_MODE_STA) and softap mode (WIFI_MODE_AP), but there are no examples in apsta mode (WIFI_MODE_APSTA).
I referred [here](https://esp32.com/viewtopic.php?t=10619).
The ESP32 chip has the following four MAC addresses:
- MAC for WiFi STA mode
- MAC for WiFi AP mode
- MAC for Bluetooth
- Mac for Ethernet
The ESP32-S2 chip has the following two MAC addresses:
- MAC for WiFi STA mode
- MAC for WiFi AP mode
Since it has a STA mode MAC and an AP mode MAC separately, STA mode and AP mode work at the same time.
The result is the same whether you configure AP mode and STA mode individually or configure them all at once in APSTA mode.
# Software requirements
esp-idf ver4.1 or later.
# Install for ESP32
```
git clone https://github.com/nopnop2002/esp-idf-wifi-apsta
cd esp-idf-wifi-apsta
idf.py set-target esp32
idf.py menuconfig
idf.py flash monitor
```
# Install for ESP32-S2
```
git clone https://github.com/nopnop2002/esp-idf-wifi-apsta
cd esp-idf-wifi-apsta
idf.py set-target esp32s2
idf.py menuconfig
idf.py flash monitor
```
- WIFI_CONNECT
Select the Wifi connection method from the following:
Connect to Wifi using AP mode.
Connect to Wifi using STA mode.
Connect to Wifi using APSTA mode.
- AP_WIFI_SSID
WiFi SSID of AP mode
- AP_WIFI_PASSWORD
WiFi Password of AP mode
- AP_WIFI_CHANNEL
WiFi Channel of AP mode
- AP_MAX_STA_CONN
Max number of the STA connects to AP
- STA_WIFI_SSID
WiFi SSID of STA mode
- STA_WIFI_PASSWORD
WiFi Password of STA mode
- STA_CONNECT_TIMEOUT
Connect timeout of STA mode
![config-main](https://user-images.githubusercontent.com/6020549/101855573-0090d100-3ba7-11eb-923f-b48a4c937085.jpg)
- AP Mode
![config-ap](https://user-images.githubusercontent.com/6020549/107764961-600c8800-6d74-11eb-8353-9293c5927dcc.jpg)
- STA Mode
![config-sta](https://user-images.githubusercontent.com/6020549/107764963-613db500-6d74-11eb-80c5-d8de7d933b7d.jpg)
- APSTA Mode
![config-apsta](https://user-images.githubusercontent.com/6020549/107764962-613db500-6d74-11eb-9ab4-09c3dcce00bd.jpg)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
esp-idf-wifi-apsta 带有esp-idf的WIFI_MODE_APSTA示例。 esp-idf包含站点模式(WIFI_MODE_STA)和软ap模式(WIFI_MODE_AP)中的示例,但没有apsta模式(WIFI_MODE_APSTA)中的示例。 我提到。 ESP32芯片具有以下四个MAC地址: MAC用于WiFi STA模式 MAC用于WiFi AP模式 蓝牙MAC Mac版以太网 ESP32-S2芯片具有以下两个MAC地址: MAC用于WiFi STA模式 MAC用于WiFi AP模式 由于它分别具有STA模式MAC和AP模式MAC,因此STA模式和AP模式可以同时工作。 无论您分别配置AP模式和STA模式还是在APSTA模式下一次配置它们,结果都是相同的。 软件需求 esp-idf ver4.1或更高版本。 为ESP32安装 git clone ht
资源详情
资源评论
资源推荐
收起资源包目录
esp-idf-wifi-apsta-main.zip (8个子文件)
esp-idf-wifi-apsta-main
Makefile 190B
LICENSE 1KB
README.md 2KB
main
component.mk 146B
Kconfig.projbuild 2KB
main.c 6KB
CMakeLists.txt 85B
CMakeLists.txt 242B
共 8 条
- 1
BugHunter666
- 粉丝: 22
- 资源: 4699
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1