Tutorial  Updated

Install and configure switch lan-play on Android

How to setup LAN-Play on Android phone/tablet
REQUIRES ROOT and Android 7.0+


Actions in Android:
1. Install the latest Termux from F-droid
2. Launch Termux app, you'll see a black terminal window.
3. Next, enter these 3 commands one by one:
Code:
curl -L tinyurl.com/switchlan > switchlan
chmod +x switchlan
bash switchlan
note: tinyurl.com/switchlan is a link to the script on my github repo

If after "bash switchlan" there's error: "No superuser binary detected. Are you rooted?" enter these 2 commands to fix (you can paste in Termux with longtap):
Code:
pkg install sed
sed -i 's|SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su")|SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/su/bin/su")|g' $PREFIX/bin/tsu
3.5. choose what version you want to build (choose stable if latest doesn't compile)
4. It'll setup additional packages and compile lan-play from source (1-5 minutes)
5. Start WiFi tethering (or connect your phone to wifi)

Actions in HOS (Switch):
1. Connect to WiFi and configure network settings:
Code:
IP-address Settings Manual
IP-address 10.13.X.Y (where X and Y is two random numbers 0-255, example: 10.013.187.66 DO NOT COPY EXAMPLE)
Subnet Mask 255.255.0.0
Gate 10.13.37.1
DNS Settings Manual
Primary DNS 163.172.141.219
Secondary DNS 207.246.121.77
2. download ldn-mitm for your version of atmosphere
3. extract it in root of your SDcard (don't forget to clear an archive bit in Hekate if necessary)
4. reboot switch

How to connect to servers:
  • Launch Termux and enter "bash switchlan", script will ask you for root privileges and server's ip address and port
  • or enter "bash switchlan IP address : port" to skip asking part, example: "bash switchlan edgymin.ga:11451"
  • If connection was successful you'll see "Server IP: a.b.c.d" at the end
How to disconnect:
  • Long tap anywhere in Termux -> more -> kill process; or press "exit" in Termux's notification
How to delete lan-play:
  • bash switchlan remove
Changelog:
05.14.21 - replaced wget with curl, as it is preinstalled on all devices
05.16.21 - added workaround for devices rooted with superSU
10.28.21 - updated script - added option of stable release
10.30.21 - bugfixes, QoL changes to the script,
read more.
 
Last edited by ArcharGelod,

renel18

Member
Newcomer
Joined
Dec 9, 2020
Messages
8
Trophies
0
Age
45
XP
66
Country
Philippines
Tried both
Everything is ok. Is it an android hotspot you're trying to connect to? Does a phone have an internet connection?
Sometimes it bugs and doesn't want to connect just because - reboot can fix this.
Tried both hotspot and wifi but cant connect,yes my phone is having active internet, not my luckyday i guess :(

--------------------- MERGED ---------------------------

This is the error message on switch
 

Attachments

  • IMG_20210514_061143880.jpg
    IMG_20210514_061143880.jpg
    1.3 MB · Views: 209

HeiS3nB3rG

Member
Newcomer
Joined
Feb 21, 2021
Messages
10
Trophies
0
Age
26
XP
220
Country
Netherlands
I tried this method on 2 different Android devices with root access with the same result: when I run "bash switchlan" Termux returns the error "No superuser binary detected. Are you rooted?". The devices are definitely rooted, I Googled for a possible solution, but the ones I tried didn't work. Any idea on how to fix this?
 

ArcharGelod

Well-Known Member
OP
Newcomer
Joined
May 15, 2019
Messages
45
Trophies
0
Age
25
XP
545
Country
Russia
"No superuser binary detected. Are you rooted?"
type "sudo" and show what it returns.
also "su"

It's a common issue, should be fixed with next release of tsu, for now there's workaround:
Code:
pkg install sed
sed -i 's|SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su")|SU_BINARY_SEARCH=("/system/xbin/su" "/system/bin/su" "/su/bin/su")|g' $PREFIX/bin/tsu
 
Last edited by ArcharGelod,

HeiS3nB3rG

Member
Newcomer
Joined
Feb 21, 2021
Messages
10
Trophies
0
Age
26
XP
220
Country
Netherlands
I don't know which of the solutions you suggested did the trick, but now the server seems to be running, thanks.

The thing is, the Switch doesn't connect to the LAN Play server now.
I double checked the settings on the Switch side, I don't get the "IConnection" message on the Android screen.

Could it be that LAN Play does not work on some specific Atmosphere version? I'm on 0.19.2 at the moment.
 

ArcharGelod

Well-Known Member
OP
Newcomer
Joined
May 15, 2019
Messages
45
Trophies
0
Age
25
XP
545
Country
Russia
Could it be that LAN Play does not work on some specific Atmosphere version? I'm on 0.19.2 at the moment.
ldn-mitm support only atmosphere 0.19.0 and below.
Without it you can play only 11 titles, here's the list: http://www.lan-play.com/games-switch

Not sure what is "IConnection" message you're talking about.
 
Last edited by ArcharGelod,

HeiS3nB3rG

Member
Newcomer
Joined
Feb 21, 2021
Messages
10
Trophies
0
Age
26
XP
220
Country
Netherlands
The version of ldn-mitm posted on the Issues section #91 of the spacemeowx2 GitHub page should work on 0.19.2. (Sorry, cannot post URLs, I'm a newbie).

When using LAN Play on the PC, the string "IConnection" is visualized on the PC screen if the Switch connects successfully. I thought it was the same on the Android version.
 

tabzer

This place is a meme.
Member
Joined
Feb 15, 2019
Messages
5,844
Trophies
1
Age
39
XP
4,910
Country
Japan
I like this idea, but the only issue I have is that with my android device I can host a hotspot using cellular data OR have it connected to my wifi--but not both.

Is the intended use of this setup to use cellular internet? Is there something I am missing?
 

ArcharGelod

Well-Known Member
OP
Newcomer
Joined
May 15, 2019
Messages
45
Trophies
0
Age
25
XP
545
Country
Russia
Is the intended use of this setup to use cellular internet? Is there something I am missing?
In theory, this should work with phone and switch connected to the same wifi network.
But, 1- I don't have a wifi router to test it, 2 - some additional configuration might be needed (e.g. forwarding ports).

It's working on atmosphere 19.4?
try the build of ldn-mitm posted HERE, should work on ams 19.3-19.4
 
Last edited by ArcharGelod,
  • Like
Reactions: tabzer

Rabi324

New Member
Newbie
Joined
Oct 28, 2021
Messages
2
Trophies
0
Age
23
XP
51
Country
United Arab Emirates
I am only getting this error for some reason
Error running link command: No such file or directory
make[2]: *** [base/CMakeFiles/base.dir/build.make:114: base/libbase.a] Error 2
make[1]: *** [CMakeFiles/Makefile2:264: base/CMakeFiles/base.dir/all] Error 2
make: *** [Makefile:144: all] Error 2
 

Rabi324

New Member
Newbie
Joined
Oct 28, 2021
Messages
2
Trophies
0
Age
23
XP
51
Country
United Arab Emirates
I m getting this error
Error running link command: No such file or directory
make[2]: *** [base/CMakeFiles/base.dir/build.make:114: base/libbase.a] Error 2
make[1]: *** [CMakeFiles/Makefile2:264: base/CMakeFiles/base.dir/all] Error 2
make: *** [Makefile:144: all] Error 2
 

ArcharGelod

Well-Known Member
OP
Newcomer
Joined
May 15, 2019
Messages
45
Trophies
0
Age
25
XP
545
Country
Russia
I m getting this error
It's compiling fine for me, maybe try again (probably recent commits were causing issues). Delete switch-lan-play folder:
Code:
rm -rf ~/switch-lan-play
and run script again
Code:
bash switchlan
.

If that doesn't help - I've added option to compile stable release - delete folder, retype terminal commands to download latest script and follow instructions.
 

ArcharGelod

Well-Known Member
OP
Newcomer
Joined
May 15, 2019
Messages
45
Trophies
0
Age
25
XP
545
Country
Russia
Made lots of changes to the script:
-added usage info: run script with either -h --help or help argument
-fixed "Error running link command" @Rabi324
-added option to choose stable (release) or latest (clone of repo) version
-added option to delete script and lan-play folder (useful for reinstallation)
Code:
./switchlan remove
-latest version could be updated just by running
Code:
./switchlan latest
after initial build
-added pmtu prompt - required for Animal Crossing and some other games.
 
Last edited by ArcharGelod,

andrew93752

Member
Newcomer
Joined
Oct 20, 2020
Messages
10
Trophies
0
XP
1,446
Country
Germany
Sadly isnt working for me.
Installed it on Android 9 with Rootaccess, lanplay was compiled without any Problems, Switchsettings are also correct (tested with RPI and Windows PC) but i cant join a Game or create a visible Lobby.
Connecting to a Server is working without any Problem.
The Phone im using cant push the Wifi as Hotspot and with Wifi only it doenst seem to work. Last thing i could try is to use a USB to Ethernet Adapter but i dont see why it shouldnt work with Wifi only.
 

rostomz

Member
Newcomer
Joined
Nov 21, 2021
Messages
10
Trophies
0
Age
36
XP
70
Country
Algeria
I did all the 3 commands but looks like its not compiling the thing. It looks like its compiles and it shows "job done now you can start switchlan" but when i start it it asks for compiling again and again....
 

Attachments

  • Screenshot_20230812-143820_Termux.png
    Screenshot_20230812-143820_Termux.png
    157.3 KB · Views: 19
  • Screenshot_20230812-143704_Termux.png
    Screenshot_20230812-143704_Termux.png
    112.5 KB · Views: 20

vivirexti

New Member
Newbie
Joined
Feb 19, 2021
Messages
3
Trophies
0
Age
40
XP
41
Country
United States
I tried this method on 2 different Android devices with root access with the same result: when I run "bash switchlan" Termux returns the error "No superuser binary detected. Are you rooted?". The devices are definitely rooted, I Googled for a possible solution, but the ones I tried didn't work. Any idea on how to fix this?
You need to have root on you android otherwise It won't work
Post automatically merged:

I've tried this method and it worked fine
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    Batman joined the Trans Justice League
    +2
  • Sicklyboy @ Sicklyboy:
    based af
    +2
  • Sonic Angel Knight @ Sonic Angel Knight:
    Forget the base, get on the roof.
  • K3Nv2 @ K3Nv2:
    Is that a bat in your buckle or are you just happy to have me
  • Psionic Roshambo @ Psionic Roshambo:
    Wonder "Woman" lol you wonder if they are a woman?
  • Psionic Roshambo @ Psionic Roshambo:
    The Riddler has questions...
  • K3Nv2 @ K3Nv2:
    Played a little of snow day glad I didn't spend $30
  • K3Nv2 @ K3Nv2:
    It's asthetic is okay maybe a good $10 grab
  • Psionic Roshambo @ Psionic Roshambo:
    Lol is it a game about doing cocaine?
  • K3Nv2 @ K3Nv2:
    Probably in pvp
  • Psionic Roshambo @ Psionic Roshambo:
    I tried Balders Gate II on the PS2 a few minutes ago, not bad lol
  • Psionic Roshambo @ Psionic Roshambo:
    My back catalog of games is like that scene at the end of Indiana Jones where the arc of the covenant is being stored in a giant ass warehouse
  • K3Nv2 @ K3Nv2:
    At least I can will my game catalog to family members
    +1
  • K3Nv2 @ K3Nv2:
    It's your problem now bitches
  • Psionic Roshambo @ Psionic Roshambo:
    Put it in your will that in order to receive any money they have to beat certain games, hard games and super shitty games...
  • Psionic Roshambo @ Psionic Roshambo:
    Say 20 bucks per Ninja Gaiden on the NES lol 60 bucks for all 3
  • Psionic Roshambo @ Psionic Roshambo:
    People you like "Beat level 1 of Ms Pacman" lol
  • K3Nv2 @ K3Nv2:
    Hello kitty ds is required
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Beat Celebrity Death Match on the PS1 omg tried it earlier today .... Absolutely trash
  • Psionic Roshambo @ Psionic Roshambo:
    Like -37 out of 10
  • Psionic Roshambo @ Psionic Roshambo:
    One of the worst games I have ever played
  • K3Nv2 @ K3Nv2:
    Make them rank up every cod game out
  • K3Nv2 @ K3Nv2:
    "Now I know why he took his own life"
    K3Nv2 @ K3Nv2: "Now I know why he took his own life"