Device Sorting file not working in my HW configuration
-
Hello people.
I need your help: I have developed a panel based on DirectX Input. My panel presents to FalconBms ~256 logic state and 12 analogic potenziometer. All this information are arranged into 2 composite usb HID device each composed by 4 joystick for a total of 8 joystick. Each HID composite device presents 4 interfaces ( one interface for each joystick ) from usb point of view, and Sx panel joystick’s are named IcpMfdSx1, IcpMfdSx2 and so on and the same for Dx panel with only difference of “D” instead “S”.
DxPanel has Vid=A000 Pid=0002
SxPanel has Vid=B000 Pid=1002
Fom USB pont of view, all joystick in the same panel share VID & PID, but have different Mx parameter, ( M0, M1, M2 & M3 ).Ok all works fine, but Device Sorting file is not working, in the way that Falcon handles joystick not in the order stated into DeviceSorting, but in the order in which Windows enumerates usb devices. It seems me like if falcon do not use ( or not receives ) the Interface number ( the Mx parameter ) but uses only Pid and Vid to make GUID, in fact in the DeviceSorting.txt file, that is the following, I find 4 times the same GUID for each panel….
{0306057E-0000-0000-0000-504944564944} “Bluetooth HID Joystick”
{0402044F-0000-0000-0000-504944564944} “Joystick - HOTAS Warthog”
{0404044F-0000-0000-0000-504944564944} “Throttle - HOTAS Warthog”{0002A000-0000-0000-0000-504944564944} “IcpMfdDx2”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx3”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx4”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx1”{1002B000-0000-0000-0000-504944564944} “IcpMfdSx1”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx2”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx3”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx4”Please, do you have some ideas or advices??
And there is someone that knows how falcon makes GUID or how it makes GUID??
TkankYou
Mauro -
I think the main probleme here is this
I have developed a panel based on (…) 2 composite usb HID device
In fact, you just use two different USB devices which will be recognized by BMS as such correctly.
No matter how many other devices are “connected behind” these devices.Look at this:
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx2”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx3”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx4”
{0002A000-0000-0000-0000-504944564944} “IcpMfdDx1”{1002B000-0000-0000-0000-504944564944} “IcpMfdSx1”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx2”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx3”
{1002B000-0000-0000-0000-504944564944} “IcpMfdSx4”The light blue part is always identical for each controller. I don’t know how these strings are put together, but even on my
system (TM Cougar, 2 x TM MFDs and a generic ICP) this part is identical to yours.The black part is just a description. If you do a DXdiag you will find the exact same phrases for each device.
You could change that. It has no impact on DX device recognation or sorting.Interesting is the red and the orange part.
You clearly see that the four devices behind the same HID controller share the same Vid / Pid, thus BMS sees in fact only two of them (the
two HID devices). Each controller (in this case your both HID devices) can provide due to a WIN limitation just 32 DX buttons and 8 axes.To make it work you should make sure, all of your devices are seen with different Pid / Vid strings.
-
Thank You Kolbe for your reply.
My problem is that I cannot specify a different Vid/Pid for each joystick because a composite device is a single device and so it has only one USB Device Descriptor ( that is the usb data structure that brings inside Vid/Pid informations ). Then each device brings 4 USB Interface Descriptor ( one for each joystick ). It seems that Falcon uses only usb device information to handle device sorting, and it does not use interface information.
NB really falcon uses interface informations to joystick handlings, infact all logic an analogic physical device work fine in Falcon Bms.I take this opportunity to thank you for the great work with your “BMS Key File Editor.xls”:I am using it to handle all my devices and it is very very useful.
I have added to the "BMS Key File Editor.xls " a simple macro to paste value which is very convenient when you are writing OWN devices from scratch.
Thank You again,
Mauro -
Hi Mauro,
I will point Dunc to this thread. He has implemented the device sorting.
Maybe he can give some information how to make it work in your special case.And thanks for your kind remarks about the editor.
-
Mauro,
the BMS input handling does not query the USB interfaces directly. It uses DirectInput for that, hence the only data that we can access to “identify” the devices is whatever is provided by Windows in a DIDEVICEINSTANCE structure.
Currently, only guidProduct is used in the device sorting file. Any devices that use the same guidProduct will then be sorted again by guidInstance. However, as guidInstance is tied to a specific PC and hence not portable, this info is not persisted in the device sorting file. Nevertheless, on the same PC, devices with the same guidProduct should always be sorted in the same way (assuming that guidInstance does not change for whatever reason). The pure text fields (productName, instanceName) are not used for sorting, just for display purposes.
I am not aware of a possibility to query the USB Mx interface value via DIDEVICEINSTANCE. If you can somehow encode your additional info in DIDEVICEINSTANCE - e.g. in the “wUsage” fields - and let me know what to look for, I can enhance the device sorting accordingly.
Cheers,
Dunc. -
Hi Dunc,
You were very clear in your explanation. My question is just the to understand, because once that Windows has recognized my devices, then Falcon works well, regardless of whether in the devicesorting.txt all my joysticks ( in group of four ) share the same pid / vid. I will study the references that you gave me, and if I will understand something useful I let you know.Thanks for the help and again congratulations for the excellent work you have done.
Kind regards,
Mauro -
Edit: Disregard. Reference https://www.benchmarksims.org/forum/showthread.php?26697-Your-device-numbers-shifted-in-U1
Also see:
sorting files - user/config/DeviceSorting
device axis mappings - user/config/DeviceDefaults (for some reason, editing this file doesnt have an effect on my game config)Hey guys- not sure if this is related, but I constantly have issues with BMS “remembering” which Joystick device is assigned to which devices. I.e. sometimes the flight stick shows up as buttons 1,2,3…. Sometimes it shows up starting at buttone 42,43,44…
Very annoying. Any ideas on how to force the system to keep it consistent?
Thanks