OS/2, eCS & ArcaOS - Technical > Storage

MTP plugin for Netdrive?

<< < (4/5) > >>

Paul Smedley:
Hi Guys,


--- Quote from: David McKenna on July 03, 2016, 09:06:50 pm --- Thanks, Dave! New log attached. I added the line <HANG> at the point the hang occurs.

--- End quote ---

OK - this is the same as I'm seeing here. That's actually useful, as it save me wasting a bunch of time trying new usb stacks, etc.

I just wish I knew what was different back when I had this kinda working back in 2013 :) I suspect some change in the libusb code trying to fix issues with either lsusb or cups.

I''ll try get back onto this when I have some free time again.

Cheers,

Paul

Dave Yeo:
I bought a Moto E (2nd gen) and once again the documentation claimed it works as a mass storage device (MSD) but there are no settings to allow it.
So first I test PTP mode, camerdarie sees photos fine on it, unlike my cheap tablet.
I then recompiled libmtp with the latest libusb and MTP mode also works, at least for one shot. I can turn off MTP mode and turn it back on and once again it seems to work for one shot.
I then retested with Paul's build and it seems to work the same. I have to figure out how to transfer a file with the example programs but it does list all the files using mtp-files.exe.
I'll continue playing it tonight.
BTW, tablet is still the same so I don't think using the latest Lars USB drivers did the trick, just slightly different implementation.
Here's the log from mtp-detect.

Paul Smedley:
Hey Dave,


--- Quote from: Dave Yeo on October 26, 2016, 05:14:24 pm ---I bought a Moto E (2nd gen) and once again the documentation claimed it works as a mass storage device (MSD) but there are no settings to allow it.
So first I test PTP mode, camerdarie sees photos fine on it, unlike my cheap tablet.
I then recompiled libmtp with the latest libusb and MTP mode also works, at least for one shot. I can turn off MTP mode and turn it back on and once again it seems to work for one shot.
I then retested with Paul's build and it seems to work the same. I have to figure out how to transfer a file with the example programs but it does list all the files using mtp-files.exe.
I'll continue playing it tonight.
BTW, tablet is still the same so I don't think using the latest Lars USB drivers did the trick, just slightly different implementation.
Here's the log from mtp-detect.

--- End quote ---

I need to find some time to get back onto this project.... I have 3 weeks vacation over Christmas, hopefully then :)

Cheers,

Paul

Wim Brul:
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? 

Dave Yeo:
The kernel driver seems harmless, the code from libusb1-glue.c

--- Code: ---  /*
   * If this device is known to be wrongfully claimed by other kernel
   * drivers (such as mass storage), then try to unload it to make it
   * accessible from user space.
   */
  if (FLAG_UNLOAD_DRIVER(ptp_usb) &&
      libusb_kernel_driver_active(device_handle, ptp_usb->interface)
  ) {
      if (LIBUSB_SUCCESS != libusb_detach_kernel_driver(device_handle, ptp_usb->interface)) {
        perror("libusb_detach_kernel_driver() failed, continuing anyway...");
      }
  }

--- End code ---

Further experimentation shows that it doesn't always lose the device but need to do more experiments.
It would be nice to be able to transfer files over USB as currently I move the micro-sd card over to my computer to move files or use ftp. Ftp is slow for lots of small files and I'd like to make the SD card part of the main storage, which means reformatting it in such a way that it won't work for mass storage.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version