IFJoystickPi - connect your joystick devices to IF using a Raspberry Pi! (Free Beta)

Thanks for releasing IFJoystickPi!!

I’ve been running it on a headless Raspberry Pi set-up (without a keyboard or screen) for the past week and it works reliably. I thought I’d provide some details on the steps I followed to set it up.

You will need:

  • Raspberry Pi 4 (but earlier models should work too)
  • Raspberry power supply
  • Raspberry storage box (optional)
  • SD card
  • Joystick and/or other accessories

Set-up process:

  1. Connect the SD card to your Mac or PC.
  2. Install Raspberry Pi Imager on your Mac or PC and use it to write an image of the Rasbian Lite operating system to the SD card. Raspberry Pi Imager is available here: Raspberry Pi OS – Raspberry Pi
  3. Create an empty file called ssd and copy it to the top level directory of the SD card. Creating this file has the effect of enabling ssh when you boot the Pi, so that you can remotely connect to the Pi using ssh without having to plug a keyboard or monitor directly into the Pi.
  4. Create a wpa_supplicant.conf file containing details of your home WiFi network on your Mac or PC and copy it to the top level directory of the SD card. This file will instruct the Pi to connect to your home network after it boots up. Further details on creating the wpa_supplicant.conf file are available here: Raspberry Pi Documentation - Configuration
  5. Eject the SD card from your Mac or PC and insert it into the Pi.
  6. Power on the Pi and wait about 60 seconds. You should now see the Pi on your home network with the default name raspberry.local.
  7. From your Mac or PC, login to the Pi using your favourite SSH client. Your Mac or PC needs to be connected to the same WiFi network as the Pi. On a Mac you can use the terminal window and the following command: ssh pi@raspberrypi.local. You will then be prompted for a password. The default password for Raspbian Lite is raspberry. You can change the password later if you want via the Pi command line.
  8. Install Java on the Pi by executing the following commands at the Pi command line:
    sudo apt update
    sudo apt install default-jdk
  9. Install joystick drivers on the Pi by executing the following command at the Pi command line:
    sudo apt-get install joystick
  10. Download IFJoystickPI from epaga’s post above and copy both IFJoytickPI-1.0.Snapshot.jar and the lib folder to the home directory of the Pi. For example, at the Mac command line you can run the following commands to copy the files across:
    scp IFJoytickPI-1.0.Snapshot.jar pi@raspberrypi.local:
    scp -r lib pi@raspberrypi.local:
  11. Run IFJoystick by executing the following command at the Pi command line. Using nohup means that you can quit the ssh connection from your Mac or PC without quitting the IFJoystickPI application.
    nohup java -jar IFJoystickPI-1.0-SNAPSHOT.jar &
  12. Connect to hxxp://raspberrypi.local:7000/ (replace hxxp with http) from the browser on your Mac or PC and the IFJoystick web page should load. At this point you should be able to plug you joystick and/or other accessories into the Pi and they should be recognised on the IFJoystick web page. You may need to hit “retry" on the web page if your devices are not found.
  13. You should now be able to detect the devices on the Infinite Flight app on your phone or tablet. Your phone or tablet needs to be on the same WiFi network as the Pi.
  14. If everything is working, you can now quit the ssh connection from your Mac and PC and continue to use your joystick and/or other accessories in a completely headless set-up. You can view the IFJoystickPI home page at any time by connecting to hxxp://raspberrypi.local:7000/ from the browser on your phone or tablet.

I leave the Pi powered on all the time and the connection is pretty stable. However, if you lose the connection to your joystick or throttle, try to following steps:

  • Browse to hxxp://raspberrypi.local:7000/. If the web page loads but you can’t see your devices, just hit the retry button and it should detect your devices again.
  • If you get a blank page when browsing to hxxp://raspberrypi.local:7000/, then the IFJoystickPI app on your PI might have quit. In that case simply reconnect to the Pi using ssh from your Mac or PC (or from your phone or tablet) and execute the command from step 11 above to re-start the app.

I hope some of you find this helpful. Apologies in advance for any errors!

10 Likes