Wiki

Clone wiki

KerbalSimpit / Home

Kerbal Simpit

Kerbal Simpit is a Kerbal Space Program plugin that allows one or more external devices to communicate with the game over serial connections.

Non-exhaustive feature list

  • Supports Windows, Linux and MacOS, both 32 and 64 bit KSP (with caveats, refer to the Device Compatibility section for details).
  • Supports multiple devices.
  • Uses a lightweight communication protocol. The plugin relies on a steady stream of small packets rather than packing all services in to a single monolithic packet.
  • Devices dynamically request which information they would like to receive from the game. This can be changed at will during flight so, for instance, a display with different modes can subscribe and unsubscribe from channels to only receive information relevant to the current mode.
  • An accompanying Arduino library that makes talking to the plugin relatively simple.
  • Easily extensible - other mods can establish bi-directional communication with serial devices using KSP GameEvents.

Current status

The serial support is in place, with a growing list of tested and confirmed working devices. I strongly suspect some issues (such as Teensy support on some platforms) can be resolved by somewhat more resilient serial interface handling.

Inbound and outbound event handling is in place, and a couple of basic providers for each have been implemented:

  • Echo provider. This provider simply responds to EchoRequest packets from serial devices with an EchoResponse packet directly to that device. A convenient way to check serial functionality.
  • Altitude provider. This provider currently sends both sea level and terrain altitude in a single packet to subscribers.
  • Staging provider. This provider currently listens for staging packets and activates the next stage.

Using the plugin

Supported Software

This plugin will work with both 32 bit and 64 bit versions of KSP, on Windows 10, macOS and Linux. Previous versions of Windows are currently untested.

KSP 1.2.9 (the current pre-release) only is supported.

Supported Hardware

Not all microcontrollers are supported, and some only work on some operating systems. Refer to Supported Devices for known working and not-working hardware.

Installing

I recommend using a module manager to keep this mod up to date. I use and endorse CKAN, but intend to provide support for KSP Mod Admin, and any other automated module installer that comes along. Manual installation is not recommended and I won't provide support for it.

Installing with CKAN

Kerbal Simpit is not (yet) in the main CKAN repository, instead prereleases are tracked in a separate repository. To install it:

  • Launch the CKAN GUI.
  • Open the settings (Settings -> CKAN settings).
  • Hit the New button in the Metadata repositories pane.
  • Cut and paste the following in to the text field at the bottom of the repository window: KerbalSimpit|https://hardy.dropbear.id.au/KerbalSimPit/repository.tar.gz
  • Hit OK to close the repository window, and then close the settings window.
  • Hit the refresh button to refresh the package index, then search for and install Kerbal Simpit.

Dependencies

The following additional mods are recommended:

  • Alternate Resource Panel. Kerbal Simpit uses ARP for all resource calculations. Without it, the resource level providers won't work at all.

The following mods are suggested:

  • Action Groups Extended Kerbal Simpit will integrate with Action Groups Extended if it is present, allowing full control of all 250 action groups. Without it, the stock 10 action groups will still function as expected.

Installing manually

Download the latest release from https://hardy.dropbear.id.au/KerbalSimPit/pool/.

Configuring the plugin

Refer to Plugin configuration.

Getting Started

  1. Install the plugin.
  2. There is currently no supplied configuration file. Run the game once to generate a default config. It can be found in GameData/KerbalSimpit/PluginData/Settings.cfg
  3. Refer to the Arduino library documentation to install the library and flash one of the example sketches to a demo board.
  4. Edit the Kerbal Simpit configuration file to point to your device's serial port. While testing it's also worth setting Verbose to true.
  5. Run the game again. The plugin will log successful device handshakes to KSP.log.

Hacking the plugin

Details in Plugin hacking.

Updated