Since upgrading to Jetpack 4.2, this no longer works. I have confirmed the controller works on a number of other desktop systems running Ubuntu 18.04. I have also tried on a Xavier and noticed the same problematic behavior. This leads me to believe the Jetpack 4.2 ships without a driver Jetpack 3.3 included.
Reading into some other Wikis, it appears some Logitech gamepads may want the adi kernel mod. Was this included in previous version of L4T and removed in the most recent version? If so how can I add it back?
I'm looking to create a driver for a game controller I have (a cobalt flux www.cobaltflux.com ). The physical controller itself has nine face buttons and two control-box buttons (start/select). The control box has a usb port, but as far as I can tell no one has ever written drivers for it before. The end result I want is to be able to plug in the cobalt flux via the usb port and have windows recognize it as a game controller.
I have some programming experience. I'm a senior undergraduate student in computer science at UC Davis and an intern at a large embedded systems company, however this project involves several aspects I have no experience in: interfacing hardware and software via a USB port, investigating feedback from hardware I didn't build (which bits light up when I press a button?), and creating drivers and indeed programs in general for windows.
It may be worthwhile to note that I need to have joyPAD support and not joySTICK support for the buttons since play will involve pressing down any number of buttons at once and joysticks generally only register one direction of input at any given time.
When you plug in the pad via USB it announces with a device ID and a vendor ID which device it is. Windows Plug-and-Play starts searching for a driver. This mechanism spots it is a pointing device (in my case one or 2 mice) and makes sure that it is treated as a raw data input device. Input from these devices is converted to messages handled by the OS. The solution seems to be to pass the messages of such a raw input device to the right handler. In my case the two mice are both recognised as mice and the messages are used by the same handler as the ones coming from the 3rd mouse that is really my pointing device. I am not experienced enough in C++ coding in order to dig into the rawinput API. I just received an interesting link as answer on my question: at least this gives an answer on my problem. May be it will give you ideas for writing your driver! Good luck !!! Stefan
I am writting a custom joystick driver. In a sense, what I have is a USB device that uses the standad windows drivers that come with the OS but it does not look like a joystick!
The hardware provides API so I can detect the axis/button values - and would like to make these be passed as joystick input to the OS (ie. make it look like a joystick)
What I would like ask you guys is if my 2 options are sound or should I pursue another option?
Anyone has experience with HID class devices? I looked at the samples in WDM and generating the HID report descriptor and the HID report is a mess - quite few values that you have to know to set and they have to be correct so the hardware looks like an joystick input device.
Any other input, suggestions is very much appreciated. Thanks in advance.
Btw, this will by my first driver. I have read quite a bit in WDF docs on joysticks and HID, looked at briefly at the USB spec and also reading currently Developing Drivers with the Microsoft Windows Driver Foundation. I have very basic understanding of WDM and the OS related aspects.
In DirectX 5.0, DirectInput starts and offers an alternative, COM-based API. Dinput.dll uses VJoyD and, if available, the Human Interface Device (HID) stack, to provide polling services. HID devices are also reported through VJoyD so that applications that use the older API are still able to read the new devices. A driver supplied by the OEM, which can be either a DLL loaded by Dinput.dll, or an extended VJoyD minidriver, handles the force-feedback.
Joystick hardware that is not polled or that has nonstandard polling requirements can implement a minidriver (which must be a VxD) that VJoyD loads when a device of that type is in use. VJoyD also calls the minidriver to access position and button information. Joystick minidrivers are not required to provide any interfaces other than to process the standard SYS_DYNAMIC_DEVICE_INIT and SYS_DYNAMIC_DEVICE_EXIT messages when the device is loaded and unloaded, and to define and register four joystick-specific callbacks.
User mode APIs are not good for your project, makes life way too complicated. What device class is your hardware ? You will be much better off if you can get the endpoint interface for the hw itself, no need for user mode DLLs. As for vjoyd, VXDs died with windows millenium. DirectX is now on v10 or 11, v5 is no longer supported.
Another option I have is - I could write a virtual joystick driver that listens for custom IOCTLs send from user app and translates these to HID reports so it looks like a joystick but I perfer to not to do that if I can read the hardware itself.
You need to look at the descriptors to figure it out. Since you already have an analyzer, you could easily start calling APIs in a test app and then capturing what transactions on the wire result from those API calls. Or ask phidgets for the wire protocol spec
Those APIs, what exactly do you mean by that? The Phidget API shiped by the hardware dudes that are the user mode functions in the Win32 DLL? Or are these WDM APIs to access the hw endpoints? Or something else?
Because you said you are newby in device driver development, I would suggest
you to go with a user mode UMDF device driver. This way we could use the
user mode DLL Phiget provides and you could debug the driver almost as a
normal application. If you already know COM technologies, developing a UMDF
driver would be very easy.
I know you was concerned about performance, but I would not worry about that
for a device as a joystick except if this joystick have an embedded high
definition video or other very special feature. This is even more true if
you want to run the driver on a modern computer with more core than really
needed.
Those APIs, what exactly do you mean by that? The Phidget API shiped by the
hardware dudes that are the user mode functions in the Win32 DLL? Or are
these WDM APIs to access the hw endpoints? Or something else?
Because you said you are newby in device driver development, I would suggest you to go with a user mode UMDF device driver. This way we could use the user mode DLL Phiget provides and you could debug the driver almost as a normal application. If you already know COM technologies, developing a UMDF driver would be very easy.
I know you was concerned about performance, but I would not worry about that for a device as a joystick except if this joystick have an embedded high definition video or other very special feature. This is even more true if you want to run the driver on a modern computer with more core than really needed.
Absolutely true, but learning COM on a diet without learning its common facets (I say common because certain things you should know about COM to use it effectively,- I dont mean by this learning how to write ActiveX, OLE, etc. - just things COM developer should know) is really not going to be much of use for professional developer.
Yes, COM is very lightweigh - not disagreeing with that and it is not complicated if you have been doing it for few years but the learning curve is rather steep when you consider learning simple concepts such as aggregation, and COM specific concepts such as connection points, threading, etc, etc, also it is easy to forget about AddRef, Release in your code and the smart ptrs only help you so much. COM also suffers from DLL hell.
I rather stick to basics and concentrate on my business requirements by using OOP without magic and it does the trick for me, - COM is not worth the price and clearly we can see that right now - .net just like MFC was not worth the price for WIN32.
Both have their places but in common world I got around with using these technologies sparingly.
Many Game Controller problems can be fixed by updating the drivers. After you upgrade your computer to a new operating system, such as Windows 11, problems can occur because your current driver may work only for the prior version of Windows. There are two ways you can update your Game Controller drivers.
c80f0f1006