Coder Social home page Coder Social logo

Build Instructions about libx52 HOT 8 CLOSED

nirenjan avatar nirenjan commented on June 1, 2024
Build Instructions

from libx52.

Comments (8)

nirenjan avatar nirenjan commented on June 1, 2024

Most cases, it should just be cd'ing to the folder and running make. If you see some folder that doesn't have a Makefile, feel free to add one and raise a pull request.

from libx52.

rogerxxxx avatar rogerxxxx commented on June 1, 2024

Looks like there's no top-level Makefile, and manually changing into each sub-folder is required. (Guess I wasn't awake and did not think to use find!)

Compiling seems to be broken with linux kernel 4.1.12-gentoo.

from libx52.

nirenjan avatar nirenjan commented on June 1, 2024

I'm presuming the issue is with the kernel module, I haven't really worked on that in a long time. Just so you know, the standard driver does work, at least as far as input goes. The lacking features are, to my knowledge, control of the LEDs & MFD (state & brightness) and the mode selection. I'm working on a userspace driver that should solve this - check the libx52 folder.

Be aware that this is still a work in progress, and this repo is in no way close to a final form.

from libx52.

rogerxxxx avatar rogerxxxx commented on June 1, 2024

libx52 compiles and works marvellously. (Obviously somewhat simple though.)

I have attempted to use USB Snoopy or Wireshark to capture USB traffic too and from the device, while modifying the button colors. I know I captured the specific packets, I just had problems reading the packet line due to my lack of knowledge with the USB transfer protocol. I guess the only method, is to study the USB protocol in order to attempt to decipher the traffic, but I constantly lack time and have other higher priority tasks.

I have Windows XP (several duplicate clones) within VirtualBox. And then I used WireShark to analyze USB traffic. Modifying the button colors within Windows XP just after starting WireShark, and then stopping WireShark just after is the easy part. And the traffic can be readily seen. But I also heard VirtualBox just transfers generic HID input recently.

Another stumbling block; although I understand hexadecimal (ie. HEX), trying to translate the hexadecimal data is very time consuming. Much much easier just to have the specifications (ie. spec sheet) or data sheet on hand! If I had the color codes, or something unique documented, I would be able to narrow my focus more so. As far as the date and time setting, I think something also may stand-out, but on the flip, I NEVER look at the MFD! About the only useful task with the joystick, aside from the joystick axis and buttons, are the button LED colors. But rarely does the user likely look at the button colors once they have memorized the buttons.

from libx52.

nirenjan avatar nirenjan commented on June 1, 2024

Ah, if all you need is the packet specification, take a look at this page. I've documented all the known packets there, mostly picked up from the original x52pro library, and I've tested the lot.

I'm making some additional changes to the library to make it somewhat simpler to control by the user. For example, the LED API right now is simply setting an index to on or off, but I'm making some changes to export a list of LEDs, and set the state to a known color or on/off, as shown in this screenshot from the Windows driver

from libx52.

rogerxxxx avatar rogerxxxx commented on June 1, 2024

Oh, I'm dumb. Only one thing, why are the info/ folder files not grouped in within the docs/ folder?

Personally, I think the current X52 Pro joystick MFD is useless, until Saitek integrates a future lit display. But even then, the MFD may still remain useless in my opinion. The MFD would also have to display some useful information such as percentage of throttle, or a successful deploy report of one of the other buttons or axis. But reports of successful deployment usually requires other wiring or separate circuits within the real world, for which would likely require additional software programming, and integration with every game! Within Linux, we only really have FlightGear to work with, so this might be possible if it is feasible. ARMA 3 and maybe a few other games or simulators have native Linux code binaries, but still no export interfaces for such a feature.

from libx52.

nirenjan avatar nirenjan commented on June 1, 2024

why are the info/ folder files not grouped in within the docs/ folder?

Probably just because I wrote it that way 3 years ago and never bothered to change it 😄

The display is actually lit, but for some reason, the default setting when plugging it in is:

  • Fire LED off
  • All throttle LEDs off
  • MFD backlight off
  • No time or date display

The Windows drivers have a brightness setting for both the MFD backlight and the LEDs, which by default is set to 128 (the maximum), but the Windows driver is sending the necessary control packets when the joystick is plugged in.

One way to achieve this would be to program a udev rule to send the necessary control packets to the joystick on an add action.

For the rest, Saitek did actually write a DirectOutput driver which would control the MFD text, along with functionality to display multiple pages of information, which would be controlled using the PgUp and PgDn scroll wheel below the MFD. I suspect that games haven't actually utilized it.

from libx52.

nirenjan avatar nirenjan commented on June 1, 2024

Take a look at the latest commit (@5d0684a1), I've pushed some changes to the X52 library so that you should be able to control it using the x52cli command. You should be able to build it using ./configure && make && sudo make install. Just remember that you'll probably need superuser privileges to run the x52cli command, since that's needed by the USB subsystem.

from libx52.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.