XHC WHB04B development?

More
7 months 4 weeks ago #343728 by Hakan
Replied by Hakan on topic XHC WHB04B development?
I use the built-in :) libusb-1.0 in debian bookworm (12.13)
It says 
#define LIBUSB_API_VERSION 0x01000109
in the include file.

I was able to install libusb 1.28, compile xhc component with it and at least it starts.
I have a minimal milling job this afternoon. I'll see how it reacts.

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

More
7 months 4 weeks ago #343731 by Hakan
Replied by Hakan on topic XHC WHB04B development?
Exactly the same log message.
I also tested to unplug + plug back the dongle. Exactly the same log message.
Both ended up in the debug message in libusb.

It can of course be my hardware. It isn't to difficult to test with another test computer I have.

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

More
7 months 4 weeks ago #343744 by Hakan
Replied by Hakan on topic XHC WHB04B development?
Duplicated the setup to a N100 mini-PC.
Couldn't crash the xhc, didn't try for that long though.
So I unplugged the dongle. Put it back.
And it restarted and continued to work. Like magic.

It didn't fail at the usual setupAsyncTransfer, it was somewhere else.
 

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

More
7 months 4 weeks ago #343751 by Finngineering
Okay, so maybe we can conclude that somehow the hardware is not 100% suitable on your "real" setup?

If you still test on the N100, I believe you could force the setupAsyncTransfer error by putting the loops back to original values (or even higher), and jogging while a program is running.

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

More
7 months 4 weeks ago #343761 by rodw
Replied by rodw on topic XHC WHB04B development?
Reading something today. Maybe try using smp affinity to lock the USB interrupt to  Core1 (away from core 0 housekeeping) and assuming > 2 cores. You can find the interrupt by
cat /proc/interrupts | grep -i usb

Then follow one of the many posts about cpu affinity for networking. Just remember you need to reset this on every boot.

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

More
7 months 4 weeks ago - 7 months 4 weeks ago #343782 by Hakan
Replied by Hakan on topic XHC WHB04B development?
With loops 100 I easily got a crash.
Unfortunately it dídn't recover. Same old libusb debug message.
Code:
hal   failed to wait for requested mode. waited 500ms task: main loop took 0.018703 seconds r = -4 when fail Failed at 1 transmission failed, try to reconnect ...-4 transmission failed, try to reconnect ...-4 connection lost, cleaning up libusb_handle_events_timeout_completed done 0 libusb_release_interface done -4 libusb_close done process done Done with process() About to tear down usb Trying again for 100th time Started while looooop After initWhb() init  pausing 3s, waiting for device to be gone ....... done init  usb context ... ok init  not waiting for device XHC-WHB04B-6 vendorId=0x10ce productId=0xeb93, will continue in 0s .... ok init  XHC-WHB04B-6 device found init  detaching active kernel driver ... ok init  claiming interface ... ok Before mUsb.isDeviceOpen() is Open libusb: debug [libusb_unref_device] destroy device 3.8 Shutting down and cleaning up LinuxCNC... Running HAL shutdown script
This is on the "new" N100 mini pc.
Last edit: 7 months 4 weeks ago by Hakan.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum