Advanced Search

Search Results (Searched for: XHC)

  • Hakan
  • Hakan
05 Mar 2026 14:01
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I found it.

Ok, I didn't find the reason but I found a way around it.
It always crashed for me with "libusb: debug [libusb_unref_device] destroy device 3.109"
I ran it in the debugger and saw it stopped with a SIGSEGV.
After spending too much time figuring out how to turn on core dumps, I got a core dump.
Here is the stop point.  

 

The one wonders what ctx_log_handler is
(gdb) p ctx->log_handler
$2 = (libusb_log_cb) 0xbb343c565cbddc86

I commented out this line in libusb_unref_device()
 
and then the xhc actually restarted.
Here is the log of that.
hal   failed to wait for requested mode. waited 500ms
pndnt wheel total counts {counts=-353 activeCounter=2 isLeadActive=0}
inTransfer = 0x558412062e00 deviceHandle = 0x558412066360
libusb_fill ..
.. done
Failed in setupAsyncTransfer -4
transmission failed, try to reconnect ...
transmission failed, try to reconnect ...
connection lost, cleaning up
init  pausing 10s, 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 ...1 ok
init  XHC-WHB04B-6 device found
init  detaching active kernel driver ... ok
init  claiming interface ... ok
init  enabling reception ...In enableReceiveAsyncTransfer
inTransfer = 0x558412062e00 deviceHandle = 0x558412075a50
libusb_fill ..
.. done
 ok
in    0x04 10 00 00 0f 13 00 10 delta 15 => | 04 | 10 |                 |                 |   0.1( 10%) |     Z(    ) |  \
 0 | 10
pndnt wheel  event -353
 
  • Finngineering
  • Finngineering
03 Mar 2026 15:27
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I flashed back the original firmware to my dongle for testing. When commenting out the assert and adding a debug print there instead if r != 0, I get the following output during jogging in auto:
in    0x04 10 00 00 10 11 00 10 delta 16 => | 04 | 10 |                 |                 |     1( 30%) |     X(    ) |   0 | 10
pndnt wheel  event 604
pndnt wheel total counts {counts=604 activeCounter=0 isLeadActive=0}
in    0x04 10 00 00 10 11 06 10 delta 16 => | 04 | 10 |                 |                 |     1( 30%) |     X(    ) |   6 | 10
pndnt wheel  event 610
Can't switch mode while mode is AUTO and interpreter is not IDLE
hal   failed to wait for requested mode. waited 300ms
pndnt wheel total counts {counts=610 activeCounter=0 isLeadActive=0}
Usb::setupAsyncTransfer() libusb_submit_transfer failed with code -4
transmission failed, try to reconnect ...
transmission failed, try to reconnect ...
connection lost, cleaning up
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
init  enabling reception ... ok
in    0x04 10 00 00 10 11 00 10 delta 16 => | 04 | 10 |                 |                 |     1( 30%) |     X(    ) |   0 | 10
pndnt wheel  event 610
pndnt wheel total counts {counts=610 activeCounter=0 isLeadActive=0}
task: main loop took 0.036080 seconds
in    0x04 10 00 00 10 11 00 10 delta 16 => | 04 | 10 |                 |                 |     1( 30%) |     X(    ) |   0 | 10
pndnt wheel  event 610
pndnt wheel total counts {counts=610 activeCounter=0 isLeadActive=0}
I tried more than 10 times in a row, and every time the pendant successfully reconnected. In other words, I cannot reproduce your issue. And unfortunately that also means I cannot be of much help to you.

It is a bit surprising that you get the same issue on two different machines, and I don't. Or are the two machines you tested on fairly similar? Could still be e.g. kernel version difference, I suppose. In case they have fixed some usb bugs related to this. It's a bit of a long shot, but I don't have anything better at the moment.
  • Finngineering
  • Finngineering
03 Mar 2026 12:20
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Okay, so probably not hardware related then, after all. I'll try to adjust my test setup a little bit and see if I can reproduce the issue.
  • Hakan
  • Hakan
03 Mar 2026 10:13 - 03 Mar 2026 10:15
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

With loops 100 I easily got a crash.
Unfortunately it dídn't recover. Same old libusb debug message.
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.
  • rodw
  • rodw's Avatar
03 Mar 2026 00:21
Replied by rodw on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

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.
  • Finngineering
  • Finngineering
02 Mar 2026 20:00
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

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.
  • Hakan
  • Hakan
02 Mar 2026 19:20
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

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.
 
  • Q-Man0815
  • Q-Man0815
02 Mar 2026 18:20 - 02 Mar 2026 18:41

Handrad XHC-WHB04b-6 braucht 9b für LEAD Funktion

Category: Deutsch

Signals utilized for operating spindle and feed override. The feed rotary button can serve in
  • Continuous move x% from max velocity
  • Step move x mm
  • MPG override feed/spindle
  • The special position Lead.
    Continuous: In this mode jogging is performed at the selected feed rate. As long the jogwheel turns, the selected axis moves.
    Step: In this mode the machine moves steps  wheel_counts at the currently selected step size and the current set feed rate in machine units. If the commanded position is not reached the machine keeps moving even the jogwheel is not turning.

    Lead: Manipulates the spindle override.

    MPG: Manipulates the feedrate override.

    See here  xhc-whb04b-6  

     
    Signale, die zum Betätigen von Spindel und Vorschubübersteuerung verwendet werden. Der Vorschub-Drehknopf kann dienen als
  • Countinou: Bewegung x% von der maximalen Geschwindigkeit
  • Steps x mm
  • MPG-Vorschubübersteuerung
  • Die Sonderstellung Lead


         Continous: In diesem Modus wird das Joggen mit der gewählten Vorschubgeschwindigkeit durchgeführt. Wenn man                        das Jogwheel dreht, bewegt sich die ausgewählte Achse. 

          Step: In diesem Modus bewegt die Maschine mit den Schritten  wheel_counts bei der aktuell ausgewählten Schrittgröße                  und der aktuellen Soll Vorschubrate in Maschineneinheiten. Die Maschine bewegt sich so lange bis die Anzahl der Schritte                abgearbeitet ist, selbst dann wenn das Handrad nicht gedreht wird.
         Lead: Manipuliert die Spindelübersteuerung
         MPG: Manipuliert die Vorschubübersteuerung



              Siehe auch   xhc-whb04b-6


 
  • Hakan
  • Hakan
02 Mar 2026 14:35
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

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.
  • Hakan
  • Hakan
02 Mar 2026 13:24
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

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.
  • Finngineering
  • Finngineering
02 Mar 2026 11:27
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I made some changes in my firmware so I could generate a disconnect at will. Ten times in a row, I got libusb_submit_transfer to return non-zero in Usb::setupAsyncTransfer. And every time, the pendant reconnected to the xhc-whb04b-6 component without issue. In other words, I am unable to reproduce your issue, which more or less means I cannot help you directly. However, you mentioned that you had to change libusb_init_context() to libusb_init(). It appears libusb_init_context() was introduced in libusb 1.0.27:
libusb.sourceforge.io/api-1.0/group__lib...e12023b7399003c50470
Looking at my system, I have libusb 1.0.28-1. I think it would be well worth trying to upgrade libusb. Or if you don't want to do that, you could use LinuxCNC 2.9.8 as a "live cd" to see if that fixes the issue. This would actually be better, since it's possible that the issue could be in the Linux kernel itself.
  • Aciera
  • Aciera's Avatar
02 Mar 2026 06:49

Handrad XHC-WHB04b-6 braucht 9b für LEAD Funktion

Category: Deutsch

What does the 'LEAD' function do?
  • Q-Man0815
  • Q-Man0815
01 Mar 2026 16:29 - 02 Mar 2026 06:37

Handrad XHC-WHB04b-6 braucht 9b für LEAD Funktion

Category: Deutsch

Hallo Linuxcnc Freunde,

habe festgestellt das bei dem Handrad XHC-WHB04b-6 die Lead Funktion nicht richtig funktioniert.
Habe an der Treiberdatei pendant.cc die Zeile 346 hinzugefügt. Die "oder" Funktion für die 9b oder 1c wurde ja schon mit einegbaut. Danke an alle dafür.

Bei mir funktioniert diese jetzt und lässt sich aktivieren.
Hoffe konnte ein bisschen weiter helfen. Leider muss dazu Linuxcnc neu erstellt werden mit dem make Befehl.

Habe versucht die Datei mit hoch zu laden, hat aber nicht funktioniert.

[edit]
 
  • Finngineering
  • Finngineering
01 Mar 2026 14:05
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

That was unexpected. For all the world, it looks like this get stuck in libusb somewhere. After the "is Open" debug text, the code does the following:
1. Function call XhcWhb04b6Component::enableReceiveAsyncTransfer()
2. From XhcWhb04b6Component::enableReceiveAsyncTransfer() call Usb::setupAsyncTransfer()
3. From Usb::setupAsyncTransfer() call libusb_submit_transfer()
4. From libusb_submit_transfer() call libusb_unref_device()
5. In libusb_unref_device() print "libusb: debug [libusb_unref_device] destroy device"
6. libusb_submit_transfer() never returns is my guess
Maybe some deadlock inside libusb. Whether that would be from some bug in libusb or because of some improper handling in the xhc-whb04b-6 component, I cannot say. At least at the moment. I'll look into it some more, but not right now.
  • Hakan
  • Hakan
01 Mar 2026 11:31 - 01 Mar 2026 11:33
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Got a crash today. Seems to be the usual way. At mode and screen switch.I have seen that libusb debug printout several times before.Attach are the log and also usb.cc and xhc-whb04b6.cc to be able to follow my printouts. 
Displaying 31 - 45 out of 208 results.
Time to create page: 0.812 seconds
Powered by Kunena Forum