-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB_BACKEND_LIBUSB since v3.8 doesn't work on FreeBSD #221
Comments
I've seen some reports recently regarding SIGABRT on exception for Qt UI. Could you please post output of Could you please comment the whole block below?
|
See build log
It works. Before reporting I did try to revert the first bad found via bisecting. |
Do you have any other device to test it with? I just wondering if it's BSD specific or device specific. I can disable reset for BSD, it works OK for me in linux. |
Thanks for the logs, looks OK to me |
I've disabled reset for FreeBSD in 34b3eee |
8212742 should fix crash in reconnectToDevice |
No.
Maybe specific to the implementation.
Probably needs to be extended to
Thanks. Qt GUI now fails similar to CLI.
|
Alternatively, install either Index: sysutils/android-file-transfer/Makefile
===================================================================
--- sysutils/android-file-transfer/Makefile (revision 502185)
+++ sysutils/android-file-transfer/Makefile (working copy)
@@ -9,4 +9,3 @@
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= 6b969a1600d4.patch:-p1
-PATCHFILES+= 34b3eee2e0dd.patch:-p1
PATCHFILES+= 82127426b3eb.patch:-p1 |
@jbeich : Hi, Is the USB device opened when executing libusb_reset_device() ? Try to ktrace the program and grep for all USB ioctl's and their return code. |
@jbeich: It might be that certain features are available only to the super-user. Have you tried running this program as root? |
Probably not.
Doesn't help:
|
Closing before --- a/mtp/backend/libusb/usb/Device.cpp
+++ b/mtp/backend/libusb/usb/Device.cpp
@@ -29,6 +29,9 @@ namespace mtp { namespace usb
Device::Device(ContextPtr context, libusb_device_handle * handle): _context(context), _handle(handle)
{
+ libusb_device *dev = libusb_get_device(handle);
+ if (libusb_get_bus_number(dev) == 0 && libusb_get_port_number(dev) == 2)
+ libusb_close(handle);
try { USB_CALL(libusb_reset_device(_handle)); }
catch (std::exception & ex)
{ error("libusb_reset_device failed: ", ex.what()); }
|
Can you ktrace when running utility as root? Also run "usbconfig" to ensure your PTP device is visible. Please also dump device and config descriptor before and after the utility fails. |
Only root users can do this :-( |
See ktrace.log.txt.
Only
Also doesn't work inside a jail. |
Do you mean before and after |
@whoozle, does libusb backend (including reset) work fine on macOS? |
Can you show where it crashes when running as root? --HPS |
On
|
Can you check if you have old libusb libraries installed in your system? I just did a clone of the git, mkdir build, cd build, cmake .. -DUSB_BACKEND_LIBUSB=ON, make and then: sudo chmod 0777 /dev/ugenX.Y ./qt/android-file-transfer It works just fine with my LineageOS Android phone. Can you check if you have any local patches? |
No. I've confirmed in pristine 13.0-CURRENT amd64 chroot.
#221 (comment) has steps to reproduce.
Revert of 34b3eee. |
Hi, I think it is not a good idea to reset the device upon connect. Only if the device doesn't respond you should do that. On my Android device I have a menu to select "Use USB to .." charge, supply power, transfer files, ptp After running libusb_device_reset() the Android device automatically switched to charging mode and the software was unable to connect. In FreeBSD libusb_device_reset() does a full device reset - so called enumeration. I'm not sure about the other platforms that libusb supports, but likely they don't do the same level of reset. @whoozle : Please remove the libusb_device_reset() from all platforms, or make it optional. |
@hselasky it looks it's working better for someone, I'll make it optional, I think (off by default as it's pretty disruptive). I've disabled it for FreeBSD anyway. |
please pull, I've added |
@whoozle, CLI and Qt UI work fine by default for me. |
it's fine then. As an addition I've added the special dialog in UI, asking for reset/ignore if something unexpected happened during device opening. |
the same problem reported in #223 |
Can this issue be closed? |
I think so |
Regressed by 0f8f177.
The text was updated successfully, but these errors were encountered: