[Tutorial] Setting up Pegaswitch and Preparing for Homebrew

Discussion in 'Switch - Hacking & Homebrew' started by iAqua, Nov 14, 2017.

  1. pLaYeR^^

    pLaYeR^^ GBAtemp Fan

    Member
    441
    44
    Sep 18, 2014
    Austria
    You can test pegaswitch on Switch 4.0.1??
     
  2. merlin555

    merlin555 GBAtemp Regular

    Member
    131
    22
    Oct 27, 2014
    Germany
    No.. never!
    The switch with the 4.0.1 Firmware is for gaming.
    And the Switch with 2.2.0, waiting for a stable Homebrew, then i update to 3.0.0.
    I have Ubuntu and Pegaswitch installed and it works without the Switch to test the Pegaswitch can loading.
     
    pLaYeR^^ likes this.
  3. pLaYeR^^

    pLaYeR^^ GBAtemp Fan

    Member
    441
    44
    Sep 18, 2014
    Austria
    Oh I thought you tested it on 4.0.1 lol. Okay thanks anyway :)
     
  4. kprovost7314

    kprovost7314 GBAtemp's Official Bara Master

    Member
    1,724
    940
    Dec 24, 2014
    United States
    In that bara manga ( ͡° ͜ʖ ͡°)
    Do we still need an entrypoint for SD loading?
     
  5. tataniko

    tataniko Member

    Newcomer
    23
    14
    Jul 20, 2016
    Antarctica
    - Planet Earth -
    Thanks everyone who is contributed to Switch Homebrew.
    This is an easy way in Windows 10 for Pegaswitch.

    Windows Version 10.0.16299 (lower versions may have beta problems)
    Open Command Prompt as Admin

    1. Enable Windows Subsystem for Linux in Windows Optional Features
    optionalfeatures.exe

    2. Install (or Uninstall) Linux Bash (%userprofile%\appdata\local\lxss)
    lxrun /install /y
    lxrun /uninstall /y

    3. Run Bash, update Linux, install nodejs 9.x & Pegaswitch
    bash
    sudo su (if error "sudo: unable to resolve host" - then edit /etc/hosts)
    cd

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install build-essential

    curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
    sudo apt-get install -y nodejs

    sudo apt-get install git
    sudo apt-get install python

    git clone https://github.com/reswitched/pegaswitch.git
    cd pegaswitch
    npm install

    sudo node start.js
    ------------------------------------------------------------------------------------------------
    Video: Nintendo Switch Hello World

     
    Last edited by tataniko, Nov 20, 2017
    Masterwin and merlin555 like this.
  6. Xyphoseos

    Xyphoseos Hack or no games

    Member
    1,021
    87
    Jun 29, 2016
    France
    Rivière
    hello, I get ubuntu 17 and

    sudo lsof -i tcp:0053

    do nothing (nothing after this command) why ?
     
  7. machinoman

    machinoman GBAtemp Regular

    Member
    109
    83
    Feb 12, 2011
    United States
    If there is no output from this command, then nothing is running on port 53 and PegaSwitch should be good to run.
     
  8. Xyphoseos

    Xyphoseos Hack or no games

    Member
    1,021
    87
    Jun 29, 2016
    France
    Rivière
    @machinoman
    No I get the error
    And to be in root mode change nothing

    EDIT :
    I resolved the problem :

    sudo service systemd-resolved stop
     
    Last edited by Xyphoseos, Nov 22, 2017
  9. dmdsoftware

    dmdsoftware Member

    Newcomer
    22
    4
    Jan 7, 2006
    I ended up buying a second Switch yesterday (happens to be on 3.0.2) so that I can have a switch for gaming and so I can keep my release-day switch (which is still on 2.3.0) for homebrew gaming.

    I'm a little apprehensive updating to 3.0.0 because there were quite a few vulnerabilities fixed between 2.3.0 and 3.0.0.
     
    Nezztor likes this.
  10. Xyphoseos

    Xyphoseos Hack or no games

    Member
    1,021
    87
    Jun 29, 2016
    France
    Rivière
    ignore it (sorry ^^')
     
    Last edited by Xyphoseos, Nov 22, 2017
    machinoman likes this.
  11. edepot

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Does your Linux on Windows machine need to have a wired connection to the internet to work?
    Can it use Wifi to access the internet but also offer DNS service over the same Wifi?
    How did you get Switch to use a certain DNS? Is there a global setting to use DNS?
    How do you get past the dialog where it tries to get a connection first (when you choose a SSID wifi) before you can even enter manual Internet Settings?
    Do you must always use Manual Setup and manually enter a SSID (wifi) so you can set the DNS server for that connection?

    — Posts automatically merged - Please don't double post! —

    Do you need to have a wired connection on that Windows 10 and then have a free wifi to "offer" DNS service to the Switch?
    If found Pegaswitch will offer 127.0.0.1 if the Windows 10 (on linux) is not connected to the internet. I know 127.0.0.1 can never be used as DNS address (local loop).
     
  12. seanp2500

    seanp2500 Advanced Member

    Newcomer
    99
    31
    Jun 2, 2010
    United States
    you just set the ip of your pc as the dns in settings. That about it. You don't need internet just a working lan.
     
  13. grubgrub

    grubgrub GBAtemp Regular

    Member
    134
    23
    Jun 14, 2015
    New Zealand
    When i run pegaswitch using vmware, the IP i get is 127.0.0.1

    What would be the way around this?

    seanp2500 mentioned using the IP of my PC, do i just type ipconfig in the command prompt and use that ip?

    My PC is connected to my apartment using wifi.
     
  14. seanp2500

    seanp2500 Advanced Member

    Newcomer
    99
    31
    Jun 2, 2010
    United States
    I don't know if this link is helpful for you

    https://pubs.vmware.com/vca/index.j...UID-C50C43F6-1A71-4AF8-B25B-2E4035AF98E8.html

    but basically the vm machine needs to be connected to your network once that is done you would provide the ip given to the vm machine to your switch's dns settings. Hope this helps.
     
  15. edepot

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Sean, can you provide your development environment? Do you have like a laptop running Windows 10 (and Ubuntu Linux for Windows) with built-in wifi that you use to get internet connection?
    Can you verify that if you don't connect to wi-fi in Windows 10 and run Pegaswitch, it will offer 127.0.0.1? (meaning it won't work)
    If you connect to wi-fi in Windows 10 and run Pegaswitch, it will offer the IP address (most likely 192.168.x.x)

    If you already connect to internet via wi-fi, how are you able to become a wi-fi hotspot again for the Switch (DNS server)?
    You are able to be a client and a server for wi-fi at the same time over the same wi-fi adapter?

    I just found that in Windows 10, if you set up a broadband connection to connect to the internet (wired Ethernet adapter), you are unable to setup a wi-fi hotspot over it (Microsoft's latest "stop free wifi hotspot" decision).
    All these problems are leaning towards dumping Microsoft Windows 10 if I can't get this to work.

    Maybe you can writeup your environment and steps to get it working?
     
  16. iAqua
    OP

    iAqua

    Member
    2,842
    2,504
    Dec 7, 2015
    Antarctica
  17. seanp2500

    seanp2500 Advanced Member

    Newcomer
    99
    31
    Jun 2, 2010
    United States
    personally if you are on windows 10 I would just use Windows 10 linux subsystem/"ubuntu for windows" as opposed to vmware. It just makes like alot easier I feel. In my setup the switch is connected via wifi and the pc is connected via a wired connection. Though I don't think it matters if both are connected via wifi. They just have to be using the same wifi network. Are you using a router to connect the 2 devices?

    "Can you verify that if you don't connect to wi-fi in Windows 10 and run Pegaswitch, it will offer 127.0.0.1? (meaning it won't work)
    If you connect to wi-fi in Windows 10 and run Pegaswitch, it will offer the IP address (most likely 192.168.x.x)

    If you already connect to internet via wi-fi, how are you able to become a wi-fi hotspot again for the Switch (DNS server)?
    You are able to be a client and a server for wi-fi at the same time over the same wi-fi adapter?"

    Short answer to both is basic yes. You might be on a 10. network that about only difference but it's pretty irrelevant you get the idea.
     
  18. edepot

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    I saw on your video that you have 5G connection? Is that like a cellular connection?

    Did you have to open up your firewall in Linux on Windows? Tried opening up the Windows 10 firewall, but didn't get any response. I think you got it to work because Linux on Windows is using a wired connection (as you said),
    but is offering Wifi service to the Switch. However Windows 10 prevents you from setting up a mobile wifi hotspot if you are on wired connection, so how did you get your Switch to connect to Linux on Windows? Doesn't Windows 10 have master control over ability of Linux on Windows to offer wifi hotspot? Is there a second firewall within Linux on Windows?

    If you are using a third Access point, would this not work? Does Linux on Windows have to be offering the Wifi (not a third machine?)
     
  19. tataniko

    tataniko Member

    Newcomer
    23
    14
    Jul 20, 2016
    Antarctica
    - Planet Earth -
    Nothing special, I use same wireless connection like before,
    but I suffered a lot, because there are many bugs in Linux Subsystem on Windows, especially in network connection and localhost settings.
    For me, the key point was to update Windows to Version 10.0.16299 and everything works great now.
    Of course, I updated Ubuntu, Nodejs and everything else also to the latest.
    Oh, I almost forgot to mention, on this version of Windows (Pro) 10.0.16299, we don't need anymore Developer mode, the Linux Subsystem is normal feature.
     
    Last edited by tataniko, Nov 26, 2017
  20. seanp2500

    seanp2500 Advanced Member

    Newcomer
    99
    31
    Jun 2, 2010
    United States
    I don't leave the windows firewall on. That doesn't matter honestly. You could just add exceptions if you needed yours on or just turn it off if you suspected it was blocking the connection. The wired connection should not matter. Should work on wifi just fine. Please see my previous question. Are you using a router? How are the devices joined? Can you ping each other? This is where you are at. They need to be on the same wifi network to do it wirelessly. 5g is a type of wifi network my router provides. You should not use a hotspot for this. If you are using a phone hotspot that might be the problem.