Author Topic: Device Fails to Return Report Descriptor  (Read 14548 times)

nobbyv

  • Member
  • ***
  • Posts: 14
Device Fails to Return Report Descriptor
« on: February 06, 2015, 08:26:54 am »
I've got a HS USB HID device set up to run on a STM32F405 microcontroller. It gets most of the way through enumeration fine, but when the host sends a Get Report Descriptor, the device fails to respond with the descriptor and the request times out. I was able to single step and verify that the device sees the request, and even appears to send the report on the device side, but the host does not get it. I have verified the correct report location is being used, and that the report is actually present at this location. The length is correct, and the request is correct, but nothing gets back to the host.

What is even stranger is this exact same code runs on a different processor (STM32F427) without any difficulties.

If anyone had any thought, it would be appreciated.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Device Fails to Return Report Descriptor
« Reply #1 on: February 06, 2015, 01:08:38 pm »
A hardware protocol analyzer would show what is happening on the bus and would likely be helpful.

Where you say "report" below, I will assume you mean "report descriptor."

Use whatever debugging tools you have to verify that the report descriptor is transmitting and the host ACKs all packets.

The setupapidev.log file might have a clue (not sure if it stops logging after Set Configuration).

https://msdn.microsoft.com/en-us/library/windows/hardware/ff550900%28v=vs.85%29.aspx

nobbyv

  • Member
  • ***
  • Posts: 14
Re: Device Fails to Return Report Descriptor
« Reply #2 on: February 09, 2015, 02:09:12 pm »
Yes, sorry, I should have said device fails to return the report descriptor. Here's a screenshot from my protocol analyzer: you can see the request from the host, then nothing until after 2secs it times out.


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Device Fails to Return Report Descriptor
« Reply #3 on: February 10, 2015, 03:46:54 pm »
The screen shows that the host sent the request.

Does the device ACK the request?

If not, you need to fix that in the device firmware.

If yes, you need to find out why the device is NAKing the IN token packets in the Data stage instead of sending the requested descriptor.

nobbyv

  • Member
  • ***
  • Posts: 14
Re: Device Fails to Return Report Descriptor
« Reply #4 on: February 11, 2015, 08:00:09 am »
Jan,
Thanks again for the reply. Yes, the device ACKs the request:



I'll try digging into why the device then NAKs the IN token packets.

nobbyv

  • Member
  • ***
  • Posts: 14
Re: Device Fails to Return Report Descriptor
« Reply #5 on: February 13, 2015, 09:05:46 am »

The setupapidev.log file might have a clue (not sure if it stops logging after Set Configuration).

https://msdn.microsoft.com/en-us/library/windows/hardware/ff550900%28v=vs.85%29.aspx

Jan,
I did go and look at this log file, and the only issue I found is the error:
Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.

Off to try and find out why that is.
Thanks,
-Josh
« Last Edit: February 13, 2015, 09:35:16 am by nobbyv »