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

cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred (IDFGH-12827) #13797

Closed
3 tasks done
HDLA-BG opened this issue May 16, 2024 · 6 comments · Fixed by espressif/esp-usb#41
Closed
3 tasks done
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@HDLA-BG
Copy link

HDLA-BG commented May 16, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.0.1

Espressif SoC revision.

esp32s3

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

esp32s3

Power Supply used.

External 5V

What is the expected behavior?

No errors when downloading file via Modem

What is the actual behavior?

A lot of errors printed in the log coming from cdc_acm

Steps to reproduce.

  1. Connect to Internet via Modem using USB
  2. Request OTA update
    ...

Debug Logs.

E (156034) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156075) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156255) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156387) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156391) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156392) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156393) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156393) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156394) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156395) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156397) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156403) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156405) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156508) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156510) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156511) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred
E (156511) cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred

More Information.

We are using ESPModem driver and Modem SIMCOM A7672
The modem is Connected via USB.
The connection is stable until we request OTA update using https server.
After file transfer is started cfc_acm starts sending "Incorrect number of bytes transferred" and continue doing it during whole download process.

The problem doesn't appear every time but it is pretty often.

@HDLA-BG HDLA-BG added the Type: Bug bugs in IDF label May 16, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 16, 2024
@github-actions github-actions bot changed the title cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred cdc_acm: cdc_acm_host_data_tx_blocking(1183): Incorrect number of bytes transferred (IDFGH-12827) May 16, 2024
@roma-jam
Copy link
Collaborator

Hi @HDLA-BG,

Thanks for reporting the issue.

Despite the printed error, the OTA firmware update finishes successfully? Or when errors appears, the the OTA firmware update process finishes with error as well?

@HDLA-BG
Copy link
Author

HDLA-BG commented May 16, 2024

Hi @roma-jam

OTA update finishes successfully.
But we are sending all the logs to our backend, so this looks weird during the analysis.

@roma-jam
Copy link
Collaborator

Hi @HDLA-BG ,

thanks for clarification, it is good to know that data is not corrupted during the transfer.

Meanwhile, the error should not be there.
Let me check some details and I will return back asap.

@HDLA-BG
Copy link
Author

HDLA-BG commented May 27, 2024

Hi @roma-jam,

Thank you very much, I am waiting for your response. :)

@radiotommy
Copy link

radiotommy commented Jun 13, 2024

@HDLA-BG
I think we got the same issue. The problem is in usb_host_cdc_acm component under esp-usb repo.
I got it fixed and made a PR:
espressif/esp-usb#40

@HDLA-BG
Copy link
Author

HDLA-BG commented Jun 13, 2024

@radiotommy

This is great, thanks, I hope it'll be merged soon.

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Jun 17, 2024
tore-espressif added a commit to espressif/esp-usb that referenced this issue Jun 17, 2024
After TX transfer timeout we reset the endpoint which causes all
in-flight transfers to complete. The transfer finished callback gives
a transfer finished semaphore which we must take, so we would not
affect next TX transfers.

Closes espressif/esp-protocols#514
Closes #40
Closes espressif/esp-idf#13797
tore-espressif added a commit to espressif/esp-usb that referenced this issue Jun 17, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Reviewing Issue is being reviewed labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants