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.

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.

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

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.

/* * 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..."); } }

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.

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.

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.

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.

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.

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.