Libusb get report descriptor error on imx6dl

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

Libusb get report descriptor error on imx6dl

ソリューションへジャンプ
2,860件の閲覧回数
Mihan
Contributor IV

Hi 

I want to check out the usb hotplug event and get the information of device on my program,so I usb libusb.

But when I use "libusb_get_descriptor" for the report descriptor, it returns LIBUSB_ERROR_PIPE.

I need to know what kinds of the device they are, I can get their string of product , device descriptor and so on but the report descriptor.

The author of libusb said "Descriptor access all happens over the control pipe. I think it's running on on linux but some system configurations are different."

Could you give me a hand about that? I'm using the 4.1.15 kernel.

Regards

Mihan

ラベル(2)
タグ(1)
0 件の賞賛
返信
1 解決策
2,785件の閲覧回数
Mihan
Contributor IV

Ok, my mistake. I forget to check the kernal device is active on an interface or not. Now I can get the report descriptor.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,785件の閲覧回数
b36401
NXP Employee
NXP Employee

It seems the device does not support the command was sent from host.

0 件の賞賛
返信
2,786件の閲覧回数
Mihan
Contributor IV

Ok, my mistake. I forget to check the kernal device is active on an interface or not. Now I can get the report descriptor.

0 件の賞賛
返信
2,785件の閲覧回数
Mihan
Contributor IV

But I just usb libusb_get_descriptor to get the report descriptor, to analyze the HID device.

Because I can get the HID descriptor (e.g. 09 21 1101 00 01 22 4f00) but why I can't get this 79 byte of report descriptor?

Also I try to use libusb_control_transfer

e.g.

libusb_control_transfer(handle,
                                      LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_RECIPIENT_INTERFACE,
                                      LIBUSB_REQUEST_GET_DESCRIPTOR,
                                      (LIBUSB_DT_REPORT << 8),
                                       0,
                                       buf, 2014,
                                       5000);

but it doesn't work ,with LIBUSB_ERROR_IO returned. 

So do you have other ways to analyze a usb device which is a mouse or a keyboard?

0 件の賞賛
返信