1

I have installed kubunto on an old laptop - I have two wifi networks and neither are useable from network manager - on is 64bit the other is WPS.

I have setup a wpa_supplicant config that works for the WPS network - except not automatically doing DHCP.

I have tried multiple ways of disabling network manager and auto running the wpa_supplicant and dhclient - but while they work from the command line, I cannot get them to autorun on startup.

I tried local.rc, a systemd start up service etc and other ways -- this was all from online instructions, I am not familiar enough with linux to know this myself.

What is the recommended way to go?

As thing stand I have...

/etc/systemd/system/wpa.service

[Unit]
Description=WPA Supplicant Startup

[Service]
Type=idle
ExecStart=/usr/local/opt/wpastart.sh

[Install]
WantedBy=multi-user.target

/user/local/opt/wpastart.sh (with execute set)

#!/bin/sh
wpa_supplicant -B -Dwext -iwlp2s0 -c/etc/wpa_supplicant.conf
dhclient wlp2s0

/etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
        ssid="TNCAPEB1961"
        psk=<a long key I probably shouldn't post...>
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
        pbss=2
}

/etc/network/interfaces

  # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    allow-hotplug wlp2s0
    iface lo inet loopback

    iface wlp2s0 inet dhcp
            wpa-driver wext
            wpa-roam /etc/wpa_supplicant.conf

    iface default inet dhcp

From the command line I have disabled network.manager and enabled wpa (myservice) -- when I boot the wifi is not running - but if I execute /user/local/opt/wpastart.sh it comes up fine (but with two warnings of:

ioctl[SIOCSIWENCODEEXT]: Invalid argument

Ideally I'd like:-

  1. The DHCP to get done automatically
  2. The warnings to go
  3. The network to startup on boot, not needing to be kicked off from the command line.

I am very surprised this hasn't been asked before(!) -- actually rather surprised the basic kubuntu install doesn't do WPS out of the box!

pperrin
  • 111

1 Answers1

0

Most of what is in the question is unnecessary.

Most of the answer for setting up wifi is given in here How to connect to Wi-Fi AP through WPS?

But the main issues is that ifsupdown must be installed, and isn't installed by default.

sudo apt-get install ifsupdown

With this setup the apt-services stuff setup as per the quesiton is redundant (and doesn't work anyway).

In my specific case (the original question) with a tip from @carlozancanaro@mastodon.technology I ended up manually installing ifupdown, and trying to start the wifi, it reported that my /etc/network/interfaces file has an error and the 'roam' line is not compatible with DHCP and has to be static.

I changed my network file to read:

  # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    allow-hotplug wlp2s0
    iface lo inet loopback

    iface wlp2s0 inet static
            wpa-driver wext
            wpa-roam /etc/wpa_supplicant.conf

    iface default inet dhcp

I disabled my wpa service stuff (the .service and .sh files) and it all works fine.

It boots up and the wifi is active with an IP address.

pperrin
  • 111