1

I have configured my computer to be a WiFi Access Point when it boots, with hostapd and isc-dhcp-server. The purpose is to be able to connect it to remote controller, so it does not provide internet connection.

To make it work, I have, among others, added this lines in /etc/network/interfaces:

auto wlo1
iface wlo1 inet static
        address 192.168.0.1
        netmask 255.255.255.0
        broadcast 192.168.0.255
        scope link

However, once in a while, I want to connect it to internet, so turn off its Wifi access point to make it become a wifi client, until the next reboot. I am currently writing a script to do this, but I don't know how to make wpa_supplicant (or NetworkManager) take back the control over the interface.

I tried nmcli device set wlo1 managed yes autoconnect yes, but the interface doesn't react.

I am on Ubuntu Desktop 16.04, if its help.

0

1 Answer 1

0

I've come with a compromise. In /etc/NetworkManager/NetworkManager.conf, I wrote:

[ifupdown]
managed=true

This will allow NetworkManager to manage connections listed in /etc/network/interfaces. However, it will prevent the WiFi AP to work, since it will override my statc configuration.

So the solution is to disable NetworkManager at start, and enable it when I want to switch ti WiFi client. This is not very convenient, because it will allow NetworkManager to possibly manage other interfaces, so if anyone has a better solution, like a setting to force NetworkManager to manage a connection listed in /etc/network/inteface, I'm a buyer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .