Connecting Chess for Android to a Remote Server
I have received several questions on how to connect Chess for Android running on an Android device (e.g. a phone) as client to a remote chess server (e.g. a powerful desktop), so I decided to write a small document with detailed instructions.
What you will need:
- The server software from Bernhard Wallner's chess utilities, suited for your server's operating system (if, say, your desktop runs Windows, you will need to download the Windows version). You do not need to download the client software in this case.
- The network enabled version of Chess for Android.
On the server, start the engine server software, and construct a new row for every engine you want to run remotely. Assign a name, port number, and select the full path to each engine binary (an executable that runs on the server). You can also supply command line options for starting the engine. Check the active checkboxes and click start when done. This yields something similar to the screenshots below. Here, I have started BikJump on port 1048 and Stockfish on port 1049.
Next, you will have to find the IP address of your server. You can find this, for example, using the ipconfig utility. On a local network, you can also query the router for the IP addresses assigned to different computers. Note that running a globally accessible server behind a firewall requires a setup that is a bit outside the scope of this posting (for example, you may need DDNS if your IP address is assigned dynamically, and you may need to forward ports to your chess server in a router).
On the Android device, which will be your client, start Chess for Android, long press the notation window and then select "UCI and XBoard", followed by "Import Engine", followed by "Network Socket". In the pop-up window, enter the IP address or domain name in Hostname box, and the appropriate port in the Port box. Make sure you also make the correct UCI or XBoard selection. In the example below, my server was running on IP address 192.168.1.126 and I want to connect to stockfish on port 1049. If all has been done well, this pops up the engine setup window. Select the desired parameters (note that the endgame tablebases path name applies to your server, not the Android device) and press done.
That's it! In the screenshots below, you see stockfish running remotely at about 867 KNs. In contrast, a screenshot with stockfish running as native ARM binary on the device is shown as well, running at about 67 KNs.
Comments
This would work for most engines I am familiar with.
I am making a Chess site for Kids. I saw this post. I tried all the steps correctly, but after I import the chess engine, it says "unstarted". Where am I getting this wrong
Steps followed as per your instructions
download
a) downloaded "engineServer"
b) downloaded fruit chess engine
c) downloaded network Android apk on to my mobile
Steps
a) started "engineserver". Loaded the fruit.exe, port 5050, arguements blank. Started the Engine server. It does show that the chess engine is loaded
b) installed a tiny webserver on my desktop.
e) installed bluestacks Android OS. It works fine with your Chess Program.
f) Import Engine - selected UCI, t host name = localhost, p[ost = 5050
And after I "connect" it says "unstarted"
Where am I going wrong.
a) I am certain, somehere in the port or host, there should be a missing step
b) Or maybe I should give something in arguements ?
I even tried from my android phone, after making my desktop into a DDNs using tzo
Please help
Srini
Also see
http://aartbik.blogspot.com/2009/11/en-passant-and-castling.html
https://forum.armbian.com/topic/9868-info-howto-enable-stockfisharmfish-chess-engine-as-a-tcp-service/
Can you please update it. Thank you in advance.
https://web.archive.org/web/20121014223606/http://home.arcor.de/bernhard.wallner/netChess.html