USB host select interface error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB host select interface error

1,759件の閲覧回数
rahbek1
Contributor I

I'm using a frdm-kl25z board. I'm trying to connect the board to a

yamaha THR10 amplifier through a USB connection. The USB on

the frdm board is running in host mode.

 

The goal is to get a pipe handle to endpoint 1 on interface 3. So

far I haven't succeded. The attach event is correctly received but

everytime i run: _usb_hostdev_select_interface() I get an error.

Error nr. 200 / USBERR_NO_DESCRIPTOR.

 

Any help as to why this happens is greatly appreciated.

 

I have attached the device descriptor (output of lsusb command

on linux)

Original Attachment has been moved to: lsusb_thr.txt.zip

ラベル(2)
タグ(5)
4 返答(返信)

966件の閲覧回数
rahbek1
Contributor I

Sorry for the late response, I've been a bit busy lately.

I think I finally found the root of the problem. I single stepped through the _usb_hostdev_select_interface() and discovered that the device descriptor isn't received or parsed correctly.

As far as i can tell the device descriptor is saved in the dev variable. dev->num_of_interfaces contains a value of 1 although the device actually have 4 interfaces. 

When obtaining the device descriptor from Linux it turns out that there are some unrecognised fields or commands in the descriptor, see the file attached to the first post. These unrecognised fields appear for the first time right after the description of the first interface. My guess is that the freescale usb stack can't handle these so the function responsible for parsing the device descriptor exits without parsing the rest of the descriptor. This would explain why dev->num_of_interfaces returns 1.

Good ideas for solving this are welcome. I have yet to find where the function that parses the device descriptor is located.

0 件の賞賛
返信

966件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hello Kristian,

  

The “Freescale MQX USB Host API Reference Manual” document provides guidelines for the Host functions usage. This document is available at the following path, considering MQX default installation paths:

   C:\Freescale\Freescale_MQX_4_0\doc\usb\MQXUSBHOSTAPIRM.pdf

 

Hope this will be useful for you.

Best regards!

/Carlos

0 件の賞賛
返信

966件の閲覧回数
egoodii
Senior Contributor III

Yup -- that's the documentation that is a dry list of API calls, with no information on how to use them in sequence to open an endpoint and, by poll or interrupt, transfer some blocks of data (and recover from errors!).

0 件の賞賛
返信

966件の閲覧回数
egoodii
Senior Contributor III

I personally found the documentation on Endpoints 'lacking' in operational detail, and any examples of endpoints 'nonexistant', for my device transferring data on Endpoint 1.  I finally just 'opened' some pipes, and at least in poll mode (NOT my favorite plan) I do manage to get my data.  If you will email me, I can certainly send what I have done to you as an 'example' that at least works.

0 件の賞賛
返信