Difference between revisions of "XLink Kai Raspberry Pi Beginners Tutorial (Xbox) (OLD)"

From Team XLink Wiki
Jump to navigation Jump to search
 
Line 2: Line 2:
  
 
'''In step 5 please use the instructions from [https://repo.teamxlink.co.uk/ repo.teamxlink.co.uk] instead.'''
 
'''In step 5 please use the instructions from [https://repo.teamxlink.co.uk/ repo.teamxlink.co.uk] instead.'''
 
+
<br />
 +
<br />
 +
<br />
 +
<br />
 
Hi! This tutorial will guide you through setting up XLink Kai on a Raspberry Pi to play multiplayer system link Xbox games
 
Hi! This tutorial will guide you through setting up XLink Kai on a Raspberry Pi to play multiplayer system link Xbox games
 
(also known as LAN mode) online.
 
(also known as LAN mode) online.

Latest revision as of 11:24, 13 May 2020

NOTE: This guide was written in early 2018 and is quite out of date! If you choose to use this guide make sure you use the latest versions of XLink Kai and Raspbian!

In step 5 please use the instructions from repo.teamxlink.co.uk instead.



Hi! This tutorial will guide you through setting up XLink Kai on a Raspberry Pi to play multiplayer system link Xbox games (also known 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/4 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:

Oldpi 01 before you begin.jpg

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

Oldpi 02 common network setup.jpg

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

Oldpi 03 raspberry pi hardware boxes.jpg

2. Unboxed

Oldpi 04 raspberry pi hardware unboxed.jpg

3. Assembled

Oldpi 05 raspberry pi hardware assembled.jpg

Raspberry Pi software

  1. 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
  2. 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
  3. Download and run Etcher. Select from your hard drive the Raspbian file you just downloaded, select your SD card, and click Flash
Oldpi 06 etcher.jpg

4. Once Etcher finishes flashing Raspbian to your micro SD card remove it and install it in your Raspberry Pi as shown below

Oldpi 07 microsd installed.jpg

5. Connect the Raspberry Pi to your network using a network cable, connect the keyboard and mouse and plug in your HDMI cable between the Pi and your TV

Oldpi 08 pi connected.jpg

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

Oldpi 09 raspberry pi configuration1.jpg

7. Check Wait for Network . This means the Pi will wait to start the desktop, and XLink, until you have a network connected

Oldpi 10 raspberry pi configuration2.jpg

8. Enable SSH and VNC . This will allow you to remotely control the Pi without needing a TV/Keyboard/Mouse attached later on

Oldpi 11 raspberry pi configuration3.jpg

9. When prompted reboot the Pi

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 ver the network. Some people find the SSH method easier.

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 dropdown menu and click the Download button.

Oldpi 12 installing xlink kai 1.jpg

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

Oldpi 13 installing xlink kai 2.jpg

3. Open the newly created folder. Right click kaiengine and choose Properties

Oldpi 14 installing xlink kai 3.jpg

4. Click the Permissions tab and change Execute to Only Owner or Anyone . Click OK

Oldpi 15 installing xlink kai 4.jpg

5. Click the black terminal icon in the top bar to open a terminal. Type the following and press Enter after each line: i. cd Downloads ii. cd kaiEngine-7.4.31/ You might have a different XLink Kai version, adjust this to match iii. sudo mkdir /root/.xlink Enter raspberry if prompted for a password. This creates the configuration folder iv. sudo ./kaiengine This starts the XLink Kai engine

Oldpi 16 installing xlink kai 5.jpg

6. XLink Kai is now running

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 terminal by running ifconfig or by looking at your router's status pages. Shown below is how to determine your IP address via the desktop by mousing over the Network Manager . In this case the IP is 192.168.1.141

Oldpi 18 raspberry pi ip address.jpg

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 Host Name box and click Open

Oldpi 19 putty.jpg

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. Follow the prompts.

6. Before getting XLink Kai running we need to install a few extra programs that are not included in raspbian by default. Run the following 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 this link to get the latest version.

wget http://cdn.teamxlink.co.uk/binary/kaiEngine-7.4.31-rev606.headless.ARM.tar.gz

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-rev606.headless.ARM/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 a password.

12. Run the XLink Kai engine: sudo ./kaiengine

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 by default. Run the following command to install nano, wget and screen:

sudo apt-get update && sudo apt-get install nano wget screen

2. 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/

3. Open a new file called launchkai.sh using nano: nano launchkai.sh

4. Enter the following exactly:

while true; do
  /home/pi/kaiengine
  sleep 1
done

5. Save the file by pressing CTRL O and accepting the file name by pressing Enter . Press CTRL X to close it

6. Make the launchkai.sh file executable: chmod +x launchkai.sh

7. Edit the system launch script sudo nano /etc/rc.local

8. Insert a new line near the end of the file just above the line that says exit

9. Add this to the new line: sudo screen -DmS kaiengine /home/pi/launchkai.sh

10. Save the file by pressing CTRL O and accepting the file name by pressing Enter . Press CTRL X to close it

11. Your Raspberry Pi will now automatically start XLink Kai when turned on and will restart kai if it crashes.

12. Reboot your Pi to enable the changes

Configuring XLink Kai

Now that XLink Kai is running on your Raspberry Pi it is time to configure it 1. Accessing the XLink Kai Web UI

2. Going forward it is recommended to use XLink Kai's web interface from either a computer or cell phone rather than the Raspberry Pi desktop. To do so you will need to know the IP address of your Raspberry Pi on your network. This can be done from the Raspbian desktop, a terminal by running ifconfig or by looking at your router's status pages. Shown below is how to determine your IP address via the desktop by mousing over the Network Manager . In this case the IP is 192.168.1.141

Oldpi 18 raspberry pi ip address.jpg

Once you have the IP address go to http://192.168.1.141:34522/ (Your address will be different) using a computer or cell phone on your local network or WiFi

3. 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/

4. Click Configure XLink Kai

Oldpi 17 xlink kai configuration.jpg

5. 6. Enter 30000 as the Port

7. Enter your XTag (XLink Username) and password if you want to use the automatic login feature

8. Click Save

Oldpi 20 xlink kai configuration.jpg

9. The Kai engine will automatically restart within 5 seconds

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 of your Raspberry Pi and then to kaiengine. How you have to do this varies wildly by router manufacturer and often by ISP. Please use 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

Oldpi 21 router home.jpg

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 address.

Oldpi 22 router dhcp.jpg

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

Oldpi 23 router firewall.jpg

Connecting your Xbox

1. The keyboard, mouse, and television aren'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

Oldpi 24 wired xbox.jpg

3. Launch your Xbox game, navigate to the system-link multiplayer section and start looking for matches

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

Oldpi 25 xlink kai general chat.jpg

4. Click Game Arenas to enter the play area. Navigate through the menu tree to find the game you want to play.

Oldpi 26 xlink kai game arenas.jpg
Oldpi 27 xlink kai game arenas halo2.jpg

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 the top of the screen. You should see Reachable: Yes indicating that port forwarding worked correctly.

Oldpi 28 xlink kai metrics 1.jpg

Scroll down in the Metrics window and check that your Xbox was detected.

Oldpi 29 xlink kai metrics 2.jpg

6. You should now see available matches within your game and be able to join.

Oldpi 30 systemlink halo2 games.jpg

7. Happy gaming!

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 game wirelessly. Unfortunately the Xbox doesn't play nicely with most WiFi adapters but using a Raspberry Pi it is easily possible. If you have a Raspberry Pi model 3 you have built in wireless support, otherwise you will need to use a USB WiFi adapter plugged into one 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 the WiFi network you want to connect to and enter the password when prompted.

Oldpi 31 wifi selection.jpg

2. Follow section 7: Configuring your router's firewall for port forwarding to update your firewall with your Raspberry Pi'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

Oldpi 32 wifi xbox.jpg

5. Follow section 9. Joining a match to confirm connectivity is functional

6. Enjoy your new wireless freedom, game on!