XLink Kai Raspberry Pi Beginners Tutorial
Hi! This tutorial will guide you through setting up XLink Kai on a Raspberry Pi to play multiplayer system link Xbox games (alsoknown as LAN mode) online.If you’ve never used a Raspberry Pi, or played on XLink Kai before then this is the tutorial for you!
Before you begin
Before you get started there are a few things you will need:
- An internet connection and router that you can log into the configuration pages (more on this later)
- A laptop or desktop computer
- A Raspberry Pi model 1b/2/3 with protective case, power supply, and micro SD card (8GB or larger)
- USB keyboard and mouse
- A Xbox console, controller, AV cables, and a system link compatible game
- 2 network cables (sometimes called patch cords)
- (Optional) A cell phone to control XLink kai, otherwise you can use a computer
To help you follow along here is the hardware we will be using in this tutorial:
- Router: Linksys E1200, a very typical router
- Laptop: Thinkpad with windows 7
- Raspberry Pi 3
- Raspberry Pi 3 protective case
- 2.5A Raspberry Pi power supply
- HDMI cable, to connect the Raspberry Pi to the television for setup
- Nexus 5 Android cell phone
- A copy of the game Halo 2, which supports system-link multiplayer
1. Network set up
For XLink kai to function you cannot use WiFi between the device running XLink (a Raspberry Pi in this case) and your game console, as such this tutorial will use wired connections with network cables. A common residential home network is shown below with internet connection, router, wired computer, and a cell phone on the WiFi
2. Raspberry Pi hardware
The hardware of the Raspberry Pi isn’t very complicated, lets get started with unboxing and installing it inside the protective case.
1. Raspberry Pi 3, Power supply, and protective case still in their boxes.
3. Raspberry Pi software
- Much like a regular computer the Raspberry Pi will need an operating system running on it before we can install any other programs, like XLink. Head on over to the raspbian website and grab a copy of the latest image “Raspbian with Desktop”. We will be using Raspbian ‘stretch’ which downloads as a file named 2017-11-29-raspbian-stretch.zip
- Once the download finishes insert the Micro SD card in your computer. You might need a USB reader if you don’t have an SD-slot
- Download and run Etcher. Select from your hard drive the Raspbian file you just downloaded, select your SD card, and click flash.
4. Once Etcher finishes flashing Raspbian to your micro SD card remove it and install it in your Raspberry Pi as shown below
5. Connect the Raspberry Pi to your network using a network cable, connect the keyboard and mouse and plug in your HDMIcable between the Pi and your TV
6. After your Pi finishes booting up you should be at the Raspbian desktop. Open the raspberry menu, go to Preferences,then open Raspberry Pi Configuration
7. Check Wait for Network. This means the Pi will wait to start the desktop, and XLink, until you have a network connected
8. Enable SSH and VNC. This will allow you to remotely control the Pi without needing a TV/Keyboard/Mouse attached later on
9. When prompted reboot the Pi
4. Installing XLink Kai
From this point forward you have two options: Use the keyboard/mount and your TV to configure XLink Kai, or do it remotely via SSH connection over the network. Some people find the SSH method easier.
4a. Installing XLink Kai via Desktop
1. Click the globe icon on the top bar to open the web browser, go to http://teamxlink.co.uk and click Downloads. Select the Raspberry Pi version in the drop down menu and click the Download button.
2. Click the folders icon to open the file manager. Navigate to the /home/pi/Downloads folder. Right click the XLink Kai download and choose Extract Here
3. Open the newly created folder. Right click kaiengine and choose Properties
4. Click the Permissions tab and change Execute to Only Owner or Anyone. Click OK
5. Click the black terminal icon in the top bar to open a terminal. Type the following and press Enter after each line:
6. cd Downloads
cd kaiEngine-7.4.31/ You might have a different XLink Kai version, adjust this to match
sudo mkdir /root/.xlink Enter raspberry if prompted for a password. This creates the configuration folder
sudo ./kaiengine This starts the XLink Kai engine
7. XLink Kai is now running
4b. Installing XLink Kai via SSH
1. Determine what IP address your Raspberry Pi has on your network. This can be done from the Raspbian desktop, a terminalby running ifconfig or by looking at your router’s status pages. Shown below is how to determine your IP address via thedesktop by mousing over the Network Manager. In this case the IP is 192.168.1.141
2. Download a SSH client such as PuTTY and use it to connect to your Raspberry Pi’s IP address. Enter the address in the HostName box and click Open
3. Click Yes to accept the SSH key when prompted.
4. Log in as the user pi with the password raspberry
5. It is a good idea to change the password used to log in, if you want you can change it type passwd and press enter. Followthe prompts.
6. Before getting XLink Kai running we need to install a few extra programs that are not included in raspbian by default. Run thefollowing command to install nano, wget and screen:
sudo apt-get update && sudo apt-get install nano wget screen
7. Download XLink Kai using wget:
You may need to change thislink to get the latest version.
8. Extract the file:
tar zxvf kaiEngine-7.4.31-rev606.headless.ARM.tar.gz
9. Move kaiengine to your home directory:
mv kaiEngine-7.4.31/kaiengine /home/pi/
10. Make the kaiengine file executable: chmod +x kaiengine
11. Create the configuration directory: sudo mkdir /root/.xlink Enter raspberry (or the password you set) if prompted for apassword.
12. Run the XLink Kai engine: sudo ./kaiengine
5. Configuring XLink Kai to start automatically on boot or if it crashes
1. Open a terminal via the desktop or SSH to your Pi
2. Before getting XLink Kai running automatically we need to install a few extra programs that are not included in raspbian bydefault. Run the following command to install nano, wget and screen:
sudo apt-get update && sudo apt-get install nano wget screen
3. If you installed XLink using the Desktop method in step 4a move the kaiengine executable to your home directory:
mv Downloads/kaiEngine-7.4.31/kaiengine /home/pi/
4. Open a new file called launchkai.sh using nano: nano launchkai.sh
5. Enter the following exactly:
7. Make the launchkai.sh file executable: chmod +x launchkai.sh
8. Edit the system launch script sudo nano /etc/rc.local
9. Insert a new line near the end of the file just above the line that says exit
10. Add this to the new line: sudo screen -DmS kaiengine /home/pi/launchkai.sh
11. Save the file by pressing CTRL O and accepting the file name by pressing Enter. Press CTRL X to close it
12. Your Raspberry Pi will now automatically start XLink Kai when turned on and will restart kai if it crashes.
13. Reboot your Pi to enable the changes
6. Configuring XLink Kai
Now that XLink Kai is running on your Raspberry Pi it is time to configure it
1. Going forward it is recommended to use XLink Kai’s web interface from either a computer or cell phone rather than theRaspberry Pi desktop. To do so you will need to know the IP address of your Raspberry Pi on your network. This can be donefrom the Raspbian desktop, a terminal by running ifconfig or by looking at your router’s status pages. Shown below is howto determine your IP address via the desktop by mousing over the Network Manager. In this case the IP is 192.168.1.141
Once you have the IP address go to http://192.168.1.141:34522/ (Your address will be different) using a computer or cellphone on your local network or WiFi
If you would prefer to continue using the desktop to use XLink Kai click the globe icon on the top bar to open the web browser,and go to http://127.0.0.1:34522/.
2. Click Configure XLink Kai
3. Enter 30000 as the Port
4. Enter your XTag (XLink Username) and password if you want to use the automatic login feature
5. Click Save
6. The kai engine will automatically restart within 5 seconds
7. Configuring your router’s firewall for port forwarding
To be able to connect to other players with XLink Kai your router needs to let the game traffic through its firewall to the static IP ofyour Raspberry Pi and then to kaiengine. How you have to do this varies wildly by router manufacturer and often by ISP. Pleaseuse the guides on the Team XLink forums and portforward.com to forward port 30000 UDP to the IP of your Raspberry Pi.
Here are instructions for Linksys routers like the E1200:
1. Log into the configuration page at http://192.168.1.1/ with the default username and password of admin
2. On the main page click DHCP Reservation
3. Check the box next to the row for your Raspberry Pi and click Save Settings. Your Raspberry Pi will now always have the same ip adress.
4. Click Applications & Gaming. Enter XLink Kai as the Application name and 30000 for the internal and external ports.Enter the IP address assigned to your Raspberry Pi and check the Enabled check box. Click Save Settings
8. Connecting your Xbox
1. The keyboard, mouse, and television arn’t needed for the Raspberry Pi any longer, only power and the network connection.
2. Connect your Xbox to your router with a network cable just like the Raspberry Pi
3. Launch your Xbox game, navigate to the system-link multiplayer section and start looking for matches
9. Joining a match
1. Open the XLink Kai Web UI on a computer/phone near your Xbox for ease of use when gaming by following Section 6 step 1
2. Log in to XLink Kai if prompted
3. You are now in General Chat. In this area you can chat with other users and send private messages to your friends on XLink
4. Click Game Arenas to enter the play area. Navigate through the menu tree to find the game you want to play.
5. Before joining a game for the first time we need to do one last check to make sure everything is working. Click Metrics at thetop of the screen. You should see Reachable: Yes indicating that port forwarding worked correctly.
6. You should now see available matches within your game and be able to join.
7. Happy gaming!
10. Wireless XLink Kai gaming (Optional)
6. You should now see available matches within your game and be able to join. 7. Happy gaming!10. Wireless XLink Kai gaming (Optional)Many users often find it difficult or impossible to run a network cable from their Xbox to their router and would prefer to gamewirelessly. Unfortunately the Xbox doesn’t play nicely with most WiFi adapters but using a Raspberry Pi it is easily possible. If youhave a Raspberry Pi model 3 you have built in wireless support, otherwise you will need to use a USB WiFi adapter plugged intoone of your Pi’s USB ports.
1. With a keyboard, mouse, and television connected to your Raspberry Pi click on the network icon in the top bar. Select theWiFi network you want to connect to and enter the password when prompted.
2. Follow section 7: Configuring your router’s firewall for port forwarding to update your firewall with your RaspberryPi’s WiFi IP address, it is different than the wired interface IP address.
3. Reboot your Raspberry Pi to force the kaiengine to restart with your new network configuration
4. Connect your Xbox directly to the Raspberry Pi with a network cable
4. Connect your Xbox directly to the Raspberry Pi with a network cable 5. Follow section 9. Joining a match to confirm connectivity is functional
6. Enjoy your new wireless freedom, game on!