Certain types of USB devices can be attached as a "HID device".
(That stands for "Human Interface Device device", but let's not get distracted)
The
JInput project
has provided tools for accessing these devices which we can use
to connect HID devices to events within the JMRI programs.
As a first approach to this, you can find a "USB Input Control" under the Debug menu in JMRI 2.1.5 and later. When you open the tool, you'll get a window that lets you browse the HID devices on your computer, and attach them to specific JMRI sensors and memories. You can then have Routes, Logix and scripts access that information to do whatever you'd like with the device inputs.
For more information, including some info on limitations, please see the help page for the tool.
In JMRI 2.1.5, there's only a "USB Device Viewer" browsing tool that we'll be using to check connections to various USB devices on various types of computers. By putting this out in the general test release, even if it doesn't do anything model-railroad related, it makes it much easier to test how well this works in various situations.
Eventually, we'll have more in this section.
There is currently no version of LibUSB for versions of Windows before XP, due to limitations in their USB support.
System > Administration > Synaptic Package Manager
and search for "libusb". There are four packages that start with that name; install them all.
| Version | Package Type | Panther (10.3.x) | Tiger (10.4.x) | Leopard (10.5.x) | Sources | Project Homepage | libusb | 0.1.13 beta 2008-02-02 | binary | Installer | Installer | Installer | ![]() |
http://libusb.sourceforge.net/ |
|---|