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

ubuntu下空闲设备接入,执行record时显示usb.core.USBError: [Errno 16] Resource busy错误 #14

Open
pansionpan opened this issue Aug 30, 2022 · 3 comments

Comments

@pansionpan
Copy link

2022-08-24 04:53:58,088 - util.py[line:91] - INFO: Disabling hidden QT config  
Traceback (most recent call last):  
File "/home/root/.local/bin/ioscreen", line 8, in  
sys.exit(main())  
File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 56, in main  
args.func(args)  
File "/home/root/.local/lib/python3.8/site-packages/ioscreen/main.py", line 12, in cmd_record_wavstart_reading(consumer, device, stopSignal)  
File "/home/root/.local/lib/python3.8/site-packages/ioscreen/util.py", line 152, in start_reading
device.set_configuration()  
File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 905, in set_configuration
self._ctx.managed_set_configuration(self, configuration)  
File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 113, in wrapper
return f(self, *args, **kwargs)  
File "/home/root/.local/lib/python3.8/site-packages/usb/core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)  
File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 812, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))  
File "/home/root/.local/lib/python3.8/site-packages/usb/backend/libusb1.py", line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])  
usb.core.USBError: [Errno 16] Resource busy```



问题似乎出现在`device.set_configuration(config_index)`函数上,我把这个函数注释掉后执行命令
```2022-08-30 04:55:11,230 - util.py[line:58] - INFO: Find Device UDID: 00008101001645560C42001E  
2022-08-30 04:55:11,232 - util.py[line:91] - INFO: Disabling hidden QT config  
2022-08-30 04:55:11,233 - util.py[line:155] - INFO: enable_qt_config..  
2022-08-30 04:55:11,233 - util.py[line:71] - INFO: Enabling hidden QT config  
2022-08-30 04:55:11,235 - util.py[line:58] - INFO: Find Device UDID: 00008101001645560C42001E  
2022-08-30 04:55:11,238 - util.py[line:178] - INFO: USB connection ready, waiting for ping..  
2022-08-30 04:55:14,243 - util.py[line:193] - WARNING: [Errno 110] Operation timed out  
2022-08-30 04:55:14,243 - meaasge.py[line:168] - INFO: Telling device to stop streaming..  
2022-08-30 04:55:14,243 - util.py[line:91] - INFO: Disabling hidden QT config```


bytestream内似乎接受不到data数据。

请问有什么好的建议,或者解决办法么。不胜感激
@YueChen-C
Copy link
Owner

这种情况一般是没有成功配对,从新配对下

@pansionpan
Copy link
Author

pansionpan commented Aug 31, 2022 via email

@YueChen-C
Copy link
Owner

这个库没有提供配对的能力,你可以用我另外一个库来实现配对。或者用 idevicepair 命令来实现配对认证后,在进行尝试

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