XHC WHB04B development?
- Finngineering
- Away
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 36
16 Feb 2026 16:35 #343054
by Finngineering
Replied by Finngineering on topic XHC WHB04B development?
Attached is the "test driver" I made, which repeatedly polls the pendant and displays the data received. It can also update the display if you uncomment the last line in usb_interrupt_callback(). Just unzip the file into a folder and running from the terminal you should get something like:You need to have libusb-1.0-0-dev installed for this to compile it. But if you already compiled LinuxCNC from source, I think you should already have it.
And regarding repeated disconnects... It may be normal behavior in as far as that is what happens. But it is for sure not correct behavior.
I would also prefer a wired pendant over this wireless one. But when I bought it this seemed like the best option for me for a relatively low cost. And I do not think that the issues we see are caused by the RF link failing.
$ make && ./whb04b
gcc -Wall -Wextra -pedantic -c -o main.o main.c
gcc -o whb04b main.o -lusb-1.0 -lm
1771265676.388 info: usb->devh: 0x564516f1abe0
1771265676.491 info: IN data: 04 10 00 00 10 11 00 10
1771265676.509 info: IN data: 04 10 00 00 10 11 00 10
1771265676.951 info: IN data: 04 10 00 00 10 11 00 10
1771265677.395 info: IN data: 04 10 00 00 10 11 00 10And regarding repeated disconnects... It may be normal behavior in as far as that is what happens. But it is for sure not correct behavior.
I would also prefer a wired pendant over this wireless one. But when I bought it this seemed like the best option for me for a relatively low cost. And I do not think that the issues we see are caused by the RF link failing.
Please Log in or Create an account to join the conversation.
- Finngineering
- Away
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 36
16 Feb 2026 16:58 #343055
by Finngineering
Replied by Finngineering on topic XHC WHB04B development?
Attachments:
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1210
- Thank you received: 427
16 Feb 2026 17:03 #343056
by Hakan
Replied by Hakan on topic XHC WHB04B development?
I was just thinking that I was able to work with the pendant for hours, despite disconnects.
You are of course right, it's not correct. The component seems to try to adapt to the situation
and succeeds to 99.5%.
Tried your code. Had to replace libusb_init_context with libusb_init, after that it ran.
You have some skills there for sure.
Yeah, it kept the pendant busy. There were no disconnects while running.
The polling stopped, or maybe the output stopped, for some ten seconds
after turning the wheel, then it started again. I guess that was intentional.
What's your idea with the code? Just for test or should it replace the usb code
in the whb04b component or ?
I should be able to downgrade my usb to usb 2.0 on wednesday.
You are of course right, it's not correct. The component seems to try to adapt to the situation
and succeeds to 99.5%.
Tried your code. Had to replace libusb_init_context with libusb_init, after that it ran.
You have some skills there for sure.
Yeah, it kept the pendant busy. There were no disconnects while running.
The polling stopped, or maybe the output stopped, for some ten seconds
after turning the wheel, then it started again. I guess that was intentional.
What's your idea with the code? Just for test or should it replace the usb code
in the whb04b component or ?
I should be able to downgrade my usb to usb 2.0 on wednesday.
Please Log in or Create an account to join the conversation.
- Finngineering
- Away
- Senior Member
-
Less
More
- Posts: 72
- Thank you received: 36
16 Feb 2026 17:25 - 16 Feb 2026 17:28 #343057
by Finngineering
Replied by Finngineering on topic XHC WHB04B development?
Yes, the output stops for some 10 seconds after operating the pendant (I think any action, not only the wheel). If you press a button during that time, it still comes through. But the regular updates resumes only after about 10 seconds.
At first I thought this 10 second delay was because I somehow polled the dongle in a wrong way. But I later tried it with the Mach3 driver, and found it to exhibit the same behavior. So I would say this is again pointing to not so high quality dongle firmware.
The idea was the program was partly to investigate the issue, partly to maybe create a new driver for LinuxCNC. Like I have mentioned, I'm not fully happy with xhc-whb04b-6 component functionality nor with how its coded (too many layers of abstraction for my liking/understanding). And the "blocking calls" are basically a fundamental issue with it. But don't get me wrong. I do appreciate and praise all the work done by the guys/gals who has made and updated the component. Evidently it works fine in many situations, just not (all the time) for me.
At first I thought this 10 second delay was because I somehow polled the dongle in a wrong way. But I later tried it with the Mach3 driver, and found it to exhibit the same behavior. So I would say this is again pointing to not so high quality dongle firmware.
The idea was the program was partly to investigate the issue, partly to maybe create a new driver for LinuxCNC. Like I have mentioned, I'm not fully happy with xhc-whb04b-6 component functionality nor with how its coded (too many layers of abstraction for my liking/understanding). And the "blocking calls" are basically a fundamental issue with it. But don't get me wrong. I do appreciate and praise all the work done by the guys/gals who has made and updated the component. Evidently it works fine in many situations, just not (all the time) for me.
Last edit: 16 Feb 2026 17:28 by Finngineering.
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds