MP2 - V2.3 MP2 & USB Problems (1 Viewer)

aspik

Development Group
  • Team MediaPortal
  • April 14, 2008
    1,386
    556
    @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
    Country flag
    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
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Country flag
    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
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Country flag
    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

    Development Group
  • Team MediaPortal
  • April 29, 2013
    2,576
    1,294
    Home Country
    Germany Germany
    Country flag
    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
    Country flag
    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

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    @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

    Similar threads

    Thanks @high, bug report options look good now.
    Thanks @high, bug report options look good now.
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    8
    Views
    416
    Workaround:- Use the close "x" button in the top right hand corner of the screen and MP2 should restart without need to reboot.
    Workaround:- Use the close "x" button in the top right hand corner of the screen and MP2 should restart without need to reboot.
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    2
    Views
    415
    I just recently had an epiphany around QueryDisplayConfig w.r.t. how Windows deals with displays. The MS documentation uses the word 'display' to refer to both GDI-devices and the monitors themselves. There is also a zoo of different Id formats that refer to these things (adapters, displays, monitors, etc), and often no apparent way...
    I just recently had an epiphany around QueryDisplayConfig w.r.t. how Windows deals with displays. The MS documentation uses the...
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    4
    Views
    360
    @Tomkon The reported issue was fixed. The fix will be part of next release. If you are interested I might create a test version and provide the link by message.
    @Tomkon The reported issue was fixed. The fix will be part of next release. If you are interested I might create a test version...
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    7
    Views
    479
    I remember that the home content was not always up to date. One situation I think can cause this is during import as the list only update after the import is completed. Maybe we could have the force behavior during import only and after it completes the home content should always be up to date?
    I remember that the home content was not always up to date. One situation I think can cause this is during import as the list only...
    Before you create this bug report: Make sure that your system (Windows, codecs and drivers) is up to date, matching the...
    Replies
    6
    Views
    584
    Top Bottom