Home > usb broken > usb broken pipe error

Usb Broken Pipe Error

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow libusb_error_pipe the company Business Learn more about hiring developers or posting ads with us Stack Overflow

Usb_control_msg

Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.3 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why is my kernel module throwing “broken pipe” errors when I try to write to a device? up vote 3 down vote favorite I am currently in the process of writing a Linux kernel module in C. The module provides an extremely basic driver for a USB light (the device consists of three colored LEDs). I have managed to get the driver to load and unload without problems and also create the device (/dev/wn0, /dev/wn1, etc.). However, I keep getting errors when attempting to write to the device: $ echo "1" >/dev/wn0 bash: echo: write error: Broken pipe The entire code for the module is here. However, the interesting part is the wn_set_color() function: /* Create the data buffer to be sent to the device. */ u8 buf[8] = { red, green, blue, 0, 0, 0, 0x1F, 0x05 }; /* Send the data to the device. */ return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0, 0, 0, 0, buf, 8, 0); For some reason, it returns -32 instead of sending the data to the device. I am completely new to Linux kernel programming so I'm likely doing something silly. If you can shed some light on this at all, it would be greatly appreciated. Edit: here is some further information: lsusb -v output is here the bDescriptorType member of the usb_endpoint_descriptor class contains '5' for the single endpoint exposed by the device (bEndpointAddress is 129 - or 0x81 in hex) here is a screengrab of one of the control URBs sent to the device linux-kernel usb kernel-module share|improve this question edited Jan 15 '13 at 6:33 asked Jan 14 '13 at 3:26 Nathan Osman 23.7k40173282 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote usb_control_msg() eventually calls down to usb_submit_urb(). The Documentation/usb/error-codes.txt file describes the errors that this function can return: -EPIPE The

Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Hardware Dev Center Hardware Dev Center Explore New device experiences USB driver development Windows http://stackoverflow.com/questions/14312988/why-is-my-kernel-module-throwing-broken-pipe-errors-when-i-try-to-write-to-a-d IoT Core 3D printing Docs All Windows devices Get started Design Develop Test Customize Manufacture Service Windows drivers Get started with universal Windows drivers Develop, test, and deploy drivers Device and driver development tools Debugging tools for Windows Device and driver technologies Windows driver samples Desktop Desktop customizations Enterprise customizations OEM manufacturing guide System builder https://msdn.microsoft.com/en-us/library/windows/hardware/hh968307(v=vs.85).aspx manufacturing guide Mobile Mobile customizations Mobile deployment and imaging Mobile servicing IoT Core IoT Core manufacturing guide IoT Core updates Downloads Windows Driver Kit (WDK) Hardware Lab Kit (HLK) Assessment and Deployment Kit (ADK) Windows Symbol Packages Windows Debugger (WinDbg) Samples Support Programs Dashboard Explore New device experiences USB driver development Windows IoT Core 3D printing Docs All Windows devices Get started Design Develop Test Customize Manufacture Service Windows drivers Get started with universal Windows drivers Develop, test, and deploy drivers Device and driver development tools Debugging tools for Windows Device and driver technologies Windows driver samples Desktop Desktop customizations Enterprise customizations OEM manufacturing guide System builder manufacturing guide Mobile Mobile customizations Mobile deployment and imaging Mobile servicing IoT Core IoT Core manufacturing guide IoT Core updates Downloads Windows Driver Kit (WDK) Hardware Lab Kit (HLK) Assessment and Deployment Kit (ADK) Windows Symbol Packages Windows Debugger (WinDbg) Samples Support Programs Dashboard Universal Serial Bus (USB) Developing Windows client drivers for USB devices Sending U

can not post a blank message. Please type your message and try again. HT203343: Resolve printer issues on your Mac Learn about Resolve printer issues https://discussions.apple.com/thread/7036444?start=0&tstart=0 on your Mac Brummie1000 Level 1 (0 points) Q: Broken Pipe Error message I get a broken pipe error message wen I try to print from my MacBook., in the past just restarting the printer has fixed this problem in the past.I have tried shutting the printer down and the router then the laptop, phoned usb broken Kodak and they got another error message talking about disconnect the USB cable, there wasn't a cable connected was told that the printer couldn't be fixed, but I have printed out a test page and Network configuration page.An ideas to fix this please? MacBook Pro, OS X Mavericks (10.9.5) Posted on May 10, 2015 2:34 usb broken pipe PM I have this question too This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use. Support Apple Support Communities Shop the Apple Online Store (1-800-MY-APPLE), visit an Apple Retail Store, or find a reseller. Apple Info Site Map Hot News RSS Feeds Contact Us Copyright © Apple Inc. All rights reserved. Terms of Use Updated Privacy Policy Cookie Usage

be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 31 Oct 2016 07:03:34 GMT by s_wx1199 (squid/3.5.20)

Related content

No related pages.