-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support option usb data in ep0 control command? #65
Comments
|
thanks xairy,but I can't get data when used 0x40 too. how can i do? |
I would first make sure that the USB request is sent from the host as expected via How exactly does getting data fail for you? Do you get bad |
the wLength received is ok, but when USB_RAW_IOCTL_EP0_READ is wrong,this is my source: |
Enabling debug output as described here and potentially adding more debug messages into the |
ok,I give my full code here which refered from gadget.c:
|
Do you initialize If fixing this doesn't help, please enable the debug output for the Raw Gadget module and share the messages it prints to the kernel log. |
thanks xairy, I can got "hello world!" ,it fee well. now when i add one code in ep0_request()
|
Hi,xairy,We used ctrl endpoint to chat with host PC,I have write a function send_ctrl_data(),but if i called ,crashed....I post my code file here.please help me review it.thanks a lot! |
to xairy: in our project,we need ep0 control channel to chat with pc for most customed command,We have done it ok in movidus platform,now we change device from movidus platform to nvidia platform |
I'd be happy to answer any Raw Gadget-related questions, but I don't have the throughput to debug crashes in your code unfortunately :(
If I understand your question correctly: When you fetch a |
I have debug ok and it work now |
but i find it work on usb2.0,not work usb3.0..... ^_^,print error: |
Raw Gadget doesn't support USB 3, see #61. You can enable debugging output for the Raw Gadget module to see what exactly is failing. I would expect that the USB stack expects a USB endpoint companion descriptor, which Raw Gadget doesn't provide. |
Hi,
We need some customed usb request_type command from host pc and send to device by libusb in our project just like
char test_str = "hello,world!";
r=libusb_control_transfer(dev_handle,0xc0,0,0x33,0x44,(unsigned char)test_str,strlen(test_str),1000);
usleep(10001000);
r=libusb_control_transfer(dev_handle,0x40,0,0x11,0x22,(unsigned char)test_str,strlen(test_str),1000);
But i found i can't get the test data "hello,world!" in gadget.c, It print customed request_type index,value ok in case USB_TYPE_VENDOR of function ep0_request(), but I can't get extra data of control command from struct usb_ctrlrequest...
what can i do ?any advice will been appreciated,thanks!
The text was updated successfully, but these errors were encountered: