Status
Not open for further replies.
Tutorial  Updated

Zero to Smashing local wireless online(ldn_mitm) guide

Discontinue/obsolete


  1. This guide will not be updated and most likely obsolete.
    Use at your own risk

  2. Since on the discord i keep seeing the same question and issue over and over again.. figure this guide might help set people straight how to get it setup...

    Feel free to leave comments, questions, flames, and etc... i'll get back to it if i feel like it~
    **Note** Please FOLLOW THE ORDER OF THE TABS BELOW, Don't skip steps otherwise it won't work!!!
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Setting up the clientSetting up the switch's network Setting up ldn_mitm(Kip/Sysmodule)Atmosphere (System Module - Recommended)
    This is the more recommended method + suppose to be more stable.
    Step 1. Download the latest ldm_mitm_v1.##.zip from [URL='https://github.com/spacemeowx2/ldn_mitm/releases'
    FAQOther notes


    1. Setting up lan-play(client) on your computer
      You have a few options
      1. Run client on your computer via command lines
      2. Run client via the gui
      3. Build the client on your choice of platform
      NOTE: For mac you must run
      Code:
      /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      to install homebrew first befor continuing

      Option 1a. (Windows)Option 2b. (MacOS)Option 2Option 3a - Android PhonesOption 3b


      1. Option 1. (Windows)
        Step 1. Download and install winpcap npcap (Just do yourself a favor and get winpcap.... it works a lot better... trust me..... It works a lot better in my opinion.)
        Step 2. Download the latest file at the github release page
        Step 3. Run the client as admin
        Step 4. Type in the server IP (You can find a list of public server in at the discord)
        Step 5. The next section will give you a list of interface to pick from. Pick the one that you are using to connect to the internet with (as well as the same network your switch will connect to). **See Note 1 for help** **Not required on the latest lan-play client**
        Step 6. It should split a few lines of things then at the end will say "pcap loop start" If so, you're should be good. *Move to switch setup*

      2. Option 1. (MacOS)
        Step 1. Open terminal
        Step 2. Download the clinet via homebrew
        Code:
        brew install switch-lan-play
        Step 3. run the command
        Code:
        lan-play --relay-server example.server:11451

      3. Option 2.
        Step 1. Download and install winpcap or the updated NpCap (But get winpcap, trust me. It tends to work better in my opinion)
        Step 2. Download your the gui - Lan Play GUI (I'm not endorsing anything, I know there are a few out there and this is the one I happen to pick to test with) and unzip it.
        Step 3. Download the latest lan-play.exe from the github and place the .exe into the same folder as your lan-play-GUI
        Step 4. Lauch lan-play-GUI (AS ADMIN)
        Step 5. Press Add New Server and add your server of your choice (You can find a list of public server in at the discord)
        Step 6. Click Connect to Server on the server you would want to join, a command prompt should pop up
        Step 7. The next section will give you a list of interface to pick from. Pick the one that you are using to connect to the internet with (as well as the same network your switch will connect to). **See Note 1 for help** **Not required on the latest lan-play client**
        Step 8. It should split a few lines of things then at the end will say "pcap loop start" If so, you're should be good. *Move to Switch setup*

      4. Option 3a.
        For rooted android phones only

        Step 1. First you need to download the libs and packages required to build the client. Launch termux and enter in the following
        Code:
        apt update
        apt install libpcap libuv
        pkg install cmake tsu git

        Step 2. Download the git
        Code:
        git clone https://github.com/spacemeowx2/switch-lan-play.git

        Step 3. Change directory into the git folder and make a build directory
        Code:
        cd switch-lan-play
        mkdir build
        cd build

        Step 4. Build your client now
        Code:
        cmake ..
        make

        Step 5.Your client is now built, to run it you use
        Code:
        cd src
        tsudo ./lan-play
        OR Try this method of the above does not work
        tsudo ./data/data/com.termux/files/home/switch-lan-play/build/src/lan-play
        
        Enter in the server you want to join
        Note currently there is a bug with tsudo where it brings you to the root directory, hence you need to type the entire path to lan-play client

        Step 6. Most likely the one you're going to pick will be wlan0 (unless you got some weird phone with multi wireless cards or you have a Ethernet jack on it) **Not required on the latest lan-play client**

      5. Option 3b.
        For most linux/raspberry pi/macos and stuff

        Step 1a. Install libpcap-dev and libuv-dev open up terminal and run (if you are on a mac, skip to Step 1b.
        Code:
         apt-get install libpcap-dev libuv-dev

        Step 1b. Open up terminal and run (if you already completed step 1a, skip to step 2.)
        Code:
        brew install cmake libpcap libuv

        Step 2. Download the git
        Code:
        git clone https://github.com/spacemeowx2/switch-lan-play.git

        Step 3. Change directory into the git folder and make a build directory
        Code:
        cd switch-lan-play
        mkdir build
        cd build

        Step 4. Build your client now
        Code:
        cmake ..
        make

        Step 5. Your client is now built, to run it you use (you have to run it via sudo cause need access to the network interface card
        Code:
        sudo ./lan-play --relay-server-addr example.com:11451

        Step 6. pick your interface. Typically it is gonna be eth# or wlan# depending on if you're using Ethernet or wireless **Not required on the latest lan-play client**


      Congrats, you have setup your client! Now time to setup your switch!
      Also you can find a list of public servers on the discord #public-servers

    2. Setup the switch's network

      Step 1. Go to system settings --> Internet
      settings1.da5a208c.jpg

      Step 2. Click Internet settings
      Step 2b. If you have a network setup already click that, if not read on. Click your home wireless network (preferably a 5.8ghz) and type in the wrong password. it'll give you an error but it'll let you change the settings this way
      Step 3. Click Change Settings
      Step 4. fix your password if you have to and change ip address setting to manual enter the following ip
      Code:
      IP Address Settings
      IP Address: 10.13.XX.YY
      Subnet Mask: 255.255.0.0
      Gatewway: 10.13.37.1
      Primary DNS: 163.172.141.219
      Secondary DNS: 45.248.48.62
      Where xx and yy can be anything from 0-255 EXCEPT your ip should not be 10.13.37.1
      Step 5. Press save then connect to this network
      So long as you setup your client properly (and started it first) it should connect. if so you're golden!


      At this point, you can go and play any lan enabled games (modded or unmodded switches!!!)
      NOTE: Make sure you have your lan-play client open before trying to connect with your switch, otherwise it WILL NOT WORK

    3. Getting Local Wireless Play via lan with the ldn_mitm (kip/sysmodule)
      As always you have several of options (Note: I am not going to cover how to install CFW onto your switch. I'm assuming you already know, if not go look for another guide to figure out how to install it then come back.)


      Requirement: Download the ldn_mitm from the github
      1. Using Atmosphere
      2. Using Kosmos
      3. Using ReiNX
      4. Using SxOS

      Atmosphere (Kip)Atmosphere (System Module - Recommended)KosmosReiNXSxOS


      1. Atmosphere
        Note: You should be using the latest atmosphere otherwise it may cause some issues

        Step 1. Download the latest kip from here
        Step 2. Open up your SDcard and go to the /atmosphere folder
        Step 3. open up the kips folder (if you don't have one, create one)
        Step 4. Drop the latest kip in there *Note Do not use
        upload_2018-12-14_22-43-26.png


        Step 5. push your fusee-primary payload (This will load all your kips in the kips folder)
        Step 6. Connect to your wifi and go play some games!

      2. This is the more recommended method + suppose to be more stable.
        Step 1. Download the latest ldm_mitm_v1.##.zip from here.
        Step 2. Unzip the zip file onto the root of your SD card. Select yes to replace/overwrite (it already has the correct path for atmosphere)
        Step 3. push your fusee-primary payload.
        Step 4. Connect to your wifi and go play some games!

      3. Kosmos
        Step 1. Make sure you get the latest kosmos
        Step 2. Download the latest kip.
        Step 3. Place the kip in your following path in your sdcard /modules/ldm_mitm/ldm_mitm.kip
        Step 4. edit the /bootloader/hekate_ipl.ini and enter this into it
        Code:
        {------ ldn_mitm+CFW -----}
        [CFW + Lan-play]
        fss0=atmosphere/fusee-secondary.bin
        kip1patch=nosigchk
        atmosphere=1
        logopath=bootloader/bootlogo.bmp
        kip1=/modules/ldn_mitm/ldn_mitm.kip { }
        Step 25. push hekate as your payload
        Step 36. Launch->ldn_mitm +CFW
        Step 47. Connect to your wifi and go play some games!

        **yup its now 3 steps longer cause kosmos decided to remove this from their repo... blame them for making your life "harder"

      4. ReiNX
        Step 1. Download the latest kip. (Note you must be on ReiNX 2.0+)
        Step 2. Open up your SD card and go to the /ReiNX/sysmodules folder
        Step 3. Drop the kip in that folder.
        Step 4. Push your reinx payload to your switch
        Step 5. Launch ReiNX Toolbox and make sure you enable the ldn_mitm.kip
        upload_2018-12-14_23-2-22.png

        **Note my kips or old, ignore that**
        Step 6. Connect to your wifi and go play some games!

      5. SXOS
        Step 1. Pick any of the above CFW cause SXOS doesn't support kips =/
        Step 2. Follow the steps of the CFW you picked =]
        Step 3. ???
        Step 4. Profit

        Congrats, TX finally added support for it.
        Step 1. Download the latest SXOS (Beta v2.5 or later)
        Step 2. Drop the boot.dat into your sdcard from the zip file you download
        Step 3. Go into SX Menu--Options
        Step 4. Enable "Internet local wireless play"

        NOTE: SXOS is using an out of date kip that is very buggy and crashes a lot, if you get an error code, restart your switch!!!

    4. FAQ

      Q: How do I play smash online with my banned switch?!
      A: Try reading the guide again....


      Q: I'm getting a DNS resolution error when connecting my switch.
      A: 1. Did you run the client as admin/sudo?
      2. Did you select the correct interface?
      3. Turn off your VPN on your client computer, most vpn will block local traffic including your switch
      4. Re-read the guide first. make sure you didn't leave out any steps.

      Q: How do I know if my kip got loaded properly or not?
      A: Two ways 1. launch into a local wireless mode, and host a game.
      Good -->
      upload_2018-12-14_23-11-50.png
      < --- Bad
      Loaded You screwed something up, reread the guide cause you missed something

      Q: I installed everything properly but I still can't find any rooms even though there are x amount of people on the server
      A: Just cause there are people on the server, it doesn't mean their playing or even playing the same game as you. try going on to their discord and use the #matchmaking-bot

      Q: Can I use 90dns
      A: Yes, and you should if you have an unbanned switch

      Q: Does it matter if I use wifi or ethernet?
      A: Yes and no... you should use ethernet, to help lower the ping/lag if not highly suggest you use 5gz connection otherwise

      Q: The client shows me 1-0 as the interface
      A: Most likely you either didn't install winpcapnpcap/lilpcap or you didn't run it as admin/sudo

      Q: I get a black screen when...
      A: First suggestion, turn off your sys_ftp.kip, it crashes with atmosphere and maybe with reinx as well. second would be turn off layeredfs. I've had some issues running both of them together before Also, this is a virtual network, people can connect to your ftp pretty easily.

      Q: Got an error code 2155-8007
      A: Why are you trying to connect online.... use local wireless.... IE:
      upload_2018-12-14_23-30-46.png


      Q: What games can I play?
      A: Check the spreadsheet


      Q: omg this {Insert game title} is lagging so hard, how is this playable?! This sucks!
      A: Well.. a. check your internet connection.. b. try playing with people within your region otherwise your ping will suck... c. connect to a server within your region.... d. Local wireless mode kinda suck... even if you're beside the person playing with legit local wireless, you still get some lag sometimes.... its pretty stupid....

      Q: I downloaded my client from lan-play.com for macos and it is giving me "sudo ./lan-play-macos" but it returned "command not found"
      A: You need to change the permission to 755
      Code:
       sudo chmod 755 {file name}
      FYI if you don't know how to use terminal and move to the folder with the file, just type sudo chmod 755 {drag and drop the file into terminal, it'll auto fill the path}
      FAQ More to come~~~

      Q: Will this work on my banned switch?
      A: TL;DR Yes
      Since you're not connecting to the Nintendo servers, yes it will still work.

      Q: Local Wireless was working fine before but I'm getting and error when I try to use local wireless mode
      A: Well its still the early stages, and the kip is quite buggy... a simple restart of the switch should fix it. (When in doubt, restart everything!)


      Q: I sure I set everything up correctly, but I can find any games even though the server says there are 30+ users!
      A: all that means is there are 30+ clients connected to the server... Doesn't actually mean there are 30+ games happening...
      -- Check this spreadsheet for more faq (Beware of trolls)

    5. Note 1
      If you have no idea which interface to use the best way to figure it out is

      Window 10windows via cmd


      1. Right click the network icon in the task tray area and click "Open Network & Internet Settings"
        upload_2018-12-15_17-14-43.png


        Click wifi/ethernet depending on which one you're using to connect to the internet
        upload_2018-12-15_17-15-34.png

        For Wifi, then press the wifi name and scroll all the way down
        For ethernet press (what ever the Ethernet connection is called) and scroll all the way down

        upload_2018-12-15_17-20-6.png

        Look at that. For my example, pick the one that shows an ip 192.168.1.2

      2. Open CMD (window key+R then type cmd)
        type ipconfig
        and you should see something similar to the following,
        upload_2018-12-15_17-24-1.png

        for my case I only have one ip, connect to the one that shows 192.168.1.2 as the ip


      Credits
      spacemeowx2 for building the kip and lan-play client/servers
      SciresM and his team for Atmosphere and all the NX Projects
      Rei and his team for ReiNX
      tomGer for Kosmos
      GreatWizard for http://www.lan-play.com/ (sorry also stole some pictures from your guide....)
      @Syrux#6206 for putting together the faq spreadsheet
      AveSantans for running the 90dns!
      Anybody else that I may have missed, sorry!

      I'm sure there are more to add to the guide... but i'm tired... so here it is for now~ Enjoy~!
 
Last edited by lil-devil, , Reason: obsolete guide

raulls

Member
Newcomer
Joined
Nov 19, 2019
Messages
10
Trophies
0
Age
34
XP
192
Country
Spain
try tsudo /data/data/com.termux/files/home/switch-lan-play/build/src/lan-play
ty for reply
but still same error.
enter main
/system/xbin/su: invalid option

but if i go /data/data/com.termux/files/home/switch-lan-play/build/src/lan-play this directory, and do
su
./lan-play

i can run lan-play and enter server address. but after that, error: get mac all zero

any idea how to fix this?
 

lil-devil

Well-Known Member
OP
Member
Joined
Oct 16, 2007
Messages
225
Trophies
0
Age
33
Website
Visit site
XP
906
Country
Canada
ty for reply
but still same error.
enter main
/system/xbin/su: invalid option

but if i go /data/data/com.termux/files/home/switch-lan-play/build/src/lan-play this directory, and do
su
./lan-play

i can run lan-play and enter server address. but after that, error: get mac all zero

any idea how to fix this?
when you get to the src dir, run "tsudo ./lan-play" instead of using su
 

Tiagomcs20

Member
Newcomer
Joined
Nov 26, 2019
Messages
7
Trophies
0
Age
36
XP
58
Country
Portugal
Has anyone managed to get this working on an android device? If so, could you simplify the steps/ links for download?

Thanks in advance
 

carloscostaxoxo

Member
Newcomer
Joined
Feb 8, 2020
Messages
5
Trophies
0
Age
26
XP
44
Country
Germany
hey tried to follow the guide for mac and when i enter a server it asks me to enter a number between 1-14 and if i enter a number it says no permission
 

ChronicGamer

Member
Newcomer
Joined
Mar 20, 2020
Messages
10
Trophies
0
Age
25
XP
50
Country
United Kingdom
Argh, how complicated I just want to play ACNH with local wireless
honestly not worth the time, ive managed to set up the client finally after a painful 10 hours in total with outdated guides too, until i found this but my switch or brothers wont connect to it, get a dns issue.
 

Shokubox

New Member
Newbie
Joined
Mar 29, 2020
Messages
2
Trophies
0
Age
34
XP
36
Country
Philippines
Option 2 Error
lan-play --relay-server example.server:11451

: unknown paramter: --relay-server

: unknown paramter: example.server:11451

--relay-server-addr is required

Input the relay server address [ domain/ip:Port ]:lan-play --relay-server example.server:11451

: Failed to parse and get ip address. --relay-server-addr: lan-play
 

mdmachine

Well-Known Member
Member
Joined
Jun 15, 2009
Messages
189
Trophies
0
XP
882
Country
United States
Have been setting up the RaspberryPi for the past few hours.

First I need to point out that I've come across an issue where the "./lan-play" location was not in the "build" folder anymore, but in "./src/lan-play" - hence the "command not found" error!

Second, it's working (almost) perfectly! Thanks to anyone who contributed to this!
Only thing I need some help with is setting up my Raspberry Pi (RaspBian) to automatically run the script as soon as I plug in the (headless) Raspberry!

After some long search I've somehow put together a code which makes the script run in one single line (without the need of input for an interface!), but neither putting it into rc.local, nor into .bashrc did the trick with not having to ssh into the Pi.

Any idea how I might accomplish that?

Here is the 1-line-code I've come up with:
1 | sudo switch-lan-play/build/./src/lan-play --relay-server-addr switch.lan-play.com:11451

Okay I have it running on a PI and loading on boot using tmux and rc.local

so get tmux installed:
sudo apt-get install tmux


So now I made a couple sh's for running the server, the first being "server.sh". This one is the actual command to run the server and where its pointing.
CD or direct to where you want it, so change "/home/pi/switch-lan-play" accordingly:

sudo nano /home/pi/switch-lan-play/server.sh


Inside there you want it to look something like this, edit it for whatever server, interface and pmtu you want/need. In my case its running the "lan-play" i built with make, located in "/home/pi/switch-lan-play/build/src/":

#!/bin/sh
sleep 5
sudo /home/pi/switch-lan-play/build/src/./lan-play --netif eth0 --pmtu 500 --relay-server-addr frog-skins.com:11451
exit 0


Save and exit nano...

Next I made another script (for rc.local to run it within tmux on boot) I called it tmux_script.sh
CD or direct to where you want it, so change "/home/pi/switch-lan-play" accordingly:

sudo nano /home/pi/switch-lan-play/tmux_script.sh


Inside there you want it to look something like this:

#!/bin/sh
cd /home/pi/switch-lan-play
/usr/bin/tmux new-session -d -s SLP "sh /home/pi/switch-lan-play/server.sh"
sleep 1
exit 0


This script runs the previous script we made, detaches the tmux window and names it "SLP".

Save and exit nano...

Now off to rc.local
sudo nano /etc/rc.local


And in here we want to target the tmux sript we made between fi and exit.
Should look something like this:

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

sudo /etc/init.d/noip start
sleep 5
bash /home/pi/switch-lan-play/tmux_script.sh
sleep 5
bash /home/pi/jdownloader/jdownloader.sh
sleep 10
bash /etc/init.d/terraria-autostart

exit 0


As you can see in my rc.local I have jdownloader, terraria and no-ip servers running as well.
Now when you save that, run
sudo reboot -h

When its all back up, check if there are tmux sessions running.
Now this way its all happening as root. So if you just ran "tmux ls" you wouldn't see anything.
So this should show you a session, named SLP
sudo tmux ls


In order to see this session use the command:
sudo tmux a -t SLP


In order to close that session (it still runs in the background):
Press CTRL+B, then press D

You can go back anytime.

You can close and stop the server by pressing CTRL+C

tmux is great, if your not familiar with it, read up. I find it to be very useful.
 
Last edited by mdmachine,
  • Like
Reactions: Milad

aerik

Member
Newcomer
Joined
Jan 6, 2004
Messages
23
Trophies
0
XP
415
Country
Brazil
Works on Android 10?

I coneccted on a server but in Switch is like disconnected, anyone tested?
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Nut on the hill