falano Posted Thursday at 07:20 AM Report Posted Thursday at 07:20 AM Hello everyone. I'm new to this forum. I need to repair an F18 Super Hornet VRS simulator. The HOTAS for the throttles, joy stick, and pedals are commercially available and are controlled by FSUIPC. However, the rest of the hardware is controlled by a non-commercial HID, and FSUIPC v6 either doesn't detect it or I don't know how to get it to detect it. I've programmed some switches with events and SimConnect, but the F18 VRS is very limited, and I have no experience programming using FSUIPC. In the event that FSUIPC isn't able to detect the HID, could you recommend some documentation for doing so using the FSUIPC SDK? Thank you very much.
John Dowson Posted Thursday at 08:54 AM Report Posted Thursday at 08:54 AM 1 hour ago, falano said: However, the rest of the hardware is controlled by a non-commercial HID, and FSUIPC v6 either doesn't detect it or I don't know how to get it to detect it. FSUIPC will only detect joystick type HID devices. Could you show me / attach your FSUIPC6.log and FSUIPC6.ini files, and the output from the HidScanner program (should be in your FSUIPC6 Utils folder). 1 hour ago, falano said: In the event that FSUIPC isn't able to detect the HID, could you recommend some documentation for doing so using the FSUIPC SDK? The FSUIPC SDK only provides functions for reading/writing to FSUIPC offsets - it has nothing for devices. You should be able to use the lua com library to detect (and control/assign) your device. Start with using the HidDemo.lua and adapt that to see if it detects your device. The script should be available in the lua example scripts package in your FSUIPC6 Documents folder.
falano Posted Friday at 08:10 PM Author Report Posted Friday at 08:10 PM Thanks, John, for your response. FSUIPC6 doesn't detect the HID. Therefore, it's nothing shown in FSUIPC6.INI. It's a non-commercial HID, however, with the Hidapi library, I can read its 64-byte output buffer and identify the Sim's hardware activity, but I don't know how to send messages to Prepar3D corresponding to the hardware signals. The VRS F18 Super Hornet documentation, defines many keys for the weapon, and I can manage them by sending the keys to the Prepar3D window, but there are many switches not mapped to keys. I've attached a diagram to better understand my problem. Could I get FSUIPC6 to recognize the HID? I know its VIP and PID. If FSUIPC recognized it, I could create macros with the mouse. I think this would solve my problem. I have never worked with the Lua library or script. If you think it's best best way, could you recommend some documentation? Thank you very much for your time. Esquema del Proyecto.xlsx
John Dowson Posted Saturday at 09:33 AM Report Posted Saturday at 09:33 AM 13 hours ago, falano said: I don't know how to send messages to Prepar3D corresponding to the hardware signals. You use SimConnect, or you can use the FSUIPC SDK for this. If your program is getting events for button presses, you can then sent an event on to P3D using SimConnect, or write to an FSUIPC offset to trigger an evemt. 13 hours ago, falano said: Could I get FSUIPC6 to recognize the HID? As I said, FSUIPC only recognises joystick type HID devices. for other devices, you can maybe use the Lua com library. 13 hours ago, falano said: I have never worked with the Lua library or script. If you think it's best best way, could you recommend some documentation? Again, as I said, first try using the HidDemo.lua program. You need to edit this to provide your device PID and VID. take a look at that and try that. This will convert any buttons on your devices to virtual buttons/flags that you can then assign in FSUIPC. And it writes axis values to offsets which you can then also use. This lua script is provided as a demo, but is useful for testing if you can control your device via this. If so, then take a look at the lua com library API in the FSUIPC Lua Library document. In FSUIPC. you can also try logging your HID devices to see if this is seen - from the Lua com library documentation: Quote NOTE: Logging HID devices in FSUIPC. You can get a list of all HID devices connected to your PC, as well as their comings and goings, by setting the Custom log value (available from the Log menu) to x200. John
John Dowson Posted Saturday at 06:39 PM Report Posted Saturday at 06:39 PM I would like to know if the lua com library can see (and therefore be used to control) your device. I think that would be the easiest solution. If not, rather than bespoke programming, you could look into MobiFlight or SIOC (from OpenCockpits). Many home cockpit builders use this in conjunction with FSUIPC. But I can't help with these products as I have never used them - I do however support FSUIPC users who use these with FSUIPC. Also, have you asked on the support for your device? It is them that should provide the software/drivers and support to communicate to the FS, especially if it is not recognised by windows as a standard "game controller", i.e. a joystick-type HID device. John
falano Posted Saturday at 09:46 PM Author Report Posted Saturday at 09:46 PM Thank you very much for your advices and time. I Let you know the out come. Jordi
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now