libx52  0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
Command Line Interface to libx52

x52cli - Command line interface to libx52

SYNOPSIS

x52cli commands [command-options]

DESCRIPTION

x52cli is a command line interface to the X52 library that allows you to set the LEDs and different parameters on the multifunction display (MFD).

Running x52cli without any arguments will display a brief help message.

COMMANDS

Commands are not case sensitive.

  • bri { mfd | led } < brightness >
    Set the brightness of the MFD or LEDs. brightness can be any numeric value between 0 and 128. Higher values are accepted, but may not have the desired effect.
  • mfd < line > < text >
    Set the text on the MFD line. line can be 0, 1 or 2, and refers to the first, second or third line of the multifunction display respectively. text cannot have embedded NUL characters (0x00) and must correspond with the character map fo the MFD. text should be quoted in order to preserve embedded whitespace. To pass raw hex values, use printf(1) as shown in the EXAMPLES section. Note that text is limited to a length of 16 characters. While you can pass in longer strings, they will be silenty truncated.
  • led < led-id > < state >
    Set the LED led-id to state. See LEDs for a list of supported values.
  • blink { on | off }
    Turn the blink state on or off.
  • shift { on | off }
    Turn the shift indicator in the MFD on or off.
  • clock { local | gmt } { 12hr | 24hr } { ddmmyy | mmddyy | yymmdd }
    Set the clock 1 display to the current local or GMT time and date. Clock can be configured to display in either 12hr or 24hr mode. Date can be displayed in one of the following formats: DD-MM-YY, MM-DD-YY, or YY-MM-DD.
  • offset { 2 | 3 } < offset-val > { 12hr | 24hr }
    Set the offset for clock 2 or 3 and configure them to display in either 12hr or 24hr mode. offset-val is in minutes east of UTC and can range from -1440 to +1440.
  • time < hour > < minute > { 12hr | 24hr }
    Set the time for clock 1 to hour:minute and configure it to display in 12hr or 24hr mode.
  • date <dd > <mm > <yy> { ddmmyy | mmddyy | yymmdd }
    Set the date on the MFD to the values represented by dd, mm and yy in the requested format.
  • raw < wIndex > < wValue >
    Send a raw vendor control request to the connected joystick.
    Warning
    You should only use the raw command if you know what you are doing. Sending an invalid control sequence can potentially damage or destroy your device.

LEDs

This is the list of LED IDs and corresponding states supported by the X52 Pro. Note that the on state is only allowed for the fire and throttle LEDs, and they do not support the red, amber and green states. The remaining LEDs do not support the on state, but support all the other states.

Note
The led command is only supported on the X52 Pro, not on the X52.

LED IDs

  • fire
  • a
  • b
  • d
  • e
  • t1
  • t2
  • t3
  • pov
  • clutch
  • throttle

States

  • off
  • on
  • red
  • amber
  • green

LIMITATIONS

x52cli does not maintain any state between invocations. As a result the clock command will reset the relative offsets for clocks 2 and 3 back to 0 and configure them to be in 12 hour mode. To work around this, use the date and time commands instead to manually configure the date and time.

Note
The device does not have an internal clock; as a result, the MFD display will not advance automatically. You must call the clock or date and time commands periodically to update the time on the device. However, if you are running x52d and the clock manager is enabled, then x52d will manage and automatically update the clock on the X52 MFD display.

PERMISSIONS

You must have write permissions to the USB device in order to use the libx52 library, and by extension, x52cli.

The simplest method to obtain such permissions is to run x52cli as root, possibly through sudo(8)

EXAMPLES

  • Turn off the T1 LED.

    x52cli led t1 off

  • Turn the B LED to Amber.

    x52cli led B amber

  • Set line 1 of the MFD to display "Hello World"

    x52cli mfd 0 "Hello World"

  • Set line 2 of the MFD to display "¿Cómo Estás?"

    x52cli mfd 1 "$(printf '\\x9FC\\xE2mo Est\\xE0s?')"