Skip to content

Commit 84c851b

Browse files
committed
feat(4g_ppp): esp32p4 support create AP with c6
1 parent 40e383f commit 84c851b

File tree

9 files changed

+20
-18
lines changed

9 files changed

+20
-18
lines changed

docs/en/usb/usb_host/usb_ppp.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ The following table lists the supported 4G module models. They can be configured
3333
+=================+
3434
| ML302-DNLM/CNLM |
3535
+-----------------+
36+
| NT26 |
37+
+-----------------+
3638
| EC600NCNLC-N06 |
3739
+-----------------+
3840
| AIR780E |

docs/zh_CN/usb/usb_host/usb_ppp.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ PPP 是一种网络中最为基础的协议。PPP 协议(Point-to-Point Protoc
3333
+=================+
3434
| ML302-DNLM/CNLM |
3535
+-----------------+
36+
| NT26 |
37+
+-----------------+
3638
| EC600NCNLC-N06 |
3739
+-----------------+
3840
| AIR780E |

examples/usb/host/usb_cdc_4g_module/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This example demonstrates the **ESP32-S2**, **ESP32-S3** series SoC as a USB host to dial-up 4G Cat.1 through PPP to access the Internet, with the help of ESP32-SX Wi-Fi softAP function, share the Internet with IoT devices or mobile devices. Realize low-cost "medium-high-speed" Internet access.It is also equipped with a router management interface, which allows you to configure the router online and view the information of connected devices.
66

7-
In addition, the **ESP32-P4** supports the 4G Cat.4 module (EC20) with faster speeds, but it currently only supports internet access for itself.
7+
In addition, the **ESP32-P4** supports the 4G Cat.4 module (EC20) with faster speeds. It can also enable hotspot sharing by connecting an external ESP32 chip with Wi-Fi capability.
88

99
**Features Supported:**
1010

@@ -236,7 +236,3 @@ Enable the `4G Modem Configuration -> Dump system task status` option in `menuco
236236
237237
> **4G Cat.1 theoretical peak download rate is 10 Mbps, peak upload rate is 5 Mbps**
238238
> The actual communication rate is affected by the operator's network, test software, Wi-Fi interference, and the number of terminal connections, etc.
239-
240-
## Known Issues
241-
242-
* ESP32-P4 currently does not support enabling the softAP function via `esp_wifi_remote`.

examples/usb/host/usb_cdc_4g_module/README_cn.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
该示例程序可实现 **ESP32-S2****ESP32-S3** 系列 SoC 作为 USB 主机驱动 4G Cat.1 模组 PPP 拨号上网,同时可开启 ESP32-SX Wi-Fi AP 功能,分享互联网给物联网设备或手持设备,实现低成本 “中高速” 互联网接入。同时配有路由器管理界面,可以在线进行路由器配置和查看已连接设备信息。
66

7-
此外对于 **ESP32-P4** 支持了 4G Cat.4 模组(EC20),速率更快,暂时仅支持自身上网功能
7+
此外对于 **ESP32-P4** 支持了 4G Cat.4 模组(EC20),速率更快。并可通过外挂 ESP32 带 Wi-Fi 版本芯片实现热点共享
88

99
**已实现功能:**
1010

@@ -231,14 +231,10 @@ I (13855) 4g_router_server: Starting webserver
231231
232232
**测试结果:**
233233
234-
| 测试项 | 峰值 | 平均 |
235-
| :----: | :------: | :------: |
236-
| 下载 | 6.4 Mbps | 4 Mbps |
237-
| 上传 | 5 Mbps | 2 Mbps |
234+
| 测试项 | 峰值 | 平均 |
235+
| :----: | :------: | :----: |
236+
| 下载 | 6.4 Mbps | 4 Mbps |
237+
| 上传 | 5 Mbps | 2 Mbps |
238238
239239
> **4G Cat.1 理论峰值下载速率 10 Mbps,峰值上传速率 5 Mbps**
240240
> 实际通信速率受运营商网络、测试软件、Wi-Fi 干扰情况、终端连接数影响,以实际使用为准
241-
242-
## 已知问题
243-
244-
* ESP32-P4 暂不支持通过 esp_wifi_remote 开启 softAP 功能。

examples/usb/host/usb_cdc_4g_module/main/Kconfig.projbuild

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,14 @@ menu "4G Modem Example Config"
8787

8888
config EXAMPLE_LED_RED_SYSTEM_GPIO
8989
int "System status led (red) gpio, set 0 if not use"
90+
default 21 if IDF_TARGET_ESP32P4
9091
default 15
9192
config EXAMPLE_LED_BLUE_WIFI_GPIO
9293
int "Wi-Fi status led (blue) gpio, set 0 if not use"
94+
default 22 if IDF_TARGET_ESP32P4
9395
default 17
9496
config EXAMPLE_LED_GREEN_4GMODEM_GPIO
9597
int "Modem status led (green) gpio, set 0 if not use"
98+
default 26 if IDF_TARGET_ESP32P4
9699
default 16
97100
endmenu

examples/usb/host/usb_cdc_4g_module/main/app_main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,9 @@ void app_main(void)
248248
modem_http_init(&s_modem_wifi_config);
249249
#endif
250250

251-
#if !CONFIG_IDF_TARGET_ESP32P4
252251
esp_netif_t *ap_netif = modem_wifi_ap_init();
253252
assert(ap_netif != NULL);
254253
ESP_ERROR_CHECK(modem_wifi_set(&s_modem_wifi_config));
255-
#endif
256254

257255
#ifdef CONFIG_EXAMPLE_PING_NETWORK
258256
ip_addr_t target_addr;

examples/usb/host/usb_cdc_4g_module/main/idf_component.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ dependencies:
88
iot_usbh_modem:
99
version: "^1.1.0"
1010
override_path: "../../../../../components/usb/iot_usbh_modem"
11+
espressif/esp_wifi_remote:
12+
version: "^0.9.0"
13+
rules:
14+
- if: "target in [esp32p4]"
1115
espressif/esp32_s3_usb_otg:
1216
version: "^1.5.1"
1317
rules:

examples/usb/host/usb_cdc_4g_module/sdkconfig.defaults

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
2121
CONFIG_LWIP_PPP_PAP_SUPPORT=y
2222
CONFIG_IN_TRANSFER_BUFFER_SIZE=1024
2323
CONFIG_OUT_TRANSFER_BUFFER_SIZE=1024
24-
CONFIG_IN_RINGBUFFER_SIZE=2048
25-
CONFIG_OUT_RINGBUFFER_SIZE=2048
24+
CONFIG_IN_RINGBUFFER_SIZE=4096
25+
CONFIG_OUT_RINGBUFFER_SIZE=4096
2626
CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE=1024
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
CONFIG_EXAMPLE_AUTO_UPDATE_DNS=n
22
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_2m_app.csv"
3+
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y

0 commit comments

Comments
 (0)