Closed CyberGuerro closed 5 months ago
It's strange that between the device connect and the first send_feature_report error your PC spend more than 5 seconds
XPanel [45982] [DEBUG]:device connect: vid=1699 pid=3333
XPanel [51488] [DEBUG]:error in UsbHidDevice::send_feature_report reason=ioctl (SFEATURE): Connessione scaduta
XPanel [51490] [DEBUG]:SaitekRadioPanel connect. successful
On my PC (which is a much less powerful compared to yours) it is only 5 ms (not seconds but milliseconds)
XPanel [12347] [DEBUG]:device connect: vid=1699 pid=3333
XPanel [12351] [DEBUG]:SaitekRadioPanel connect. successful
What I see is that you have a lot of custom scenaries what are loaded at almost the same time as XPanel plugin loads. Maybe it overloads your PC and the plugin can't get the time to communicate with the USB devices? I know it sounds very strange. I would like to do two tests:
Remove all custom sceneries, using your lin-delay-10sec version, tested with only 1 radio device: NOT WORKING, same error. Atteched Log.txt
I did a USB communication capture on my Ubuntu box. I'd like to ask you to do the same tests on your system as well:
sudo apt install wireshark
sudo modprobe usbmon
norbi@norbi-linux:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 413c:2110 Dell Computer Corp. Dell Wired Multimedia Keyboard
Bus 001 Device 004: ID 413c:1010 Dell Computer Corp. USB 2.0 Hub [MTT]
Bus 001 Device 003: ID 06a3:a2ae Saitek PLC Pro Flight Instrument Panel
Bus 001 Device 014: ID 06a3:0d67 Saitek PLC Pro Flight Switch Panel
Bus 001 Device 011: ID 044f:b679 ThrustMaster, Inc. T-Rudder
Bus 001 Device 008: ID 06a3:0d06 Saitek PLC Flight Pro Multi Panel
Bus 001 Device 005: ID 06a3:0d05 Saitek PLC Pro Flight Radio Panel
Bus 001 Device 002: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub
Bus 001 Device 013: ID 0b05:1939 ASUSTek Computer, Inc. AURA LED Controller
Bus 001 Device 009: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 012: ID 06a3:0bac Saitek PLC Pro Flight Yoke
Bus 001 Device 010: ID 0461:4d81 Primax Electronics, Ltd Dell N889 Optical Mouse
Bus 001 Device 015: ID 0b0e:0300 GN Netcom Jabra EVOLVE 20 SE MS
Bus 001 Device 006: ID 06a3:712c Saitek PLC Pro Flight Yoke integrated hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
sudo wireshark
and select the USB bus to capture (in my case it was 001 according to the previous point)usb.dst contains "1.5." || usb.src contains "1.5."
here the 1.5 means bus 1 and device 5 (according to lsusb output). Modify the filter according to your bus/device id. This is the captured USB frames in my system:
The SET_REPORT_REQUEST is when my plugin initialize the radio panel. That's the point where you get the timeout error messages.
I'm really curious what traffic is captured on your system. If you have time I'd like to see the same tests with XSaitek panel plugin as well.
Please use the lin-delay-10sec version for your tests.
Tests done. This is my usb lists:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1462:7d25 Micro Star International MYSTIC LIGHT
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 007: ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller
Bus 001 Device 008: ID 043e:9a10 LG Electronics USA, Inc. ASM107x
Bus 001 Device 009: ID 03f0:e807 HP, Inc HP Webcam HD 4310
Bus 001 Device 010: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 011: ID 131d:0159 Natural Point
Bus 001 Device 012: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 013: ID 06a3:0d05 Saitek PLC Pro Flight Radio Panel
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
This is my wireshark filter:
usb.dst contains "1.13." || usb.src contains "1.13."
(my device's id is 13 on bus 001)
Attached: XPanel.zip Xsaitekpanels.zip
I hope these help you
Thanks for the tests. What I see:
URB status: No such file or directory (-ENOENT) (-2)
It could be the root cause of the issue. I'm not sure but it seems a problem. On the other hand I don't understand how it works both on my Linux and Windows. Anyways, I created a new version where I set the first byte of the feature report strictly to 0. Could you please test this please?
GREAT NEWS!!!! Now it works: no more errors and display, buttons and knobs work..... .....BUT... ....if I connect only 1 radio it works as expected, but if I connect all my 3 radio devices, all 3 devices's display show same things (Top-Left display of first, second and third devices shows same thing, top-right same thing on all 3 devices and so on) and 3 devices are setted as below:
device 1 upper: COM1
device 1 lower: COM 2
device 2 upper: NAV 1
device 2 lower: NAV 2
device 3 upper: ADF
device 3 lower: XPDR
If I turn device 1 knobs, sometimes display of device 1 change, sometimes display of device 2, sometimes display of device 3. Same thing if I use knobs of device 2 or device 3.
I think that now the plugin have to distinguish the device when there are multiple devices of the same type.
that's great news :-)
let me check what causes the mixing of more than one radio devices. If you don't mind I close this Issue and open a new one for the multi radio issue.
Followup of the multi radio devices bug: #99
Describe the bug With attached xpanel.ini and Saitek Radio Panel connected to USB, plugin crash and x-plane with it
To Reproduce Steps to reproduce the behavior like this:
Expected behavior Flight start
X-Plane log file Log.txt
xpanel.ini content:
List of usb devices connected before run X-Plane12
Desktop (please complete the following information):