9 years, 3 months ago.

Is there a potential compatibility with the LedWiz?

I have an LEDWiz set as Device 1. I have tried the Pinscape controller (KL25Z) set at 8 (default) and 2 but when both devices are connected I have no "joystick" functions. The nudge and plunger axes disappear and only 2 button show up that are non functional. I've looked at the config.h file and nothing I do helps. I am running Windows 7 64 bit.

Any help you can provide will be greatly appreciated!

by the way...I love the controller and the KL25Z. Right now I just wish I could make it work correctly with my LEDWiz.

Thanks!

Cary

Question relating to:

An input/output controller for virtual pinball machines, with plunger position tracking, accelerometer-based nudge sensing, button input encoding, and feedback device control.

1 Answer

9 years, 3 months ago.

Hi - you have exactly my configuration (Win 7 64, real LedWiz as unit #1), so this is is definitely a workable setup. You shouldn't have to change anything in config.h to use this setup - the defaults are set for joystick enabled and LedWiz emulator enabled on unit 8.

Have you been able to get the joystick (nudge and plunger) working at all, separately from the LedWiz emulation?

Yes It works fine if I unplug the LedWiz. All of the buttons appear in the joystick setup along with the XY and Z axes. As soon as I plug in the LedWiz they all go away.

Without the LEDWiz connected I have verified everything including the plunger (CCD) and nudge. I have also tested (successfully) all of the inputs/switches.

Thanks for the fast response!

Cary

posted by Cary Owens 29 Aug 2015

Very strange! I don't think I've tried *without* the LedWiz on my system - I've just had it always connected. This sounds like a conflict somewhere in the USB HID drivers on the Windows side, but I can't think of why that would happen. I can't remember for sure but I don't think the LedWiz even uses the HID drivers.

Does the KL25Z LedWiz emulation still appear when the real LedWiz is connected? Specifically, if you run the Pinscape Windows config tool, can it still see the KL25Z (does it show up in the drop-down box for selecting the device)? If so, does the plunger calibration dialog still work? The config tool talks to the controller directly via USB, so if that can still see the KL25Z and communicate with it, it would suggest that the problem is at the HID driver level; if the config tool can't see the board, it would suggest that it's a lower level USB disconnect. I'm not quite sure how to attack either possibility, but it would narrow things down for further investigation, at least.

posted by Mike R 29 Aug 2015

One more data point: what's the blinking pattern on the LED on the KL25Z with the real LedWiz connected? That would tell us whether or not the KL25Z side thinks it's still connected at the USB level.

posted by Mike R 29 Aug 2015

Yes, the KL25Z shows up in the drop down and the plunger dialog works.

When you speak of the HID driver level, this is really above my capability to fix. Hopefully you are willing to help with this one :).

Thanks again,

Cary

posted by Cary Owens 29 Aug 2015

just saw your additional input request...The LED is blinking between blue and green about a 1Hz rate.

posted by Cary Owens 29 Aug 2015

By the way I see both devices in the devices and printers dialog. It says "Pinscape Controller" and "LED-Wiz". The issue arises when I right click on Pinscape Controller and click "Game Contoller Settings" then properties. When I would normally see 20+ buttons and X,Y and Z axes, I only see indicators for button 1 and 2 and they won't light when I short the various inputs to GND.

posted by Cary Owens 29 Aug 2015

Thanks - that at least tells us that we're not losing USB connectivity. That probably means the problem is in the Windows HID driver, which is the built-in Windows driver that handles most Human Interface Devices, such as keyboards, mice, and joysticks. I'll have to think about it and see if I can come up with any ideas for debugging this.

One more question. It sounds like the Windows "set up USB game controllers" control panel still sees the Pinscape Controller device, right? And the X, Y, and Z axes just disappear from the dialog entirely, as opposed to still being visible but just freezing in place?

posted by Mike R 29 Aug 2015

Yes, it remains visible in "devices and printers". but when I right click and click "Game Controller Settings" and then properties there is no XY or Z and only 2 button lights are visible.

Thanks for investigating. Please let me know if I can provide other information.

Sincerely,

Cary

posted by Cary Owens 29 Aug 2015

On a whim I started looking through the "details" of the "HID-compliant consumer control device Properties" and both devices have the same "Device class guid" (it is {745a17a0-74d3-11d0-b6fe-00a0c90f57da for both} they also have the same "Bus type guid". I have no idea what these are but did notice they are the same (thinking this could be a source of conflict).

Thanks again!

Cary

posted by Cary Owens 29 Aug 2015

It's not a problem in itself that they have the same GUIDs - the device class GUID just means that they both use the Windows HID driver. Your keyboard and mouse will probably have the same device class GUID. I'm not sure what the bus type guid means but it's probably similarly innocuous.

Have you tried disconnecting and reconnecting the KL25Z after the LedWiz is already established in the system? The order of connection shouldn't matter, but it's an easy thing to try just to rule it out.

Do you have any other USB joysticks you can try out, just as a sanity check that there's not something wrong with your Windows drivers?

One other thing that might be worth trying is to change USB_VENDOR_ID in main.cpp to a different value, say 0xF9FB, to see if that makes any difference. This is another thing that *shouldn't* make any difference, but it might be good to verify this experimentally.

posted by Mike R 30 Aug 2015

I have indeed tried different orders of connection with no effect.

I plugged in my Thrustmaster HOTAS Cougar and it shows all of the proper buttons and X,Y axes. So there's definitely something with the LEDWiz and KL25Z and Windows.

I'll try changing the USB_VENOR_ID in main.cpp and let you know what happens.

Thanks!

Cary

posted by Cary Owens 30 Aug 2015

Great news! Changing the USB_VENDOR_ID to 0xF9FB worked! not sure why but its ok :). However, the Windows PinscapeConfigTool doesn't recognize the device. I assume this is because of the VENDOR_ID change. Is there something that can be done about this? I've been planning to use it to calibrate my plunger and not implement the circuitry to do it without the SW.

Thank you so much for helping me debug this. Your controller is dynamite and I can't wait to finish integrating it all.

posted by Cary Owens 30 Aug 2015

So I was going through the PinscapeConfigTool source and found a reference to the FAFA Vendor ID. I changed this to F9FB and now the config tool works.

Again, thanks for the help with this issue.

posted by Cary Owens 30 Aug 2015

Glad to hear you got it working! The only downside of changing the vendor ID (other than having to make the same change in the config tool) is that DOF won't recognize it as an LedWiz emulator - that's based on the vendor ID. If you're not planning to use that feature, then it won't be a problem for you. I don't know why you ran into a conflict using the same vendor ID - maybe it's a difference in the version of the Windows HID driver you have or the version of the LedWiz firmware you have. In any case, good to know there's a solution!

posted by Mike R 31 Aug 2015

Mike,

I've been looking through the source code for the controller regarding the LedWiz emulation issue my fix causes. I'm having trouble understanding how the Joystick side of things is emplemented. Bear in mind I don't have experience with type of thing.

I notice a #define REPORT_ID_JOYSTICK 8 line in USBJoystick.h. Does this "8" have any impact on how the device is identified in windows?

I also see the following... USBJoystick(uint16_t vendor_id = 0x1234, uint16_t product_id = 0x0100, uint16_t product_release = 0x0001, int waitForConnect = true): USBHID(16, 8, vendor_id, product_id, product_release, false) Does the vendor_id item need to be altered to avoid conflicts?

If I'm wearing you out with questions, please say so and I'll just experiment on my own. But any advice you have will be appreciated.

Best Regards,

Cary

posted by Cary Owens 31 Aug 2015

That REPORT_ID_JOYSTICK macro must be inherited code - it's not used anywhere that I can find. (I branched this from the main mbed usb joystick library code and made some customizations.)

The IDs in the prototype in USBJoystick.h are C++ default values for the formals, which aren't used in this code base because the the actual constructor call explicitly supplies argument values. These comes from the USB_xxx constants defined near the top of main.cpp (USB_VENDOR_ID, USB_PRODUCT_ID, and USB_VERSION_NO). To change the vendor ID reported to the USB host system and WIndows, you just need to change the USB_VENDOR_ID constant.

posted by Mike R 31 Aug 2015