Using a raspberryPi 3 as wifi router
... with raspbian OS
Written after trying a number of other techniques which failed. (2018-08-31)
I. Get Network-Manager to work on Raspbian
By default, because of a bug, Network-Manager doesn't manage wifi. It can be worked around though.
sudo apt install network-manager sudo apt purge openresolv dhcpcd5 reboot # Mandatory! - Restarting `networking` and `network-manager` services won't work.
(1) the network manager icon should appear in the top left panel, and
(2) when clicking on it, the Wifi should neither appear as not managed nor as not ready, and you should be able to have internet through wifi.
You may need to go in
/etc/NetworkManager/NetworkManager.conf and change
[ifupdown] # managed=false managed=true
I did it, but I'm sure it was useful.
II. Get Network-Manager to share internet connection as wifi
- Disable WIFI and plug in an internet cable to your laptop so that your Ubuntu is connected to a wired internet and wireless is disabled.
- Right click the Network Icon, then Edit Connections, then click the Add button in the pop-up window.
- Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type.
- In the next window, do
- Type in a connection name.
- Type in an SSID (I usually use the same as the connection name)
- Select mode: Hotspot
- Device MAC address: select your wireless card from drop-down menu
- Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password.
- Go to IPv4 Settings tab, from Method drop-down box, select Shared to other computers (it was already correctly set for me).
Validate and re-enable wifi. You should be able to connect to your hotspot wifi network now.
Note: do not follow step three (
sudo ln -sf /lib/systemd/resolv.conf /etc/resolv.conf)
Part II - https://askubuntu.com/a/786514/185194
The Wifi hotspot worked for me just with step 1-6, (selecting
mode: hotspot at step 4).
Manually changing the connection mode to
mode=ap wasn't needed.