Advanced Search

Search Results (Searched for: XHC)

  • Hakan
  • Hakan
28 Feb 2026 09:18
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

One more update on display in Auto mode. NOW it does show F: and S:
and also coordinate updates.
After x minutes is seems to enter some sleep mode and stops updating the
display altogether. Buttons still work though.

I think I wrote that the component is prepared for reconnecting. No, it isn't.
If the setupAsyncTransfer() fails, the component exits.

I am testing to see if the usb part can be restarted. 


 
  • Finngineering
  • Finngineering
28 Feb 2026 07:08
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I'm fairly sure I fixed the 0.0035% bug I mentioned in the last post. Swapping two lines in the code should have been enough. Right now, I'm not aware of any real bugs in my firmware. I will continue using it with the dongle/pendant on the mill. But unless something comes up, I consider it good enough.

Unfortunately, I was mistaken about the bootloader version where the dongle firmware can more easily be read out. It is possible for versions before 2.40, but not with version 2.40 or 2.50. So right now there is no easy way to read out the whole firmware from the dongles.
  • Finngineering
  • Finngineering
27 Feb 2026 07:24
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I think the data looks okay for you Hannes, and it seems likely that the firmware on your pendant doesn't support the F/S indications. I am not setup to build linuxcnc on this machine right now, but here is a screenshot from Wireshark showing the same type of data as your terminal output:
 
The highlighted line is the last part of the report, where the feed and spindle overrides are given. For me, both were at 100% = hex 0x64. My pendant also shows the F/S values in auto mode when a program is running. Many different firmware variants, I suppose...

I've had LinuxCNC simulation running a long G-code program a couple of nights to see if I can find some issues with my dongle firmware. So far, no disconnects nor any other meaningful issues. Sometimes (around 0.0035% of the time) it send a zero-length package, which is not correct, but neither is it harmful. I will try to look over the USB handling to see if I can get rid of that one.
  • Hannes
  • Hannes
26 Feb 2026 22:01 - 26 Feb 2026 22:02
Replied by Hannes on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I just had an idea: I don't need A/B/C, so I wired the feeds to these channels. It works way better anyway and I can use the jog wheel.

You can not use this in MDI mode due to when jogging, the WHB automatically changes to manual mode.
In auto mode with linuxcnc 2.9.8 without my patch, you probably will get a lot of error messages due to the whb wants to change from auto to manual. But this is gone with this fix:
github.com/LinuxCNC/linuxcnc/pull/3810/c...f939ee3cfb99275R1344

See 

File Attachment:

File Name: xhc_whb04b_6.hal
File Size:15 KB
after:
#Rewire feeds to A/B/C

 
  • Hannes
  • Hannes
26 Feb 2026 21:07
Replied by Hannes on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Hmm, mine shows always 0. In Mach3, Mach4 and LinuxCNC.

I'm pretty sure I just have a variant with a different buggy firmware than yours.

However, if you have time to spare, you can comment out the line in my last post, recompile linuxcnc and send me the result. Which version of LinuxCNC are you using?
  • Hakan
  • Hakan
26 Feb 2026 20:30 - 26 Feb 2026 20:31
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Short update on that, Hannes. 
While in auto mode and running a program it doesn't show F: nor S:
It does react on Feed+/- and Speed+/- but only on displayed values in the HMI, not the pendant display.
In Man mode it shows F: and S: in the way one expect.
  • Hannes
  • Hannes
26 Feb 2026 20:23
Replied by Hannes on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

@Hakan:
Strange. Mine doesn't show anything. But it's an LHB04B-6 TX V3 (Wired version)
As much as I read, it should work the same, but might be not.

Starting with -Ha and commenting out github.com/LinuxCNC/linuxcnc/blob/master...whb04b-6/usb.cc#L209 it shows:

out 0x06fefdfe801800bc 060e0800161e0200 06008069006e0000
out size 24B hdr 0xfdfe dom 0xfe status 0x80 coord1 +0024.3772 coord2 +0008.7702 coord3 -0002.0000 feed 0105 spindle feed rate 00110

So it seams the values are sent. Might be my device has a different firmware. With Mach3, I tried already and I didn't see any value. I will try again with Mach4.
  • Finngineering
  • Finngineering
26 Feb 2026 10:13
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Do you mean that the pendant did not recover in the above situation after you had commented out the assert line?

You could enable all logging by adding the "-a" option when loading the xhc-whb04b-6 component. It will write a lot of things to the terminal... which makes it easier to figure out if it gets stuck in some specific part of the code.
  • Hakan
  • Hakan
26 Feb 2026 08:44
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I have added a bit more logging to the component..
The component is attempting to connect, it says, but I wonder if it actually tries and why that doesn't work.
  • Finngineering
  • Finngineering
26 Feb 2026 08:29
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Okay. I did not really think that libusb_fill_interrupt_transfer() would solve the issue. But that IS the correct function to use in any case.

If the disconnect happens only at mode switches, I'm pretty sure it can be solved simply by modifying the xhc-whb04b-6 component. Maybe we need to add some more (temporary) logging to the component to pinpoint the issue.

It appears our dongle firmware is different by one version increment. But of course the hardware side is the important one for compatibility. I would think that there is a good chance that the hardware is compatible or the same.
  • Hakan
  • Hakan
26 Feb 2026 08:10
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

The sticker on my pendant 
 

Had two crashes yesterday. Mode switching. libusb_fill_interrupt_transfer() isn't the solution.
 
I had commented out the assert() in setupAsyncTransfer and let it continue
Failed here github.com/LinuxCNC/linuxcnc/blob/0673e3...whb04b-6/usb.cc#L541





 
  • Finngineering
  • Finngineering
24 Feb 2026 19:42
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I used the mill for a couple of hours today with my firmware in the pendant. I tried my best to cause some issues, but no disconnects from the dongle nor any other issues as far as I could tell. To be honest, I'm surprised that it works this well already.

I found a sticker with version information on the back on my pendant (underneath the rubber):
 
The top row is the firmware version and the bottom row the hardware version, I believe. And the RX should be the dongle, because there is a V09 marking on the main board (underneath the RF module).

And I attach a couple of photos from the dongle as well, in case somebody wants to compare. Not the best photos. I took them through the microscope some months ago. And right now I have a thousand wires connected for debugging, so not possible to take good photos at the moment.
 
 
  • Finngineering
  • Finngineering
24 Feb 2026 12:38
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Thank you for testing. The output indicate that the program was working as expected. The firmware is not exactly the same as mine, but it looks similar. How big differences/similarities there are would require disassembly comparing those. I can see that at least memory addresses are a bit different. Here is the output from mine (not the real dongle, I put the factory firmware on another device which has bootloader version 2.40):
$ ./firmware_readout firmware.bin 
1771943478.782 info: Read device descriptor with idVendor=0x10ce and idProduct=0xeb93
1771943478.783 info: Starting firmware readout process
1771943480.843 info: Read  5496 of 65535 bytes =   0.08%
1771943480.846 info: Found bootloader version 2.40 device descriptor after 5481 bytes
1771943480.846 info: Based on bootloader address, read firmware is from address 0x2925 to 0x37ff
1771943480.846 info: Wrote 5496 bytes to file firmware.bin
The addresses and sizes are close to each other, but not exactly the same.

Because you have bootloader version 2.40, I believe we would be able to read out the firmware through the bootloader. But it requires creating a similar program for that as the one we just used. And to get to bootloader mode, a 10k resistor needs to be added to the pendant. So maybe better to wait until I have tested the new firmware a bit more. And then you could read out the firmware and flash the new one at the same time, if you are still interested at that point.
  • Hakan
  • Hakan
24 Feb 2026 10:14
Replied by Hakan on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

Here is what happens when I run the tool. My whb04b is from the era when they just stopped selling the predecessor.
debian@dev100:~/src/whb04b/tools$ LD_LIBRARY_PATH=/usr/local/lib ./firmware_readout a.bin
1771927787.762 info: Read device descriptor with idVendor=0x10ce and idProduct=0xeb93
1771927787.763 info: Starting firmware readout process
1771927787.872 info: Read  5440 of 65535 bytes =   0.08%
1771927787.872 info: Found bootloader version 2.40 device descriptor after 5421 bytes
1771927787.872 info: Based on bootloader address, read firmware is from address 0x2961 to 0x37ff
1771927787.872 info: Wrote 5440 bytes to file a.bin
The output from the command is attached,
  • Finngineering
  • Finngineering
24 Feb 2026 09:19
Replied by Finngineering on topic XHC WHB04B development?

XHC WHB04B development?

Category: General LinuxCNC Questions

I had a feeling that it could be possible to read out the factory firmware from the dongle due to some bugs in the firmware. And that is indeed the case, at least for a partial readout. It is possible to read the firmware from where the USB device descriptor is stored in program memory until and including the bootloader. I added this tool to the github repository:
github.com/finngineering/whb04b/blob/mas...s/firmware_readout.c
While I think this tool should be safe to use, I give no guarantees. With a partial readout, I could compare that to my firmware, and if it matches, the likelihood that the whole firmware is the same is very high.

Actually, now that I've done this, I remember that there is a much easier way to read out the firmware from CH55x with bootloader version lower than 2.50 (which is the version that my dongle has). The above tool should print the bootloader version, and if it's less than 2.50, I could maybe make a tool to read out the firmware through the bootloader and over USB.
Displaying 61 - 75 out of 217 results.
Time to create page: 1.960 seconds
Powered by Kunena Forum