SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-09-05 13:35:29

Obrazi
New Member
Registered: 2015-09-05
Posts: 4

[SOLVED] Restart wpa_supplicant

Sometimes I'd like to restart networking to bring wpa_supplicant up with changes to its config. After running

sudo /etc/init.d/networking restart

It doesn't seem to be connected properly.

sudo route -n

Has a wrong IP for the gateway, and I just can't ping anything. It does the same even if I just restart it without changing the wpa_supplicant config, so I know the passphrase is right.

Am I going about it the wrong way?

Last edited by Obrazi (2015-09-10 15:36:31)

Offline

Help fund CrunchBang, donate to the project!

#2 2015-09-05 13:49:48

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED] Restart wpa_supplicant

Which distribution are you using?

How are you connecting?

EDIT: Welcome to the forums!
smile

Offline

#3 2015-09-05 14:15:49

Obrazi
New Member
Registered: 2015-09-05
Posts: 4

Re: [SOLVED] Restart wpa_supplicant

Running Waldorf if that's what you mean.

As I understand it a script automatically starts wpa_supplicant on boot with the files

/etc/network/interfaces
/etc/wpa_supplicant/wpa-roam.conf

I can't remember what script it is that actually starts it, since I set it up so long ago. Perhaps the same one

/etc/init.d/networking

The problem lies in restarting the connection though. Which does involve that script, since it's the only way I know how.

Offline

#4 2015-09-05 14:26:08

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED] Restart wpa_supplicant

Offline

#5 2015-09-05 14:36:34

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: [SOLVED] Restart wpa_supplicant

if you are using NetworkManager the command may be:

/etc/init.d/network-manager restart

Last edited by PackRat (2015-09-05 14:37:15)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#6 2015-09-05 14:37:25

Obrazi
New Member
Registered: 2015-09-05
Posts: 4

Re: [SOLVED] Restart wpa_supplicant

The reconfigured file does indeed work after a reboot.

Network manager is not installed

Here are the configuration files:

(/etc/wpa_supplicant/wpa-roam.conf)

update_config=1
ctrl_interface=DIR=/var/run/wpa_supplicant

/* a bunch of networks with accurate credentials */
network={...}
network={...}
network={...}
...
EOF

(/etc/network/interfaces)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
auto wlan0
# wlan0 settings (using wpa_supplicant, dhclient, ifdown, etc)
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa-roam.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa-roam.conf

# The loopback network interface
auto lo
iface lo inet loopback

iface home inet dhcp
iface store inet dhcp
iface default inet dhcp
iface Ken's inet dhcp

iface datwifi inet static
    address 192.168.1.10
    gateway 192.168.1.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

iface dlink inet static
    address 192.168.1.110
    gateway 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

Offline

#7 2015-09-05 14:41:34

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED] Restart wpa_supplicant

sudo killall -HUP wpa_supplicant

Offline

#8 2015-09-05 14:47:40

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED] Restart wpa_supplicant

Offline

#9 2015-09-05 14:55:11

Obrazi
New Member
Registered: 2015-09-05
Posts: 4

Re: [SOLVED] Restart wpa_supplicant

Offline

#10 2015-09-05 15:48:25

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED] Restart wpa_supplicant

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo