MP2 - V2.3 MP2 & USB Problems (3 Viewers)

aspik

Retired Team Member
  • Team MediaPortal
  • April 14, 2008
    1,322
    586
    @aspik What do we install that could cause this? It should be something that is uninstalled again during uninstall.
    Hi, I'm not aware of any 3rd party tool/lib which our installer is installing regarding HID.

    One thing which comes to my mind in case of side effects is the dokany lib. The version we currently install crashes EAC. This is just a guess, if it can have anything to do with the usb problems here.

    @MP2 Fan when you uninstall MP2 did you also uninstall dokany?
     

    MP2 Fan

    Portal Member
    November 20, 2020
    38
    4
    Home Country
    United Kingdom United Kingdom
    Hi, I'm not aware of any 3rd party tool/lib which our installer is installing regarding HID.

    One thing which comes to my mind in case of side effects is the dokany lib. The version we currently install crashes EAC. This is just a guess, if it can have anything to do with the usb problems here.

    @MP2 Fan when you uninstall MP2 did you also uninstall dokany?

    I'm playing this strictly by your rules. "Simon says...."
    So no, I haven't done anything outside the normal install/uninstall - except manually turn off CientLauncher so I can type here.
     

    MP2 Fan

    Portal Member
    November 20, 2020
    38
    4
    Home Country
    United Kingdom United Kingdom
    I have done further investigation and believe this is now firmly at the door of @Stéphane Lenclud

    This is a marked-up screenshot of HID Demo with my standard kit, including the KVM.

    HID Demo Devices.jpg


    Equipment VID_0C45&PID_7403 are listed on DeviceHunter.com as 'Microdia - Footswitch'. Maybe not, but Microdia do exist.
    Anyway, this is the 'Devices and Printers' properties dialog for the Chinese named box that is the KVM (it disappears if I disconnect the KVM).

    Devices and Printers Entry.png


    These are the Property dialogs for the Keyboard and Mouse showing the Device Instance Paths.

    HID Keyboard Instance Path.jpg



    HID Mouse Instance Path.jpg


    You can see that Windows only accesses the device contexts highlighted in red. The green and blue are only referenced in HID Demo, I can find no trace of them anywhere else in the system.

    Finally, I added a separate Logitech Trackman.

    HID Demo Devices with Trackball.jpg


    Yet again, the ID highlighted in red is the one that appears in the Device Instance path for this device. This time, the latter part of the ID is not replicated. HID must have a list DEV/PIDs or something that it looks up, because the above list it is the devices with HID#VID_nnnn&PID_nnnn that work and the Root#RDP_ devices that are duplicates.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I have not read the whole thread. HID Demo UI can indeed get swamped very easily it's not been optimized to sustain high traffic. Similarly software using SharpLibHid should be performance aware. I'm not aware of any performance issues with the lib itself.
     

    MP2 Fan

    Portal Member
    November 20, 2020
    38
    4
    Home Country
    United Kingdom United Kingdom
    I have not read the whole thread. HID Demo UI can indeed get swamped very easily it's not been optimized to sustain high traffic. Similarly software using SharpLibHid should be performance aware. I'm not aware of any performance issues with the lib itself.

    Not commenting about performance, it's not the issue.
    Just noting that the lib is generating four entries ( 2 x keyboard and 2 x mouse ) when there is only one of each device attached. The duplicates appear to be generated for each sub-section of the Device ID when the devices are connected via the KVM switch, whereas the directly connected Trackball creates only one entry exactly as you would expect.

    I don't want this to become a big thing, I'm sure we all have better things to do than track down one minor device connection glitch, especially as it would appear that I'm the only one that has found it a problem and reported it.
    It doesn't affect day to day usage as the real home clients are Intel NUCs used solely for MP2 via original MCE remotes.
    I have also probably been clumsy and possible a bit rude here as it's my first time on this type of forum, but certainly have meant no disrespect to all those working hard to improve a brilliant system.

    Tim.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    The lib itself is not generating anything. It merely showing what your system reports. It's common to have multiple HID devices listed for a single hardware device.
     

    Stéphane Lenclud

    Retired Team Member
  • Premium Supporter
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    I logged all WM_INPUT messages that are sent to SharpLibHid and there were around 10-12 per second. Is that too much traffic?
    For HID demo yes. It will flood the list real fast.
    Ideally there should not be any traffic if mouse and keyboard are not used.
    Keyboards are typically low traffic.
    Mice are a lot noisier but should still be silent when not used.
     

    MP2 Fan

    Portal Member
    November 20, 2020
    38
    4
    Home Country
    United Kingdom United Kingdom
    For HID demo yes. It will flood the list real fast.
    Ideally there should not be any traffic if mouse and keyboard are not used.
    Keyboards are typically low traffic.
    Mice are a lot noisier but should still be silent when not used.

    Mine is completely inert if untouched.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @Stéphane Lenclud while searching the cause for another issue, I stumbled upon this method: Slion/SharpLibHid. I don't know if this could be related to this problem here? What are the use case to repeat events that were captured?

    And for reference, this is the other stacktrace with an error from another post:
    Code:
    System.Collections.Generic.KeyNotFoundException: The given key 'SharpLib.Win32.HIDP_VALUE_CAPS' was not present in the dictionary.
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at SharpLib.Hid.Event.GetDirectionPadState()
    at SharpLib.Hid.Event..ctor(Message aMessage, HidEventRepeatDelegate aRepeatDelegate, Boolean aRepeat, Int32 aRepeatDelayInMs, Int32 aRepeatSpeedInMs)
    at SharpLib.Hid.Handler.ProcessInput(Message& aMessage)
    at MediaPortal.Plugins.InputDeviceManager.InputDeviceManager.OnPreviewMessage(SynchronousMessageQueue queue)
     

    Users who are viewing this thread

    Top Bottom