Benjamin-Dobell / Heimdall

Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy devices.
MIT License
2.56k stars 584 forks source link

ERROR: Setting up interface failed! with SM-G950F #495

Open dpp23 opened 2 years ago

dpp23 commented 2 years ago

Hello! I am trying to use Heimdall build from master here with a SM-G950F but it fails for me with the below output. Any ideas?

heimdall print-pit --verbose
Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0400
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0400
          polling interval: 00
Claiming interface...
Setting up interface...
libusb: error [op_set_interface] set interface failed, errno=110
ERROR: Setting up interface failed!
Releasing device interface...

Os: Ubuntu 21.04 Heimdall version: built from master here

Grimler91 commented 2 years ago

On ubuntu you might need the changes in this PR: https://github.com/Benjamin-Dobell/Heimdall/pull/478

dpp23 commented 2 years ago

@Grimler91 that PR indeed fixed it - thank you so much!

davux commented 1 year ago

I applied the patch on Debian but I still get a similar error.

~$ ./heimdall flash --recovery $IMG
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
libusb: error [op_set_interface] set interface failed, errno=110
ERROR: Setting up interface failed!
Releasing device interface...

Any idea?

JonnyTech commented 1 year ago

libusb: error [op_set_interface] set interface failed, errno=110

Does your user account have access to the port?

~$ ./heimdall flash --recovery $IMG

Try with sudo: sudo ./heimdall flash --recovery $IMG

ClimberBear commented 9 months ago

Hi Suffering same issue, but in my case I get the errno=71

sudo heimdall print-pit  --verbose --usb-log-level debug 
Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.003712] [00001a33] libusb: debug [libusb_get_device_list]  
[ 0.003724] [00001a33] libusb: debug [libusb_get_device_descriptor]  
[ 0.003727] [00001a33] libusb: debug [libusb_get_device_descriptor]  
[ 0.003730] [00001a33] libusb: debug [libusb_open] open 3.9
[ 0.003745] [00001a33] libusb: debug [usbi_add_event_source] add fd 7 events 4
[ 0.003748] [00001a33] libusb: debug [libusb_get_device_descriptor]  
[ 0.003752] [00001a33] libusb: debug [libusb_submit_transfer] transfer 0x17a5bf0
[ 0.003754] [00001a33] libusb: debug [add_to_flying_list] arm timer for timeout in 1000ms (first in line)
[ 0.003771] [00001a33] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.003774] [00001a33] libusb: debug [handle_events] event sources modified, reallocating event data
[ 0.003777] [00001a33] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[ 0.004095] [00001a33] libusb: debug [usbi_wait_for_events] poll() returned 1
[ 0.004104] [00001a33] libusb: debug [reap_for_handle] urb type=2 status=-71 transferred=0
[ 0.004107] [00001a33] libusb: debug [handle_control_completion] handling completion status -71
[ 0.004109] [00001a33] libusb: debug [handle_control_completion] low-level bus error -71
[ 0.004111] [00001a33] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[ 0.004114] [00001a33] libusb: debug [usbi_handle_transfer_completion] transfer 0x17a5bf0 has callback 0x7fc0e0fec100
[ 0.004116] [00001a33] libusb: debug [sync_transfer_cb] actual_length=0
[ 0.004121] [00001a33] libusb: debug [libusb_free_transfer] transfer 0x17a5bf0
[ 0.004125] [00001a33] libusb: debug [libusb_submit_transfer] transfer 0x178e6b0
[ 0.004126] [00001a33] libusb: debug [add_to_flying_list] arm timer for timeout in 1000ms (first in line)
[ 0.004133] [00001a33] libusb: debug [libusb_handle_events_timeout_completed] doing our own event handling
[ 0.004135] [00001a33] libusb: debug [usbi_wait_for_events] poll() 3 fds with timeout in 60000ms
[ 0.004410] [00001a33] libusb: debug [usbi_wait_for_events] poll() returned 1
[ 0.004418] [00001a33] libusb: debug [reap_for_handle] urb type=2 status=-71 transferred=0
[ 0.004420] [00001a33] libusb: debug [handle_control_completion] handling completion status -71
[ 0.004422] [00001a33] libusb: debug [handle_control_completion] low-level bus error -71
[ 0.004424] [00001a33] libusb: debug [arm_timer_for_next_timeout] no timeouts, disarming timer
[ 0.004427] [00001a33] libusb: debug [usbi_handle_transfer_completion] transfer 0x178e6b0 has callback 0x7fc0e0fec100
[ 0.004429] [00001a33] libusb: debug [sync_transfer_cb] actual_length=0
[ 0.004431] [00001a33] libusb: debug [libusb_free_transfer] transfer 0x178e6b0

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1
[ 0.004446] [00001a33] libusb: debug [libusb_get_config_descriptor] index 0

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
[ 0.004491] [00001a33] libusb: debug [libusb_claim_interface] interface 1
Setting up interface...
[ 0.004510] [00001a33] libusb: debug [libusb_set_interface_alt_setting] interface 1 altsetting 0
[ 0.005036] [00001a33] libusb: error [op_set_interface] set interface failed, errno=71
ERROR: Setting up interface failed!
Releasing device interface...
[ 0.005053] [00001a33] libusb: debug [libusb_release_interface] interface 1

[ 0.005066] [00001a33] libusb: debug [libusb_close]  
[ 0.005069] [00001a33] libusb: debug [usbi_remove_event_source] remove fd 7
[ 0.005077] [00001a33] libusb: debug [libusb_exit]  
[ 0.005115] [00001a34] libusb: debug [linux_udev_event_thread_main] udev event thread exiting
[ 0.005210] [00001a33] libusb: debug [libusb_unref_device] destroy device 4.1
[ 0.005216] [00001a33] libusb: debug [libusb_unref_device] destroy device 3.9
[ 0.005218] [00001a33] libusb: debug [libusb_unref_device] destroy device 3.1
[ 0.005220] [00001a33] libusb: debug [libusb_unref_device] destroy device 2.1
[ 0.005222] [00001a33] libusb: debug [libusb_unref_device] destroy device 1.3
[ 0.005224] [00001a33] libusb: debug [libusb_unref_device] destroy device 1.2
[ 0.005225] [00001a33] libusb: debug [libusb_unref_device] destroy device 1.1
[ 0.005227] [00001a33] libusb: debug [usbi_remove_event_source] remove fd 4
[ 0.005231] [00001a33] libusb: debug [usbi_remove_event_source] remove fd 3

I have tried also installing the version 1.4.2 (the version included in Ubuntu 22.04 LTS si 1.4.0)