[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wicd trouble -- continued



On Thu 28 Jul 2016 at 18:01:07 -0600, Glenn English wrote:

> > On Jul 28, 2016, at 5:36 AM, Brian <ad44@cityscape.co.uk> wrote:
> > 
> > Indeed; presumably it has decided association and authentication with
> > the access point has successfully taken place and the interface has got
> > an IP number. However, there does not appear to be routing between the
> > interface and the AP.
> 
> When I turned on the laptop, the table was empty -- no default, no
> localnet.
> 
> I asked wicd to connect to one of my wireless networks and watched the
> table. It was empty for a while, then was populated with what looked
> to me like a reasonable routing table. The firewall downstairs
> (192.168.3.1/32) as default, and the proper network as localnet
> (192.168.3.0/24). wlan0 as the interface for both.
> 
> Then after a while, it was emptied again.

It obviously wasn't a reasonable routing table. :) The control socket in
/run probably disappeared too.

> ifconfig -a : 
> 
> All three interfaces (lo, eth0, wlan0); lo set to 127.0.0.1, no IPs on
> the others. wlan0 showed 8 RX packets (816 B) and 100 TX (17.2 B). No
> errors in either direction.
> 
> systemctl stop wicd.service:
> 
> Your standard *nix answer -- nothing. In a few seconds, wicd threw up
> a window saying the wicd daemon had shut down.

Fine.
 
> wpa_suplicant -i wlan0 -C /run/wpa_supplicant:
> 
> "Successfully initialized wpa_supplicant"

Fine. Just what you want.

> Then it hung (hanged). When I ctl-c'ed, it said "wlan0:
> CTRL-EVENT-TERMINATING"

It didn't hang; it was running in the foreground. The wicd daemon issues
a similar command (see 'ps ax') but backgrounds wpa_supplicant with -B
and sets up its control socket from a file constructed by wicd. No
control socket means no wireless connection; nothing works.

> wpi_cli (2.3)
> 
> ...
> "Could not connect to wpa_supplicant: (null) - re-trying"
> 
> And hang.
> 
> add_network
> 
> Nothing. It did let me type, and I expected nothing from the frozen
> program, but I was hoping.
> 
> > How does that go?
> 
> It didn't go too well. 'ps aux | egrep wpa' shows that WS doesn't seem
> to be running.
> 
> Ah! When I ran WS on one terminal, lets it run, and open another
> terminal, wpa_cli gives a '>' prompt.

Sorry, I forgot to specify using a different terminal for wpa_cli.
Having the supplicant in the foreground lets you see what is happening.

> add-network
> 
> "0"
>
> set_network 0 ssid "slsware.wif.2T"
> 
> OK
>  
> set_network psk "<PW>" (didn't like that, but was happy when I inserted a '0')
> 
> OK
>
> enable_network 0
> 
> OK
> <3>CTRL-EVENT-STARTED
> <3>CTRL-EVENT-RESULTS
> <3>WPS-AP-AVAILABLE

The expectation here would be for authentication, association and
connection to be indicated.

> Same thing over and over...
> 
> At an '>' I entered status 0. It said:
> 
> wpa_state=SCANNING
> address=00:1f:3c:cd:69:9f
> uuid=6754040b-09ff-57cb-ab53-ae8cfb180455
> 
> Then went back to the scanning again.

Pass, but from all the evidence it appears the supplicant is doing its
job and the problem lies eleswhere. journalctl will also be of help to
see what is happening.
 
> dhclient -v wlan0 
> 
> "No working leases in persistent database - sleeping"
> 
> That doesn't seem too odd since nobody that I know of asked anything from DHCP.
> 
> But. When I tried again after telling wicd to use DHCP instead of a
> static IP, it successfully connected. It even got the IP I'd set up
> for the laptop over on the DHCP server's config.
> 
> Now dhclient -v wlan0 talks about how the server received a request
> and fulfilled it. The wicd icon has that green bar saying WiFi is on.
> The routing table looks reasonable. And I can ssh around the LAN, the
> DMZ, and get out to the WAN.

Another reasonable routing table? :) How does it differ from the
previous one, if at all?
 
> That went pretty well, and I thank you very much for the guidance. But
> why? Why does DHCP work and a static IP doesn't? That's not too cool
> for a machine I use for admin'ing the servers.

With a static IP you are providing all the information instead of using
discovery. Are you sure you have the correct gateway and netmask? In
case it is useful I'll provide how I set up routing with a static IP
after using wpa_cli.

  ip addr add 192.168.7.90 dev <interface>
  ip route add 192.168.7.0/24 dev <interface>
  ip route add default via 192.168.7.1

Wicd does it this way:

  ifconfig <interface> <IP> netmask <netmask>
  route add default gw <IP of gateway> dev <interface>

> I'm moving in a few weeks, and I really need this connectivity to get
> things working. I'd appreciate you guys telling me what's going on
> here, but I'll probably just settle for DHCP WiFi for a while. I'm
> thinking of trying to build a localhost DHCP server...
> 
> Or maybe even going so far as figuring out how to use
> /.../interfaces.

For a single AP four lines in /e/n/i does it. For roaming it is just a
little bit more complicated.


Reply to: