OS/2, eCS & ArcaOS - Technical > Storage

MTP plugin for Netdrive?

<< < (5/5)

Paul Smedley:
Hi Wim,


--- Quote from: Wim Brul on October 27, 2016, 12:17:21 pm ---I looked into detect.log and I see starting on line 1883 :


--- Code: ---libusb: 2.459000 debug [libusb_open] open 1.2
libusb: 2.459000 debug [os2_open] unable to open device - id= 22b8/2e82  rc= ff0c
libusb: 2.459000 debug [os2_open] open: rc = ff0c, fd -1
libusb: 2.459000 debug [os2_open] open, set device configuration: rc = ff37, fd -1

--- End code ---

FF0C= ERROR_I24_GEN_FAILURE. The open fails because it has already been opened before.
FF37= ERROR_DEV_NOT_EXIST. The set configuration fails because of the invalid fd (-1) value.
I suspect that it would have worked with the  fd value (35651590) of the outstanding open.

I wonder about the event reported in line 43:


--- Code: ---libusb_detach_kernel_driver() failed, continuing anyway...: Error 0

--- End code ---

May be thIs is causing the problem?

--- End quote ---

The comment about ff0c is useful. Probably (it's been a while since I looked at libusb), os2_open is setting fd to -1 based on rc not being 0. There probably needs to be a case where there are other acceptable rc's that should not indicate an error.

afair libusb_detach_kernel_driver is just a stub.

Cheers,

Paul

Dave Yeo:
I also successfully transferred a few files to the phone. While it takes a while (a minute or more) to make contact, once the file is transferring, it is very quick, much quicker then transferring using FAT32. Repeat file copying works fine without having to reset the device.
Have to copy mtp.connect.exe to mtp.sendfiles.exe (also mtp-delfiles.exe mtp-newfolder.exe mtp-sendtr.exe) as they are symlinked on make install.
This is using my build. The only patching I did was fix a bashism in configure and added __OS2__ to a couple of places where O_BINARY was set for windows.

Paul Smedley:
Hi Guys,


--- Quote from: Paul Smedley on October 28, 2016, 03:20:09 am ---Hi Wim,


--- Quote from: Wim Brul on October 27, 2016, 12:17:21 pm ---I looked into detect.log and I see starting on line 1883 :


--- Code: ---libusb: 2.459000 debug [libusb_open] open 1.2
libusb: 2.459000 debug [os2_open] unable to open device - id= 22b8/2e82  rc= ff0c
libusb: 2.459000 debug [os2_open] open: rc = ff0c, fd -1
libusb: 2.459000 debug [os2_open] open, set device configuration: rc = ff37, fd -1

--- End code ---

FF0C= ERROR_I24_GEN_FAILURE. The open fails because it has already been opened before.
FF37= ERROR_DEV_NOT_EXIST. The set configuration fails because of the invalid fd (-1) value.
I suspect that it would have worked with the  fd value (35651590) of the outstanding open.

I wonder about the event reported in line 43:


--- Code: ---libusb_detach_kernel_driver() failed, continuing anyway...: Error 0

--- End code ---

May be thIs is causing the problem?

--- End quote ---

The comment about ff0c is useful. Probably (it's been a while since I looked at libusb), os2_open is setting fd to -1 based on rc not being 0. There probably needs to be a case where there are other acceptable rc's that should not indicate an error.

--- End quote ---

http://smedley.id.au/tmp/libusb10.zip ignores ff0c - perhaps it will help with your tablet Dave?

[code
   rc = UsbOpen( (PUSBHANDLE)&usbhandle,
      (USHORT)dpriv->ddesc.idVendor,
      (USHORT)dpriv->ddesc.idProduct,
      (USHORT)dpriv->ddesc.bcdDevice,
      (USHORT)USB_OPEN_FIRST_UNUSED);

   if (rc && rc != ERROR_I24_GEN_FAILURE) {
      usbi_dbg( "unable to open device - id= %x/%x  rc= %x",
         dpriv->ddesc.idVendor,
         dpriv->ddesc.idProduct, (int)rc);
      usbhandle = -1;
      rtn = -1;
   }
[/code]

Cheers,

Paul

Dave Yeo:
Not much different. Log attached.

Navigation

[0] Message Index

[*] Previous page

Go to full version