Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于USB MSC Wireless Disk例程中提到的已知问题,Known Issues (AEGHB-416) #301

Open
MichaelDu9226 opened this issue Oct 7, 2023 · 8 comments

Comments

@MichaelDu9226
Copy link

USB MSC Wireless Disk例程中提到:
Known Issues
Files uploaded through web can not be aware by host , so Windows files resource manager can not update the files list automatically. Please remount the disk to update the files list (弹出重新加载) . This bug will be fixed later.
Files added or removed through USB disk, sometimes can not be found by web refresh.

关于MSC驱动在widows文件管理器与ESP32 S3同时写文件,会导致冲突的原因,我大致是清楚的。
但是看到你们提到"This bug will be fixed later",想了解下何时可以解决这个Bug,或者解决这个Bug的思路是怎样的,我可以借鉴你们的思路去尝试,谢谢

@github-actions github-actions bot changed the title 关于USB MSC Wireless Disk例程中提到的已知问题,Known Issues 关于USB MSC Wireless Disk例程中提到的已知问题,Known Issues (AEGHB-416) Oct 7, 2023
@leeebo
Copy link
Collaborator

leeebo commented Oct 7, 2023

If you want to implement HTTP and MSC access "at the same time", the logic will be very complex. We should consider adding locks and remounting in some cases. I have a draft logic here:

stateDiagram-v2
power_on: Power on
wifi_init: Wi-Fi AP/STA Init
usb_monitor: Monitor USB connection
http_init: HTTP File Server Init
fatfs_init: DiskIO + FATFS + VFS Init
handle_http: HTTP File Server Handler
handle_usb: USB MSC Diskio Handler
user_http_write_access: User Wireless upload/delete
user_http_read_access: User Wireless download
user_http_idel: Wireless idle
check_user_http_idel: Check Wireless idle
state Same_Check_Logic_as_USB {
    [*] --> ...
}
check_user_http_only_download: Check HTTP Only Download
user_usb_write_access: User USB Write
user_usb_read_access: User USB Read
user_usb_idel: USB idle
[*] --> power_on
power_on --> wifi_init
wifi_init --> fatfs_init
fatfs_init --> http_init
http_init --> handle_http
handle_http --> user_http_write_access
handle_http --> user_http_read_access
handle_http --> user_http_idel
user_http_write_access --> Same_Check_Logic_as_USB
user_http_read_access --> Same_Check_Logic_as_USB
user_http_idel --> usb_monitor
state if_connected <<choice>>
usb_monitor --> if_connected
if_connected --> handle_usb: USB Connected
handle_usb --> user_usb_write_access
handle_usb --> user_usb_read_access
handle_usb --> user_usb_idel
user_usb_write_access --> check_user_http_idel
check_user_http_idel --> Wait_HTTP_Complete: False
Wait_HTTP_Complete --> Check_if_remount_USB
Check_if_remount_USB --> USB_Write: Write
Check_if_remount_USB --> USB_Read: Read
check_user_http_idel --> Check_if_remount_USB: True
USB_Write --> handle_http: Disk Changed
handle_http --> fatfs_init: Disk Changed Re-mount
user_usb_read_access --> check_user_http_only_download
check_user_http_only_download --> Check_if_remount_USB: True
check_user_http_only_download --> Wait_HTTP_Complete: False
Wait_HTTP_Complete --> Check_if_remount_USB
Check_if_remount_USB --> usb_monitor: Re-mount
if_connected --> Disconnected: USB Disconnected
Loading

@leeebo
Copy link
Collaborator

leeebo commented Oct 7, 2023

That's why Android devices choose protocols like MTP and PTP instead MSC, when they act as a storage device

@MichaelDu9226
Copy link
Author

@leeebo 谢谢你的建议
看起来难度有点大,我放弃了。

@leeebo
Copy link
Collaborator

leeebo commented Oct 9, 2023

@MichaelDu9226 新版本会处理掉。到时通知你

@MichaelDu9226
Copy link
Author

@leeebo 你好,请问关于USB MSC PC与ESP32同时读写同步的问题,有什么进展吗?谢谢
我们主要是micropython环境,已经实现了msc,但是两者的读写不同步。
另外还有一个问题,USB msc是否支持动态开启关闭? 就是用户需要点击屏幕或者按键确认开启MSC功能,PC端才会出现U盘。这期间重启设备是可以接受的。目前我使用的msc好像需要在sdconfig里开启

@imliubo
Copy link

imliubo commented Nov 27, 2023

应该是同一个问题, 文件列表不同步, 网页刷新不起作用
image

@hy1080
Copy link

hy1080 commented Mar 2, 2024

可不可以以通过http来模拟系统的读写来驱动tinyUSB?持续关注中

@volca
Copy link

volca commented Sep 4, 2024

@MichaelDu9226 新版本会处理掉。到时通知你

Any update for the issue?

请问这个问题有什么进展吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants