title: What is the reason of negative value (error) in Bulk Transfer Android?
body: <p>I'm working on <a href="https://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection.html" rel="nofollow">bulkTransfer</a> . It returns length of data transferred (or zero) for success, or negative value for failure. </p>
  
  <p>I want to know the reason of negative value. For example I got -1 and what are the causes it becomes -1? Does I send wrong data or not enough memory or controller busy or etc...</p>
  
  <p>Windows has <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms681383(v=vs.85).aspx" rel="nofollow">GetLastError</a> function. It returns error code. We can know the real reason of why it becoming error. For example,  <strong>0x3E9</strong> means <strong>ERROR_STACK_OVERFLOW</strong>.</p>
  
  <p>How can I know the reason of negative value in bulkTransfer function?</p>