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

Proposal: Increase USB control buffer size #15

Open
broth-itk opened this issue Dec 18, 2020 · 1 comment
Open

Proposal: Increase USB control buffer size #15

broth-itk opened this issue Dec 18, 2020 · 1 comment

Comments

@broth-itk
Copy link

Background:

With the original i2c-tiny-usb there was a problem with the maximum I2C transfer size.
In the past I had a TPM module connected to the adapter and the linux kernel was unable to talk to it.

Anyhow, I fixed the issue with a patch in the usbtiny code (see changelog in https://dicks.home.xs4all.nl/avr/usbtiny/usbtiny-1.7.tar.gz) for details.

In i2c-star that can be accomplished much easier.
My test environment uses 1024 bytes for the control buffer:

uint8_t usbd_control_buffer[1024];

This works fine. Tested with libusb-1.0 and a custom control message.

The static reply_buf will need to get adjusted as well:

static uint8_t reply_buf[1024];

Proposal: Increase control buffer size or use #define USB_CONTROL_BUFSIZE 1024

If you think it's worth the effort to provide the change via fork + pull request, please let me know.

Thanks for your great project :)

@daniel-thompson
Copy link
Owner

Yes, this sounds useful.

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

No branches or pull requests

2 participants