user2699113
user2699113

Reputation: 4509

Issue with USB OTG peripheral Linux driver (difference in addresses)

I'm writing USB OTG peripheral driver for Linux 4.15.x. I've got some issue with setting address for my OTG peripheral device.

On peripheral USB side I'm receiving for set address following bytes: 0x0, 0x5, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0. It means that I should set given address in my peripheral device. But propably I'm doing something wrong because after setting given address my peripheral USB device stops receiving anything from USB bus. I mean I receive no further requests via USB.

At the same time on PC (USB host side) I have in logs:

Device not responding to setup address.
Device not accepting address 54, error -71

The problem is the difference in USB set address req and in error message on PC (USB host) side.

Why those numbers are different? Why PC reports in logs that it tried to enumerate my USB device with different address that in fact it sent?

Any ideas? Did I miss something?

Upvotes: 0

Views: 280

Answers (1)

user2699113
user2699113

Reputation: 4509

I think I found the reason for the difference in those addresses. It is because I'm using xhci host controller driver on my PC and xhci has a little different method for maintenance of set address request than ohci, uhci or ehci specs.

Upvotes: 0

Related Questions