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: 218

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
598
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
598
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,911
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
598
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
598
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
598
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,456
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: 30
  • Screenshot_20230812-143704_Termux.png
    Screenshot_20230812-143704_Termux.png
    112.5 KB · Views: 30

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
  • K3Nv2 @ K3Nv2:
    May just order a 5700g for a nas/emulation set up tbh
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, atleast you were asleep on 4/20
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, you played that Mario flash game called Mario 63?
  • SylverReZ @ SylverReZ:
    @Xdqwerty, No, but I've seen it on Vinesauce's stream.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, that game is one of the reasons i met newgrounds bc the full versión of it is in that site
  • Xdqwerty @ Xdqwerty:
    Also somebody is remaking it
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, the other game where I found newgrounds is new york shark
    +1
  • SylverReZ @ SylverReZ:
    Spoke to Tom Fulp the other day, if he can find his old Newgrounds site content like the mini Flash animations from the 2000's that played on the portal.
  • SylverReZ @ SylverReZ:
    So far no response, but he did say that he'll find them. Wayback Machine doesn't have em.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, atleast the 1999 versión of pico's school is avaliable (the difference between it, the 2006 versión and the 2016 versión is that the speed of the game depends of the speed of your computer and that it had the og soundtrack)
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Another being Pico VS Bear, the original 1999 version before Jim Henson filed a DMCA takedown.
    +1
  • Xdqwerty @ Xdqwerty:
    The 2006 versión was made when the flash portal was made
  • SylverReZ @ SylverReZ:
    Many people thought it was lost, but was discovered that he hid it on the same page.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, although the "secrets" system where the game was has been removed. Also pico vs uberkids had a netplay versión that was shutdown, although the swf file has been found
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Nope. There are two download buttons on the same page, where you can download the original under a file called "bear.exe". "bear2.exe", however, is the updated game in a Flash projector. P.s. this was on the archived Pico page from 2000.
  • SylverReZ @ SylverReZ:
    @Xdqwerty, That's been there for a long time, too. People who search for lost media don't look hard enough lmao.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, also the pico 2 demos used to be only for the newgrounds patrons but they are on internet archive too (https://archive.org/download/picos_school_2)
    +1
  • Xdqwerty @ Xdqwerty:
    Iirc the demos were removed from newgrounds in 2022
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, or well only the demo with mindchamber's style was on newgrounds
    +1
  • Xdqwerty @ Xdqwerty:
    Fun fact @SylverReZ: iirc one of the goals on the fnf Kickstarter stated that pico 2 would be finished but the Kickstarter didnt get enough money for that goal to be fullfiled
  • SylverReZ @ SylverReZ:
    @Xdqwerty, FNF sucks, their community is toxic as hell.
  • The Real Jdbye @ The Real Jdbye:
    @SylverReZ its a single player game
    The Real Jdbye @ The Real Jdbye: @SylverReZ its a single player game