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

Trouble establising CDC ACM connection using Sparkfun USB-C host shield #827

Open
mattilindroth opened this issue Oct 2, 2024 · 1 comment

Comments

@mattilindroth
Copy link

mattilindroth commented Oct 2, 2024

Hi,

I am trying to make arduino act as a usb host for Ardusimple rtk3b device. I am trying to establish cdc acm- connection to read the data as from virtual serial port, as I can in windows. However I get stuck when trying to run the example for cdc acm. The ACM class method SetControlLineState(3) returns 5, which is apparently not good.

I tried the USB_desc- example which worked fine, and I can see the device descriptor, configuration descriptor, interface descriptors and endpoints and they make sense.

I verified from Ardusimple that CDC-ACM is the way to go.

I tried searching for meaning for this code 5 but I cannot find any. CoPilot says

The error code 5 in the USB Host Shield 2.0 library typically indicates a “Set Address” error.

but it has been hallucinating and claiming it means other errors too, so I tend to ignore it.

Any help is much appreciated.
acm_terminal.zip

Best regards,
Matti

@mattilindroth
Copy link
Author

I set the ENABLE_UHS_DEBUGGING to 1 and I can see this output:
Start ACM Init Addr:01 NC:01 Endpoint descriptor: Length: 07 Type: 05 Address: 84 Attributes: 03 MaxPktSize: 000A Poll Intrv: 20 Endpoint descriptor: Length: 07 Type: 05 Address: 86 Attributes: 03 MaxPktSize: 000A Poll Intrv: 20 Endpoint descriptor: Length: 07 Type: 05 Address: 81 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Endpoint descriptor: Length: 07 Type: 05 Address: 01 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Endpoint descriptor: Length: 07 Type: 05 Address: 83 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Endpoint descriptor: Length: 07 Type: 05 Address: 02 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Endpoint descriptor: Length: 07 Type: 05 Address: 85 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Endpoint descriptor: Length: 07 Type: 05 Address: 03 Attributes: 02 MaxPktSize: 0040 Poll Intrv: 00 Conf:01 SetControlLineState: 05 OnInit:05

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