forked from espressif/esp-iot-solution
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/usb_device_msc_support_v4.4' into 'master'
device msc: Support release/v4.4 See merge request ae_group/esp-iot-solution!804
- Loading branch information
Showing
9 changed files
with
63 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
## USB MSC 无线磁盘 | ||
|
||
使用 ESP32-Sx 作为带有无线访问功能的 USB 磁盘。HTTP 文件服务器可用于上传和下载文件。 | ||
|
||
**此演示仅用于功能预览,如果您发现错误请不要感到意外** | ||
|
||
### 硬件 | ||
|
||
- 开发板:ESP32-S3-USB-OTG,或任何 ESP32-Sx 开发板 | ||
- 微控制器(MCU):ESP32-S2,ESP32-S3 | ||
- Flash 存储:4MB NOR Flash | ||
- 硬件连接: | ||
- GPIO19 连接到 D- | ||
- GPIO20 连接到 D+ | ||
- SD 卡 IO 根据不同的开发板而异,您可以在代码中自定义定义。 | ||
|
||
注意:如果您使用的是自供电设备,请参考[自供电设备](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/usb_device.html#self-powered-device) | ||
|
||
### 功能 | ||
|
||
1. 支持 USB MSC,可以通过主机读写板载 Flash 或 SD 卡; | ||
2. 通过 Wi-Fi 下载和上传数据,ESP32-SX 可以作为 Wi-Fi AP 或 STA。 | ||
|
||
### 如何使用 | ||
|
||
1. 使用微型 USB 电缆直接插入主机的 USB 端口; | ||
2. 默认情况下,在您的“文件资源管理器”中可以找到一个大小为 `1.5MB` 的磁盘; | ||
3. 通过 Wi-Fi 连接到 ESP32S2,SSID:`ESP-Wireless-Disk`,默认没有密码; | ||
4. 在浏览器中输入 `192.168.4.1`,您可以查看磁盘上的文件列表; | ||
5. 拖放到磁盘的任何文件都将显示在网页中; | ||
6. 从网页上传的任何文件也会显示在磁盘中(此演示中文件大小必须小于 20MB)。 | ||
|
||
### 配置 Wi-Fi | ||
|
||
* 您可以在 `menuconfig → USB MSC Device Demo → Wi-Fi Settings` 中配置 Wi-Fi AP 的 SSID 和密码,以更改 esp32-sx 的热点名称。 | ||
* 您也可以设置 Wi-Fi STA 的 SSID 和密码,以使 esp32-sx 同时连接到路由器。 | ||
|
||
### 已知问题 | ||
|
||
1. 通过 Web 上传的文件无法被主机自动感知,因此 Windows 的“文件资源管理器”无法自动更新文件列表。请重新挂载磁盘以更新文件列表(弹出重新加载)。此问题将在后续修复。 | ||
2. 通过 USB 磁盘添加或删除的文件,有时无法通过 Web 刷新找到。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
examples/usb/device/usb_msc_wireless_disk/main/idf_component.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
## IDF Component Manager Manifest File | ||
dependencies: | ||
espressif/esp_tinyusb: "~1.1.0" | ||
idf: ">=5.0.0" | ||
espressif/esp_tinyusb: | ||
version: "~1.1.0" | ||
rules: | ||
- if: "idf_version >=5.0" | ||
idf: ">=4.4.0" |
1 change: 1 addition & 0 deletions
1
examples/usb/device/usb_msc_wireless_disk/sdkconfig.ci.external_sd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_USE_EXTERNAL_SDCARD=y |
1 change: 1 addition & 0 deletions
1
examples/usb/device/usb_msc_wireless_disk/sdkconfig.ci.internal_flash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_USE_INTERNAL_FLASH=y |