Hello Claudio,
As you know I’m looking to integrate the XHC HB04B manual pulse generator pendant with LW4. So far I was able to get the keys working
I’ve reviewed the code of the MPG tree and there are some chunks that are very similar to what I’ve been doing, namely separating the appSocket.on hooks into separate functions that can be called by the parseMPGPacket as well. However I took a different and very painful path when it comes to USB communications. I’m now using node-usb while I see that you are plainly using node-hid, which is much more elegant.
I can definitely put some time to make the functions more generic for HB04 and HB04B (as a side node, it’s my understanding that the wireless WHB04B shares the same protocol frames as the wired LHB04B).
Some excellent information on the HB04B can be found here:
What would it take to integrate the specifics of the MPG tree to the lw.comm-server? I would then modify the functions so they work with both HB04 and HB04B and possibly other future MPG. I did a compare and the changes are significant with lots of of new libs adaptation and firmware switch selection structures.
Cheers!