Using a Linux Laptop as a Hotspot for a PS5

2024/11/26

It was Thanksgiving week, and because of Black Friday, I finally decided to buy a PS5. I didn’t expect it to feel like a big moment, but when I walked out of Best Buy holding the box, I was really happy. It felt a bit like getting a new car. I even put the box on the passenger seat and buckled it in.

When I got home, I had a small problem. To connect the PS5 to the university Wi-Fi, I needed to register its MAC address on iprequest.stanford.edu, but the website wasn’t working. My laptop was already connected to the internet, so I made a Wi-Fi hotspot on it and connected the PS5 through that. It worked well, and I was able to finish setting it up without waiting.


Step 1: Install the Necessary Tools

To turn your Linux laptop into a hotspot, you’ll need a tool called create_ap, which allows you to create a virtual Wi-Fi access point using your laptop’s Wi-Fi adapter.

  1. Update System and Install Dependencies

    $ sudo apt update
    $ sudo apt install git build-essential dnsmasq hostapd -y
    

    This command ensures your package list is up-to-date (apt update) and installs essential tools like dnsmasq (for managing network address translation) and hostapd (for creating access points).

  2. Clone and Install create_ap

    $ git clone https://github.com/oblique/create_ap
    $ cd create_ap
    $ sudo make install
    

    create_ap is a script that configures a hotspot by combining hostapd (to manage the access point) and dnsmasq (to assign IP addresses). This step downloads the tool and installs it to your system.


Step 2: Identify Your Wi-Fi Interface

You need to know the name of your Wi-Fi interface to use it for the hotspot.

  1. Run the following command:

    $ ip link
    

    This command lists all network interfaces on your system. You’ll see interfaces like lo (loopback), enp0s31f6 (Ethernet), and your Wi-Fi interface (e.g., wlp2s0).

  2. Look for the Wi-Fi interface (typically starts with wl). In my case, it was wlp2s0.


Step 3: Disconnect from Eduroam

To allow your Wi-Fi adapter to function as a hotspot, you need to temporarily disconnect it from the university’s Wi-Fi network.

  1. Run this command:
    $ nmcli device disconnect wlp2s0
    
    nmcli is the NetworkManager command-line interface. This command disconnects the specified Wi-Fi interface (wlp2s0) from its current network, freeing it for hotspot use.

Step 4: Create the Hotspot

Now that your Wi-Fi adapter is free, you can set up the hotspot.

  1. Run the following command:

    $ sudo create_ap --freq-band 2.4 wlp2s0 wlp2s0 <SSID> <PASSWORD>
    
    • create_ap: The tool you installed earlier to create a Wi-Fi access point.
    • --freq-band 2.4: Forces the hotspot to use the 2.4GHz band, which is widely supported by devices.
    • The first wlp2s0: Specifies the Wi-Fi interface connected to the university network.
    • The second wlp2s0: Specifies the same interface for creating the hotspot (a virtual interface).
    • <SSID>: The SSID (network name) for the hotspot.
    • <PASSWORD>: The password for connecting to the hotspot.
  2. Your laptop will now act as a Wi-Fi hotspot, and your PS5 can connect to it using the SSID and password.


Step 5: Reconnect to Eduroam

After starting the hotspot, you need to reconnect your laptop to the university’s Wi-Fi to ensure internet access for the hotspot.

  1. Reconnect using:
    $ nmcli device wifi connect eduroam
    
    This command re-establishes your laptop’s connection to the university network, allowing it to share the internet connection with the PS5 via the hotspot.

Step 6: Connect Your PS5 to the Hotspot

Once the hotspot is running, follow these steps on your PS5 to connect:

  1. On your PS5, go to Settings > Network > Set Up Internet Connection.
  2. Select Wi-Fi and choose the hotspot name (SSID) you set up earlier (<SSID>).
  3. Enter the password (<PASSWORD>) when prompted.
  4. Wait for the PS5 to verify the connection. Once connected, run a connection test to ensure internet access.

Conclusion

By following these steps, I was able to share my laptop’s internet connection with my PS5 while bypassing the MAC address registration issue. The PS5 successfully connected to the hotspot and had full internet access, letting me start playing the Last of Us Part I right away.