XHC WHB04B development?

More
8 months 3 weeks ago - 8 months 3 weeks ago #342812 by Hakan
Replied by Hakan on topic XHC WHB04B development?
Used the mpg today, sadly it crashed again. Loops = 10.

I actually opened an issue on github now over two years ago github.com/LinuxCNC/linuxcnc/issues/2237
No resolution. I never made a serious attempt to understand the code structure of the component.
Just looked at what was going on around the triggered assert() and made some more or less random changes.

Where is the blocking call? I'll see if I can do some ... tests.
Last edit: 8 months 3 weeks ago by Hakan.
The following user(s) said Thank You: NWE

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #342847 by Finngineering
Yeah, at least for me the loops = 10 was not the solution to everything, so not surprised the situation is the same for you. As far as I have seen, this loops = 10 would only help during a LinuxCNC mode change (auto/manual/mdi/teleop/joint).

I was not aware of that issue, so that you for bringing that up. I will write a comment there (if I can), because I think what we have discussed here is a partial solution.

I would be interesting in knowing the error message (if any) when it fails, i.e. console ouput. This I can also "generate" myself, but right now I'm not using the machine.

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago - 8 months 2 weeks ago #342848 by Hakan
Replied by Hakan on topic XHC WHB04B development?
I think the github issue is dead so better discuss here.

It's always the same error:
Code:
> xhc-whb04b-6: hal/user_comps/xhc-whb04b-6/usb.cc:465: bool XhcWhb04b6::Usb::setupAsyncTransfer(): Assertion `0 == r' failed.
github.com/LinuxCNC/linuxcnc/blob/ffc393...whb04b-6/usb.cc#L465
Don't have an actual log available, pretty sure it's that line
Last edit: 8 months 2 weeks ago by Hakan.

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #342850 by Finngineering
Okay, thank you. I'm fairly certain that the reason for that message is that the pendant (dongle) has reset itself. But I don't think we know why it did so in this case. It could be something that the xhc-whb04b-6 component is doing wrong (different from the mode change delay). But it could also be that the dongle firmware is just that unstable.

I don't have any real good way to troubleshoot this. For the mode change timeout, I could capture the USB signals with a logic analyzer. But that is not feasible with my equipment if I need to wait for maybe one hour for the issue to occur. Wireshark is a possibility, but it does not show the low level packets...

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #342853 by Hakan
Replied by Hakan on topic XHC WHB04B development?
I wonder what "r" is - it doesn't say.
I'll some printouts.
One can possibly dig deeper into the layers and see exactly where it fails.
One level down:
github.com/libusb/libusb/blob/dcd30cec9a...ff/libusb/io.c#L1486

The crashing doesn't respond well to provocations. I can generally get it to crash when switching modes,
but it doesn't crash when I want it to crash.

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #342855 by Finngineering
I'm pretty sure it's easiest to just add a printf("%d\n", r); between the libusb_transfer_call and the assert statement. And I'm also fairly sure I did that at one point.

And then you can just match the terminal ouput against the libusb_error enum:
github.com/libusb/libusb/blob/master/libusb/libusb.h#L1282

The docs for libusb_submit_transfer also has a section about the errors it can return and a little bit about what they mean:
libusb.sourceforge.io/api-1.0/group__lib...7dad2fee4b27962848ce

Please Log in or Create an account to join the conversation.

Time to create page: 0.152 seconds
Powered by Kunena Forum