Commit a6575331 authored by Jakob Moser's avatar Jakob Moser
Browse files

Explain WiFi setup

parent 4640a28d
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -22,3 +22,57 @@ Maintainer: Jakob Moser <moser@cl.uni-heidelberg.de>
4. Use an ethernet cable to connect the Pi to your main computer
     * Your computer should immediately start acting as a “wired hotspot” now and provide IP address and internet access to the Pi.
5. You can now `ssh jakob@poolpaypi.local` on your main computer and it shoud Just Work™.

#### Pi as a WiFi hotspot

1. Plug in a WiFi stick (on the Raspberry Pi 3 Model V1.2, I didn't get the internal WiFi to work as a hotspot, however, that seems to be an issue that only I with my specific Pi have)
2. Create a network manager configuration in `/etc/NetworkManager/system-connection/PoolPayPi.nmconnection`, get the following information ...

   * The `interface-name` for the stick (`wlan1` if the Pi has built-in wifi, `wlan0` if it hasn't)
   * A secure password (Pre-Shared Key, `psk`)

    ... and insert it into this ready made template, which you then save:

    ```ini
    [connection]
    id=PoolPayPi
    uuid=a58d13bb-4d84-4b20-8bea-7b061c73ed0c
    type=wifi
    autoconnect=true
    interface-name=wlan0

    [wifi]
    mode=ap
    ssid=PoolPayPi

    [wifi-security]
    group=ccmp;
    key-mgmt=wpa-psk
    pairwise=ccmp;
    proto=rsn;
    psk=PutASecurePasswordHere

    [ipv4]
    method=shared
    address1=10.17.0.1/24,10.17.0.1

    [ipv6]
    addr-gen-mode=default
    method=ignore

    [proxy]
    ```

<details>
<summary>Further information on hotspots</summary>

* You can create a hotspot (which will create more or less the same config as seen above using):

    ```bash
    sudo nmcli dev wifi hotspot ifname wlan1 ssid PoolPayPi password $PASSWORD
    ```

* If you want the hotspot to start on boot, you need to add `autoconnect=true` to the config file (which you can, btw, also do using some `nmcli` command)
* If you use both the WiFi hotspot and the shared ethernet connection (which is easily possible), [one of the connections needs its own IP range](https://askubuntu.com/questions/844913/how-to-control-ip-ranges-of-network-managers-hotspots), otherwise, they will collide.

</details>