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

How to change usb host cdc baudrate? (AEGHB-610) #347

Closed
3 tasks done
Kevincoooool opened this issue Apr 5, 2024 · 4 comments
Closed
3 tasks done

How to change usb host cdc baudrate? (AEGHB-610) #347

Kevincoooool opened this issue Apr 5, 2024 · 4 comments
Labels

Comments

@Kevincoooool
Copy link

Kevincoooool commented Apr 5, 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.

General issue report

This is set dtr\rts:

#define USB_CTRL_REQ_CDC_SET_LINE_STATE(ctrl_req_ptr, itf, dtr, rts) ({  \
        (ctrl_req_ptr)->bmRequestType = 0x21;   \
        (ctrl_req_ptr)->bRequest = 0x22;    \
        (ctrl_req_ptr)->wValue = (rts ? 2 : 0) | (dtr ? 1 : 0); \
        (ctrl_req_ptr)->wIndex =  itf;    \
        (ctrl_req_ptr)->wLength = 0;   \
    })

But how to set baudrate?Now I test the cdc transfer speed is about 11 kb/s,that means the normal baudrate is 115200.
So if there is one way to set baudrate,that's perfect.

@github-actions github-actions bot changed the title How to change usb host cdc baudrate? How to change usb host cdc baudrate? (AEGHB-610) Apr 5, 2024
@leeebo
Copy link
Collaborator

leeebo commented Apr 6, 2024

@Kevincoooool The SET_LINE_STATE and SET_LINE_CODING only used to set the UART's params of USB-to-UART device. For common USB CDC device, this configuration won't affect the speed of the USB side.

@Kevincoooool
Copy link
Author

@Kevincoooool The SET_LINE_STATE and SET_LINE_CODING only used to set the UART's params of USB-to-UART device. For common USB CDC device, this configuration won't affect the speed of the USB side.

Yes, but i need to set baudrate for USB-to-UART device....

@leeebo
Copy link
Collaborator

leeebo commented Apr 15, 2024

@Kevincoooool using cdc_acm_host_line_coding_set for baudrate and databits set.

@Kevincoooool
Copy link
Author

@Kevincoooool using cdc_acm_host_line_coding_set for baudrate and databits set.

The demo can not work

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

No branches or pull requests

2 participants