Announcement

Collapse
No announcement yet.

HID problem after 2.12 update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HID problem after 2.12 update

    Hi,

    I've been using Osculator 2.11 (I'm fairly sure this was the version I was using) to send Wii remote and Wii Balance Board data to the Unity 3D game engine. I use HID event type to send joystick values. This stopped working when I upgraded to version 2.12. I can still connect the Wii devices (this works great!) with the latest version. I also checked and found that I can see and receive data from the Osculator virtual HID devices in a Max patch (using the "hi" object). I confirmed that my Unity 3D code is still working by plugging in a physical USB joystick (recognized as a real HID device). This works perfectly. Did anything change in the HID format with the transition from 2.11 to 2.12? I'm running out of debugging strategies. Thanks for any suggestions!

    Byron

  • #2
    Hi Byron,

    The HID format has not changed since the last minor release (2.11).
    I just tried with OSCulator 2.12.0.3 (latest release at this time) and found no problem. I tested with the Max 5 object "hi" and the HID debugging utility HID Explorer.

    If you Wiimote work well with the latest version, it means that OSCulator's kernel extension has been updated to the latest version. Also, when you trigger a HID event in OSCulator, and you see the activity monitor blinking green, it means all is ok. Is it blinking red? If so there's a problem.

    Perhaps you could try to uninstall and reinstall the kernel extension (see last tab of the Preferences window), and then restart your computer, but I doubt it won't change anything.

    I can send you the HID Explorer so you will be able to tell if the OSCulator HID devices are listed. Note that you can do that with the "hi" object by sending the 'info' message. All is setup and wired for you in the object help documentation.


    Best,
    Cam

    Comment


    • #3
      Hi Cam,

      Thanks for the quick response. You confirmed what I had gathered from reading the release notes on the 2.12.

      I had already uninstalled and reinstalled the kernal extension and rebooted the computer (though I'm not sure of the full sequence) of events. Everything seems to be working perfectly based on the feedback from Osculator (the activity monitors blink green, the quick look data appears normal, pairing and reconnecting to previously paired devices works fine).

      In Max I see the OSCulator HID 1 and 2. When I route the outputs from elements 20 and 21 I get values ranging from close to zero to around 64000 (this is testing with a Wii remote).

      I just did another test and found a possible clue to the problem. The relationship between the channels (set in OSCulator) and the joystick axes in Unity are not matching up.

      In my prior configuration (working in 2.11) this was the relationship:
      OSCulator: Joystick-1 X, channel 1 = Unity: Joystick 1, X axis
      OSCulator: Joystick-1 Y, channel 1 = Unity: Joystick 1, Y axis
      OSCulator: Joystick-1 X, channel 2 = Unity: Joystick 2, X axis

      This is the current relationship (in 2.12):
      OSCulator: Joystick-1 X, channel 1 = Unity: Joystick 2, X axis
      OSCulator: Joystick-1 Y, channel 1 = Unity: Joystick 2, Y axis
      OSCulator: Joystick-1 X, channel 2 = Unity: Joystick 3, X axis

      Any idea why this shift would have occurred? Note that this is what I'm getting using a single Wii Remote (newly paired to the computer). I tried numerous combinations of Joystick channels and axis with my Balance Board and another Wii Remote and did not get this working configuration. With my original hardware I see no data in Unity in any configuration of these parameters (even though all other indications are that everything is working). The problem may very well be with Unity and not with OSCulator at all, but the problem only arose after the transition from 2.11 to 2.12. I'll try deleting my pairings and and do fresh pairings of the other devices when I get back to them.

      Thanks again for the help!
      Byron

      Comment


      • #4
        Quick update: I have the system working again with my original hardware (after a deleting and reestablishing pairings), but I'm still a little puzzled and concerned about how it is working.

        I'm now using these settings:
        OSCulator: Joystick-1 X, channel 1 = Unity: Joystick 3, X axis
        OSCulator: Joystick-1 Y, channel 1 = Unity: Joystick 3, Y axis
        OSCulator: Joystick-1 X, channel 2 = Unity: Joystick 4, X axis

        The mapping from OSCulator to Unity is strange enough to begin with (OSCulator channels corresponding to Unity Joystick numbers), but this incrementing of the relationships is really odd (and concerning for long term use). I'll search some Unity forums and see if I can turn up any more ideas. Thanks for your help and any more suggestions. (Maybe something like deleting and forcing the recreation of a preferences file?)

        Byron

        Comment


        • #5
          Hi Byron,

          I just checked and it seems the joystick channels are properly set.
          I don't see a difference between versions 2.12 and 2.11.

          Could you please try the following test in the Terminal application?

          Code:
          ioreg -c net_osculator_driver_OSCulatorHID | grep kOSCulatorJoystickID
          You should have the following results:

          Code:
          tortilla:~$ ioreg -c net_osculator_driver_OSCulatorHID | grep kOSCulatorJoystickID
                | | |   "kOSCulatorJoystickID" = 0
                |   |   "kOSCulatorJoystickID" = 1

          Best,
          Cam

          Comment


          • #6
            Hi Cam,

            Yes, I get exactly that result:
            Code:
            | | |   "kOSCulatorJoystickID" = 0
            |   |   "kOSCulatorJoystickID" = 1
            I'm really starting to think the problem is with Unity, though I can't explain why or what the fix is yet.

            Thanks,
            Byron

            Comment


            • #7
              Dear Byron,

              I just tried again with Max/MSP making sure that events were received for the matching joystick IDs, and it looks like it is working correctly on my side. Maybe as you said a bug with Unity. I am sorry I have no other idea!


              Best,
              Cam

              Comment


              • #8
                Hi Cam,

                I agree, I can't find anything wrong with the output from OSCulator (thank you for that!). I've found a few examples from other people using Unity with OSCulator and a nice binary2text command line utility for deciphering Unity preferences/setup files, so I think I'll get it sorted out. I'll post again if I find more information that may help others, but for now I'm OK. I at least have the system working again, even if it is a little strange.

                Thanks for the help,
                Byron

                Comment

                Working...
                X