Skip to content
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

Err value: Busy #19

Open
Dadoum opened this issue Aug 1, 2022 · 10 comments
Open

Err value: Busy #19

Dadoum opened this issue Aug 1, 2022 · 10 comments

Comments

@Dadoum
Copy link

Dadoum commented Aug 1, 2022

I built on Fedora Rawhide netmuxd, but I can't get it to work. Every time I plug my device, it errors and tells that the USB is busy.

Output:

$ RUST_BACKTRACE=1 ./netmuxd-mdns --disable-unix --host 127.0.0.1
Starting netmuxd
Listening on 127.0.0.1:27015
WARNING: Running in host mode will not work unless you are running a daemon in unix mode as well
iDevice plugged in!
iDevice plugged in!
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Busy', src/usb.rs:47:18
stack backtrace:
   0: rust_begin_unwind
             at /rustc/b2eed72a6fbf254e7d44942eaa121fcbed05d3fb/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/b2eed72a6fbf254e7d44942eaa121fcbed05d3fb/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/b2eed72a6fbf254e7d44942eaa121fcbed05d3fb/library/core/src/result.rs:1785:5
   3: <netmuxd::usb::Handler as rusb::hotplug::Hotplug<T>>::device_arrived
   4: std::panicking::try
   5: rusb::hotplug::hotplug_callback
   6: <unknown>
   7: libusb_handle_events_timeout_completed
   8: libusb_handle_events_completed
   9: <unknown>
  10: libusb_control_transfer
  11: rusb::device_handle::DeviceHandle<T>::read_languages
  12: <netmuxd::usb::Handler as rusb::hotplug::Hotplug<T>>::device_arrived
  13: std::panicking::try
  14: rusb::hotplug::hotplug_callback
  15: libusb_hotplug_register_callback
  16: rusb::hotplug::HotplugBuilder::register
  17: netmuxd::usb::start_listener
  18: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  19: std::thread::local::LocalKey<T>::with
  20: tokio::park::thread::CachedParkThread::block_on
  21: tokio::runtime::thread_pool::ThreadPool::block_on
  22: tokio::runtime::Runtime::block_on
  23: netmuxd::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Serial number: e53db365366a621313eb3e0521e67f8aede2de0f
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
@jkcoxson
Copy link
Owner

jkcoxson commented Aug 1, 2022

I see, I’ll disable my experimental USB additions until I figure them out.

@Dadoum Dadoum closed this as completed Aug 1, 2022
@Dadoum Dadoum reopened this Aug 1, 2022
@Dadoum
Copy link
Author

Dadoum commented Aug 1, 2022

(misclick)

@jkcoxson
Copy link
Owner

jkcoxson commented Aug 1, 2022

Looks like I was kinda smart when I wrote it and forgot about it, you can pass —disable-usb and that code won’t run. I’ll change it to the opposite —enable-usb until I have time to make USB actually work.

jkcoxson added a commit that referenced this issue Aug 1, 2022
@Dadoum
Copy link
Author

Dadoum commented Aug 1, 2022

Now netmuxd does not detect anything. usbmuxd still detects when the device is plugged in, but netmuxd is not detecting it in the network. (I also have this issue with usbmuxd2)

@jkcoxson
Copy link
Owner

jkcoxson commented Aug 1, 2022

If I had to guess, your device isn't set up for network connections. You have to enable it through lockdown. You can write some code to do it, that's the easiest way I can think of. Lemme find an example, as I've done it before.

@Dadoum
Copy link
Author

Dadoum commented Aug 1, 2022

image
Still not detected by any muxer, and I saw that the code asks for setting a passcode when it fails (even if here it succeeded as the screenshot shows) so I added one, with no success.

@jkcoxson
Copy link
Owner

jkcoxson commented Aug 1, 2022

If you set the RUST_LOG to info does it show it’s trying to add it?

@Dadoum
Copy link
Author

Dadoum commented Aug 1, 2022

image
It does not seem it detects anything.

@jkcoxson
Copy link
Owner

jkcoxson commented Aug 1, 2022

I will look into this and see if I have the same issue with the current code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants