Author Topic: What is this CBW Command mean?  (Read 17814 times)

eng.Buffon

  • Member
  • ***
  • Posts: 23
What is this CBW Command mean?
« on: March 06, 2012, 03:47:09 pm »
hi guys hi everyone

when the USB host send this CBW command the firmware doesn't repsonse to it , so i would like to know what's this command mean?



please help me

Thank you in Advance

eng.Buffon

  • Member
  • ***
  • Posts: 23
Re: What is this CBW Command mean?
« Reply #1 on: March 06, 2012, 03:58:53 pm »
if it's READ_Capacity Command what we can deal with that command in Media Absent?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: What is this CBW Command mean?
« Reply #2 on: March 06, 2012, 11:19:19 pm »
On removing media, the device should be in the UNIT ATTENTION condition and return 01 in bCSWStatus in response to most SCSI requests.

Jan

eng.Buffon

  • Member
  • ***
  • Posts: 23
Re: What is this CBW Command mean?
« Reply #3 on: March 07, 2012, 04:48:12 pm »
So what the device supposed to do in the READ_FORMAT_CAPACITIES (23h) which in your book you written that it's not required but it appear as you see in the Proteus

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: What is this CBW Command mean?
« Reply #4 on: March 07, 2012, 05:30:35 pm »
Return 01 in bCSWStatus (see my previous answer)

Jan

eng.Buffon

  • Member
  • ***
  • Posts: 23
Re: What is this CBW Command mean?
« Reply #5 on: March 08, 2012, 05:49:20 am »
ok i know that i will return 01 in bCSWStatus

am i supposed to STALL the endpoint? in addition to return 01 in bCSWStatus

for more declaration of my question:-

in this case this is Unsupported command So the host expect to Receive Data and the device expect to send no data

this is the (case 4) in the thirteen cases for Any Situation

the response from the device at this point is
1)the device must stall the bulk IN endpoint.
2)the device sets bCSWStatus to 01h
3)the device sets dCSWDataResidue with dCBWDataTransferLength.

so the question is how can i send (CSW) as i previously stalled the Bulk-in endpoint?

and generally in USB protocol what's the device supposed to do after stall any endpoint?

thank you in Advacne

hope that my question become more clear.
« Last Edit: March 08, 2012, 06:59:36 am by eng.Buffon »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: What is this CBW Command mean?
« Reply #6 on: March 08, 2012, 10:02:56 am »
From 6.7.1 in the bulk-only spec:

3. On a STALL condition receiving the CSW, then:
· The host shall clear the Bulk-In pipe.
· The host shall attempt to receive the CSW again

For more on STALL, see 8.4.5 in the USB 2.0 spec.

Jan