-
Notifications
You must be signed in to change notification settings - Fork 72
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
Error fetching ether gadget attributes #102
Comments
I'm at "721e3a1 correct attribute import / export" which is from about 18 months ago, so I will check this with the latest code - yes still seem to getting the same with "fe39790 Merge pull request #95 from mgrzeschik/feature/meson" from September. |
I suppose an easy fix would be to remove the class_, subclass and protocol attributes, but I don't know if these are used by anything. |
Output looks ok with the attached patch, but I don't know the code well enough to know if this is the best way, it feels more like a sticking plaster than a fix :
|
I see the same issue. I am using a vendor kernel based on 5.4.212. Is there a specific kernel version that is required for the latest version of libusbgx? |
Relates to Issue #101 |
I was also using a 5.15 kernel (can't remember the exact version) on a toradex verdin dev board |
@elryno, @pboucherat-thegoodpenguin: These class, subclass and protocol variables only exist for RNDIS, but the usbg_f_net_attr(s) struct/enums are also used for NCM, ACM/ECM, EEM and so on that don't have these values in any kernel. I posted a different kind of patch in #101 that will make it work for rndis, but this would needs a bit of logic in the getter/setter functions to check if the type is RNDIS, and supply the bigger value in that case. I am using both RNDIS and NCM, and for the NCM I just had to revert commits 4ca4a76 and 36e71e1. |
The show-gadgets example fails when trying to display an ether gadget's attributes. The example programs e.g. gadget-acm-ecm create the gadgets passing a null attributes pointer, and the ether gadget only creates 4 attributes dev_addr, host_addr, ifname and qmult, whereas in src/function/ether.c there are 7 attributes defined so usbg_f_net_get_attrs() fails when it tries to fetch the fifth one (class_) and returns USBG_ERROR_NOT_FOUND. So after running gadget-acm-ecm, output from show-gadgets looks like this with the not found error where it should be listing the ecm.usb0 attributes :
The text was updated successfully, but these errors were encountered: