[Guide] Minecraft PE and Print Server

Moderators: mdrjr, odroid

[Guide] Minecraft PE and Print Server

Unread postby Molorius » Sun Sep 10, 2017 7:07 am

For anyone interested, I have a (relatively) easy way to setup a host+29 clients Minecraft Pocket Edition server alongside a cups/sane server on an Odroid. I am doing this on an Odroid C1+, but it should work just fine on any of the newer Odroids. A more powerful Odroid such as the XU4 would run the game better, but I saw minimal slowdown with 4 clients all on different networks.

Also, I highly recommend using ethernet instead of wifi. The game runs much better with this.

Note that the board got very hot while running this (~75C), even with all visual settings turned down (Minecraft uses a lot of resources). I recommend getting a small 5V fan to put on top of the heatsink, powering it using the C1 pins. Cheap ones are on Ebay/Aliexpress, but Noctua makes a quiet one.

This is directly using Minecraft Pocket Edition as the host, as opposed to an implementation of PocketMine or similar. This is to keep updating simple and all vanilla functionality available. This cannot be done on a Linux (Ubuntu, Arch, etc.) device, which is why I am using the Odroid.

First, install the latest Android provided by Hardkernel. This was Android 4.4.4 (v3.7) at the time of writing: https://wiki.odroid.com/odroid-c1/os_images/android/android

Next, we need to install the Google Play Store (or at least that's my favorite). Download the latest version of Open GApps for Android 4.4 (or whatever Android you installed). I like to use the 'nano' size: http://opengapps.org/
Open the Odroid Utility and select the icon in the top right. A dropdown menu will appear, select 'Package install from storage'. Go to File Manager -> Download -> open_gapps*.zip. It should then reboot and install the Google Play Store.

Minecraft Pocket Edition Server
Set this up the same way that you would start playing on a phone, tablet, etc. Buy and download the Minecraft PE app and the Xbox app. Sign into the desired Xbox live account, then start up Minecraft. Create the world with the desired options, but make sure you allow for cheats. We need this to increase the maximum player cap.
After the world has started, type
Code: Select all
/setmaxplayers 30
into the cheat menu (it automatically comes up when you start typing "/" with a keyboard). This increases the maximum players from 5 to 30. Any other number can be used, but 30 is the current limit.
To add players to the server, sign in to http://www.xbox.com with the same account the Odroid is tied to. Add the desired player(s) as a friend.

I highly recommend going into the settings and turning all video options to the lowest value. This will make the game run smoother and your Odroid happier. Lowering the Odroid resolution is also a must. It runs fine with 800x480p, or the VU7 resolution.

Note that you need to set the max players every time you stop running the app.

I have not found a way to restart the Minecraft server after power loss. If anybody knows how, please comment below.

Print Server
I rather enjoy having my printer/scanner on the network, but could not find a way to do so with Android. Luckily, it is pretty simple with Linux, and it just so happens that you can run Linux on top of Android! I did this with a free app called "Linux Deploy". It is found in the Play Store, but I'm sure there are many other places to get it.

1. Set a static IP address. Do this by going to Settings -> Ethernet (or Wi-Fi, if you're using that) -> Ethernet configuration. Set the connection type to Static IP. Every box beneath this needs to be filled in, otherwise the Settings app will crash when you try to save it. Set it to whatever IP address you want. If you don't know what this is, set it to 192.168.1.{value}, where {value} is a number between 0 and 255. I have mine set to 192.168.1.100, and I recommend choosing a relatively high number. The DNS address is probably 8.8.8.8, the gateway is usually 192.168.1.1.

2. Download Linux Deploy and BusyBox. This can be done from the Play Store, or just by finding the respective apks online.

3. Open BusyBox. Click 'Install'. It will ask for root permissions, allow it forever.

4. Open Linux Deploy. Make sure it says the static IP address in the top left that you selected earlier. In the top right corner there is a box that brings you to an options menu. Change the distribution to whatever you want (I am using Ubuntu for stability), keep the architecture armhf, then choose your desired distribution (I am using xenial). Change the username to whatever you want, but I changed it to odroid so I wouldn't forget it. Go to the 'Init' menu. Click to enable the initialization system, and make sure it is set to /etc/rc.local. Go to SSH and enable it. If you want a GUI, enable that as well. This guide will be using the SSH functionality only.

5. When all settings are to your liking, go back to the main menu of the app. In the top right corner is a dropdown box, select 'Install' from that. This will take a good long while, so go write your own guide or something during this.

6. When it is all done, select 'Start' from the main menu. It should tell you how the boot process is going, then say it's running.

7. On a different computer, ssh into the Odroid. The ssh command should come on all Linux computers, but if not it can be installed by downloading openssh from your package manager (apt-get, pacman, etc.). I think Putty is the preferred option on Windows. For example, on my Arch Linux computer, I ssh in by typing
Code: Select all
ssh odroid@192.168.1.100
into a terminal, where 'odroid' is the username I chose and '192.168.1.100' is the static IP I set up.

After this, I mostly just followed a guide somebody did for a Raspberry Pi print/scan server: https://samhobbs.co.uk/2014/07/raspberry-pi-print-scanner-server.

However, for some reason the print and scan services didn't start when I started Ubuntu again. To do this, I had to change my /etc/rc.local to look like this:
Code: Select all
service cups start # start printing services
service saned start # start scanning services
exit 0


8. Finally, go back to the Odroid. In Linux Deploy, click the button in the top left that opens a small menu, go to Settings. Click the Autostart option. This means that if power is lost to the Odroid, it will start back up the print server by itself.

And you're done! Now you have an Odroid that is running a 29-client Minecraft Pocket Edition server (which will be pretty great after the Better Together update) and a print/scan server! I could easily connect to the printer/scanner on both Arch Linux and Windows 10.

If you have any comments or tips/tricks, please comment below.

Also, this could obviously be used to host more than just a simple printer service, but this was just to show the idea of running an Android/Linux server on the same device.
Last edited by Molorius on Sun Sep 10, 2017 11:40 pm, edited 1 time in total.
Molorius
 
Posts: 13
Joined: Tue Mar 01, 2016 4:40 am
languages_spoken: English
ODROIDs: C1+, C2

Re: Minecraft PE and Print Server

Unread postby odroid » Sun Sep 10, 2017 10:58 am

I didn't know well how Android OS can be used for building a nice small server. You made a very practical home server indeed.
Thank you for sharing a nice guide.

BTW, if you use a DC barrel jack as a power input instead of the micro-USB port, remove J8 jumper from your C1+.
It will lower the CPU temperature a lot.
https://wiki.odroid.com/odroid-c1/hardw ... _odroid-c1
User avatar
odroid
Site Admin
 
Posts: 25009
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Minecraft PE and Print Server

Unread postby Molorius » Sun Sep 10, 2017 1:40 pm

I just thought this was a good use for it, and there aren't too many other boards that can do this. I have used my Odroids for several projects, and I will try to post any useful ones here.

Thanks for the suggestion, but I already have the J8 jumper removed. My C1+ gets really hot while running Android games, but I don't know if that happens with others. A small fan brings the temperature down to 45C.
Molorius
 
Posts: 13
Joined: Tue Mar 01, 2016 4:40 am
languages_spoken: English
ODROIDs: C1+, C2

Re: [Guide] Minecraft PE and Print Server

Unread postby odroid » Mon Sep 11, 2017 9:26 am

We could see over 80C of CPU temperature too when we ran some intensive CPU burning tests.
User avatar
odroid
Site Admin
 
Posts: 25009
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: [Guide] Minecraft PE and Print Server

Unread postby Molorius » Fri Oct 06, 2017 10:48 am

For anyone reading this later: the Better Together update (version 1.2) made the C1 not run Minecraft as well. It starts stuttering when about 5 people join, or less if there are many things happening around a player. The C2 runs the game quite well with 10 people and many things happening around each of them, and can probably handle more but I have not tested this. I do not have an XU4 to test with.

Have fun with your slapped-together server!
Molorius
 
Posts: 13
Joined: Tue Mar 01, 2016 4:40 am
languages_spoken: English
ODROIDs: C1+, C2


Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest