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 find the correct configuration and also the correct interface ? #3

Open
iKK001 opened this issue Nov 23, 2024 · 0 comments
Open

Comments

@iKK001
Copy link

iKK001 commented Nov 23, 2024

I am struggling with getting the correct configuration after opening the usbDevice.

How do I know how many configurations there are - and which one the correct one is ?

How do I know how many interfaces there are - and which one does have in- and out-endpoints ?

int configNr = 1;   // Q1: how do I know this number ?

await _usbDevice?.open();
_usbDevice?.selectConfiguration(configNr);
_configuration = _usbDevice?.configuration;

int interfaceNr = 1; // Q2: how do I know this number ?

_interface = _configuration?.interfaces[n];
await _usbDevice?.claimInterface(_interface!.interfaceNumber);
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

1 participant