-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] hid_send_feature_report error on Gentoo Linux #90
Comments
Thanks for the bug report. I've never seen a crash on that component. I have to investigate it and reproduce in my environment. Try to do this on the weekend. |
I think I found a possible cause:
in my distribution hidapi is 0.13.1 (I tried 0.14 marked unstable but same error) PS. |
I tested your config on windows and it works fine. So I think the issue is around hidapi library versions.
The pipeline uses Ubuntu 20.04 (Focal) which is pretty old and it uses hidapi 0.9 version according to Ubuntu On my Windows machine, I use the 0.12.0 version of hidapi lib and it works fine. I don't know whether it is possible to downgrade your hidapi version to this or not. To solve the issue I have to update the hidapi version to the latest stable version (0.13.1 or 0.14) and do tests with that version on Windows and Linux. I guess the same error ("hid_error is not implemented yet") will raise on Windows as well. |
Two little things/questions about pipeline build action:
About hidapi on my system I've installed it to make some tests, but normally it isn't installed and the plugin uses its libraries installed in its folder like other plugins which are completely autoconsisten. If I can help you I give you my time as tester. I tried to build your sources, but I haven't packages for arduino and compilation fails :-( :-( |
Regarding pipeline:
You can find the build artifacts here: https://github.com/norberttak/XPanel/actions/runs/8310493658/artifacts/1332243748 I updated the hidapi version to the latest 0.14.0 but I have to test it first on my Windows system. The MR is opened but still work in progress: #91 |
OK, tried your last ebuild:
Attached Log.txt I found this googling error, I don't know if it can help you to solve... |
I created a new build: https://github.com/norberttak/XPanel/actions/runs/8332736662/artifacts/1336532931
Please test this build with the enclosed libraries. To be sure I got all the details about your setup:
|
Tested: same error attach Log.txt
lsusb -t
Can I suggest you to look Sparker project XSaitekPanels to get some ideas, |
I have some small progress.
If I change the hidapi backend to hidraw (see the makefile HIDPKG variable), I have some more detailed error messages:
with libusb backend the same error message (not implemented ... ) appears what you found.
|
attached log file test_log.txt About your 3rd point I'll try modified config this evening when I'll come back home from work :-) ....stay tuned :-) |
based on what you wrote:
I updated my test application, and it now runs properly. Thanks for the hint. Now I use the hid.c from the latest version of hidapi instead of linking to the system installed libraries. I created a new build of the plugin on my Ubuntu. Unfortunately, I can't test it, so may I ask you to do a quick test with |
Now plugin doesn't load due this error: About your previouse question:
Error persist again whitout any section about multidisplay and buttons like this:
|
I found this bug on hidapi repository and I suspect that it could be the reason of this bug. In the discussion someone suggests to use hidraw instead hidusb for Linux platform due a timeout issue |
Yes, I know this bug and I modified my build to use hidraw accordingly. It solved the issue with my test application, but unfortunately, the plugin still doesn't work in your environment (undefined symbol: hid_exit): I gonna build a PC with Linux & X-Plane to be able to test the plugin on Linux. I try to do my tests tonight and I'll update you on the progress. Hope I can fix this hidapi related issue soon. |
I spent two days with a stupid mistake :-( I added the hidapi as a source to my project. It's a strange behavior of CMAKE that it ignores silently the .c file if the project is c++. It doesn't matter I added the hid.c to the source tree explicitly. Just for reference, here is the dependencies you have to install:
If it works fine I will merge it to the main line and will create a new release. |
I'm sorry, but it doesn't work...... the difference now is the error:
(error is in my language: italian) which means "Connection timed out" |
The bug you mentioned shouldn't play in my latest version. That bug is about the libusb backend, and my plugin now contains the hid.c with hidraw backend. I modified my plugin to use hiddraw instead of libusb in PR: #94 We could do a few things here:
The latest Ubuntu 22.04 binary build from my branch is here |
Your last binary (with libraries inside plugin's folder) give me this ldd output:
removing all libraries I have this output
I tried to build your sources as indicated in your point 4, but it doesn't build due an error in your sources:
You have to add After changes I built it, I used it, but same error.
One question: |
The only thing that is strange in your My device tree looks like this with the 3 Saitek devices I have:
This the content of my rule file (
When you say other plugins, you mean XSaitekpanel? If yes I need to double(triple) check the cmake files in that repo. Unfortunately, not all cmake files are in use so it's pretty hard to follow what is live and what is dead code there. |
The update for missing |
Yes, If I use ever xsaitepanel every X-Plane start is ok. These are my udev rules:
For saitek radio panels I have to enumerate my devices with "%n" suffix |
|
In this Test phase only 1, but usually I connect 3 Radio panels. I think that when I connect Radio panel device (independent by number of devices), rule create symlink with suffix (but this doesn't give any problem with XSaitekPanels plugin). What I don't understand is error message "connection timed out"... ...it seems that plugin is able to connect to device, but when it try to write bytes to it, connection is closed/fallen... During my last test, I tried to remove all plugins, but nothing had changed |
there are two differences between my plugin and xsaitek plugin:
I create a test version with the above two updates. If an error happens in It works on my Ubuntu box. |
I'm afraid, it doesn't work, same error. Attach Log.txt |
Could you please check the flywithlua plugin and its scripts? I see these lines in your last log file:
|
my plugin initialize only those devices that are in the actual xpanel.ini config file (placed in the aircraft folder). I don't load the devices when the XPlane simulator starts, only at that point where you start to load the airplane. If it is more convenient, I can create a small standalone application to test the HID devices. |
Here is a test application contains the same code parts that the plugin use:
If it works you will see a lot of This is the output on my console when I run this test program:
One more thing you can test: The hidapitester could be a good tool to see what's on your system
|
TEST APP WORKS!!!! 👍 👍 👍 Tried hidapitester and it works has expected 👍 |
It's good news 👍 If this still doesn't work, then maybe something in your XPlane simulator interferes with my plugin. Do you start any other HID related applications alongside the simulator? FYI: Here it is the code updates around hid initialization: #97 The enclosed lin.xpl contains these modifications. |
Your plugin doesn't want to work...... What I'm asking to myself is: which is the differences between you plugin and xsaitekpanels in terms of:
When you find them you probably find the answer to this mystery.... Unfortunately I'm not C++ developer and I don't understand the code :-( :-( :-( |
I'm getting run out the ideas what could be the issue here :-(
With this version you should see 123 on the top-left display of radio panel before any aircraft loaded. If it works please try to load an aircraft. |
Now when I start X-Plane display show this:
Then, when I load Cessna Error windows show known error and the device doesn't work. Then I close X-Plane without any crash :-) attached |
and what if you reload the plugin (menu --> Plugins --> XPanel--> reload plugin) |
|
Sorry, I didn't recognized the reload message in your log files (I had a quick view on my phone only) I added a hack to my code: it opens the radio devices at the very beginning but it don't close when airplane loaded (the version from yesterday closed and reopened the radio device upon plane loaded) |
Well.... as you said when X-Plane 12 starts all my 3 radio's display show "12345", but when I load aircraft, plugin stop working and shows errors in windows dialog. Can I ask you (if is it possible) to remove/comment all "send_feature_report" call from all your code (it seems that it doesn't work) so we remove annoying message error? |
I removed the send_feature_report calls from this version I also created another version
|
plugin with no-feature-report works (buttons and rotaries); I only noticed that when i push lower switch button, X-Plane zooms the view and keyboard doesn't work until I disconnect device. plugin with early-load doesn't work as usually.
PS. |
It's very strange. I noticed the same behavior (zoom on lower switch button). But only with the no-feature-report version. xsaitekpanel has a description about how to solve this kind of mouse interference: https://github.com/sparker256/xsaitekpanels/blob/master/docs/Linux_Users_Please_Read.txt That solved my problem. The identifier in the above description is not up-to-date. You can see the correct names in the output of I'm in Hungary so, I think we are in the same time zone. I really want to solve this issue, so I'll think more about it during the Easter holiday. Happy Easter to you as well! |
About the behavior I solved: I have to deactivate device in KDE, infact it identify Radio Devices as mouse device. After deactivated no more interference between keyboard/mouse and saitek :-) |
I created another version:
|
Now: |
It's strange that between the device connect and the first send_feature_report error your PC spend more than 5 seconds
On my PC (which is a much less powerful compared to yours) it is only 5 ms (not seconds but milliseconds)
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. |
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:
This is the captured USB frames in my system: 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 wireshark filter: Attached: I hope these help you |
Thanks for the tests. What I see:
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!!!!
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):
The text was updated successfully, but these errors were encountered: