LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Wicd can never connect to unsecured wifi (https://www.linuxquestions.org/questions/slackware-14/wicd-can-never-connect-to-unsecured-wifi-4175557750/)

xj25vm 11-02-2015 01:44 AM

Wicd can never connect to unsecured wifi
 
OK - I know some consider wicd outdated. I also know about he dangers of connecting to open wifi - so I'm not really seeking advice on the two points above. But if anybody here still uses wicd or has some useful suggestions (aside from ditching it :-) ) - I'd really appreciate some hints.

I've been using Wicd with Fluxbox on Slackware for a good number of years - because both are lightweight and do the job I need them to do. For a good number of years now, over several OS upgrades and re-installs, I have not been able to use wicd to connect to unsecured networks. It quickly goes to "Obtaining IP address ..." and after a while it just shows "Disconnected". And again, and again.

I have no problem connecting to WPA or WPA2 networks. This is happening anywhere I try to connect to an unsecured network - airports, bars, hotels - so I don't think it is a bug with any specific WiFI access points model.

At the moment I am on Slack 14.1 with kernel 3.10.17 and Wicd 1.7.2.4. But I've had this use across at least three Slackware major versions - so I don't think it is specific to the kernel or the version of Wicd. This laptop has a Broadcom BCM43228 wifi chip.

I have enabled debugging for the wicd-client, and I get the following on the command line - but I don't really see anything that seems relevant here:

Code:

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 230, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/wicd/gAnguage[reACsults], block=False)
KeyError: dbus.String(u'dhcp_failed')

The /var/log/wicd/wicd.log contains an endless stream of, what seems to be pretty useless:

Code:

2015/11/02 07:41:40 :: iwconfig eth1
2015/11/02 07:41:42 :: ifconfig eth0
2015/11/02 07:41:42 :: ifconfig eth1
2015/11/02 07:41:42 :: iwconfig eth1
2015/11/02 07:41:45 :: ifconfig eth0
2015/11/02 07:41:45 :: ifconfig eth1
2015/11/02 07:41:45 :: iwconfig eth1

Any suggestions as to how I can troubleshoot this further would be much appreciated.

pzognar 11-02-2015 05:47 AM

Wicd is outdated? But I use it because it works better than Network Manager. :o

Only thing I can think of from what you have posted is ... shouldn't your wifi interface be called something like "wlan" instead of "eth"?

Emerson 11-02-2015 06:38 AM

You could clear the log and try again, there actually is useful information logged.

ReaperX7 11-02-2015 06:40 AM

If you have a Firewall script, make sure wlan0 is listed in the connections along with eth0, etc.

Check and make sure the unsecured wi-fi doesn't require secondary authentication such as a username and password to an intranet.

Also take notice the DBus and Python errors. Did you update dbus or python2 on your system at any time? Is DBus daemon running?

xj25vm 11-03-2015 08:25 PM

Thanks to everybody for responding. Please see below individual replies:

@pzognar - Yes, normally wifi interfaces tend to be called wlan0. But on this particular machine, ethernet is eth0 and wifi is eth1. I think I've seen this before - it seems either a choice of the kernel or of udev - and I would be inclined to think it doesn't have anything to do with my problem - as secured networks work fine. But maybe it has?

@Emerson - I have cleared wicd.log and the following information is logged while attempting to join an unsecured network:

Code:

2015/11/04 02:08:29 :: Connecting to wireless network Posadas Zona 22
2015/11/04 02:08:29 :: Putting interface down
2015/11/04 02:08:29 :: Releasing DHCP leases...
2015/11/04 02:08:29 :: Setting false IP...
2015/11/04 02:08:29 :: Stopping wpa_supplicant
2015/11/04 02:08:29 :: Flushing the routing table...
2015/11/04 02:08:29 :: Putting interface up...
2015/11/04 02:08:31 :: Running DHCP with NO hostname
2015/11/04 02:08:31 :: dhcpcd[25864]: version 6.0.5 starting
2015/11/04 02:08:31 ::
2015/11/04 02:08:31 :: dhcpcd[25864]: eth1: soliciting an IPv6 router
2015/11/04 02:08:31 ::
2015/11/04 02:08:31 :: dhcpcd[25864]: eth1: soliciting a DHCP lease
2015/11/04 02:08:31 ::
2015/11/04 02:08:43 :: dhcpcd[25864]: eth1: no IPv6 Routers available
2015/11/04 02:08:43 ::
2015/11/04 02:09:01 :: dhcpcd[25864]: timed out
2015/11/04 02:09:01 ::
2015/11/04 02:09:01 :: DHCP connection failed
2015/11/04 02:09:01 :: exiting connection thread
2015/11/04 02:09:01 :: Sending connection attempt result dhcp_failed

It is interesting that wicd doesn't appear to be attempting to establish the actual wifi connection first - it just jumps straight to the dhcp bit. Or maybe it does, but it doesn't say anything about it in the log.

@ReaperX7 - The wifi works fine for secured networks - I would imagine any firewall issues would affect both secured and unsecured connections, no? My firewall is pretty straight forward, created using Eric's Slackware easy firewall generator.

Also, if there would be an issue with secondary authentication on the wifi, I wouldn't imagine it comes into play here - as I can't even get an IP address. How can I make it to any portal for the authentication without an IP address?

The dbus daemon seems to be working:

Code:

root@e130:/var/log/wicd# ps -A | grep dbus
 1013 ?        00:00:20 dbus-daemon
24792 ?        00:00:00 dbus-launch
24793 ?        00:00:00 dbus-daemon
24806 ?        00:00:00 dbus-daemon

I don't think I have updated DBus on this machine. I'm not sure about Python though - I have Python 2.7.5

I have also tried resetting the /etc/wicd and /var/lib/wicd/configurations directories - in case in contained any old incompatible settings - but it doesn't make any difference.

Any other suggestions welcome. Can anybody here confirm that they have used wicd in the past with unsecured wifi connections? Then again, maybe it isn't wicd. Maybe I should look into upgrading the firmware blob for my wifi chip - assuming it uses one.

rokytnji 11-03-2015 10:51 PM

Quote:

Originally Posted by pzognar (Post 5443576)
Wicd is outdated? But I use it because it works better than Network Manager. :o

Only thing I can think of from what you have posted is ... shouldn't your wifi interface be called something like "wlan" instead of "eth"?

He is not the only one using eth1

http://antix.freeforums.org/post43683.html#p43683

Code:

Network:  Card-1: Broadcom NetXtreme BCM5751M Gigabit Ethernet PCI Express
          driver: tg3 v: 3.137 bus-ID: 02:00.0 chip-ID: 14e4:167d
          IF: eth0 state: down mac: <filter>
          Card-2: Intel PRO/Wireless 2915ABG [Calexico2] Network Connection
          driver: ipw2200 v: 1.2.2kmprq bus-ID: 14:02.0 chip-ID: 8086:4224
          IF: eth1 state: up mac: <filter>
          WAN IP: <filter> IF: irda0 ip: N/A ip-v6: N/A
          IF: eth0 ip: N/A ip-v6: N/A IF: eth1 ip: <filter> ip-v6: <filter>

I use wicd also. But no open connections at home. Ceni picks up my wifi on that particular laptop as eth1 also so it is not a wicd config error. Ifconfig also picks up that wifi interface on that laptop as eth1.

Edit: I have used my other netbooks on open wifi connections while traveling using wicd also. So no problems with open networks either. Using Intel, Raylink, and Realtek wifi chips also.

2nd edit: Using Salix and Slackel on a couple of netbooks.

http://forum.salixos.org/viewtopic.php?p=35699#p35699

Salix Fluxbox version I am using uses wicd also. But I am on Intel, not Broadcom in SaliX.

allend 11-04-2015 01:11 AM

Quote:

2015/11/04 02:08:31 :: dhcpcd[25864]: version 6.0.5 starting
Have you tried using 'dhclient' instead of 'dhcpcd'? I have a USB modem that used to work with dhcpcd-5.6.6 but stopped connecting with dhcpcd-6.0.5 and later.

xj25vm 11-04-2015 01:20 AM

@allend - could dhcpcd not work only for unsecured connections, but work perfectly fine for the secured ones and for ethernet? Would that be possible I wonder? I'll give it a go when I get a minute though.

Emerson 11-04-2015 06:15 AM

There is a configuration file in /etc/wicd, among other settings there are network interfaces defined. Can't recall the exact name of that file now, but you will find it. I'm guessing that bogus eth1 comes from there.

bassmadrigal 11-04-2015 07:19 AM

Quote:

Originally Posted by Emerson (Post 5444472)
There is a configuration file in /etc/wicd, among other settings there are network interfaces defined. Can't recall the exact name of that file now, but you will find it. I'm guessing that bogus eth1 comes from there.

It's likely eth1 is actually coming from udev. I'm pretty sure wicd just grabs all devices that support wireless extensions (you can find that out typing iwconfig). Linux really doesn't care what you call your network devices (you could set up a udev rule to change the name to blah0, and it should still work fine if you modify Slackware's rc.inet1.conf), and I'd be really surprised if wicd itself did. If OP really wants to, a quick modification can change eth1 to wlan0, but that shouldn't affect wicd, considering wireless devices can also be named ath0 (for atheros) and possibly a few others.

@OP, I don't use wicd, so can you provide a wicd.log with a successful connection to a secured network for comparison? I find it odd that it doesn't show any attempt at getting an IPv4 address, and I'm curious if that is just not outputted or if it is related to your issue.

Can you also try connecting manually with iwconfig?

Code:

iwconfig eth1 essid "unsecured_essid_here"
# you can manually check if it connected to the access point by running iwconfig and checking the ESSID field (if it isn't connected, dhcpcd won't work)
dhcpcd eth1

If it didn't connect to the network, you may need to be more specific with your connection command, use iwlist eth1 scan to note the channel of the open network then run the following (replacing 6 with whatever channel the network is on):

Code:

iwconfig eth1 key open mode Mananged essid "unsecured_essid_here" channel 6
dhcpcd eth1

If it does connect but doesn't get an IP from dhcpcd, you can try running dhclient instead and see if that is where your problem lies.

onebuck 11-04-2015 09:20 AM

Member response
 
Hi,
Quote:

Originally Posted by pzognar (Post 5443576)
Wicd is outdated? But I use it because it works better than Network Manager. :o

Only thing I can think of from what you have posted is ... shouldn't your wifi interface be called something like "wlan" instead of "eth"?

If the OP is using Broadcom wl driver for Broadcom BCM43228 then it will recognize as eth1; http://www.slackwiki.com/Broadcom_Wireless

Hope this helps.
Have fun & enjoy!
:hattip:

xj25vm 11-05-2015 02:15 AM

OK - I might have found an answer. After poking around at kernel modules, and trying the bcma module instead of the rndis_wlan which the laptop uses, the unsecured connection started working. First I though it was because of the bcma module - but when I took a closer look, it was back to using the rndis_wlan driver. After another restart, it refused to work again. After some trial and error, it would appear that the rndis_wlan module needs to be loaded *before* the wl module. I'm not sure I fully understand what is happening - as sometimes I even found the wl module loaded alone, without the rndis_wlan module - with a full secured wifi connection working. It seems that rndis_wlan isn't needed at connection time for a secured connection - but it is needed for an unsecured connection. Also - after connecting to a secured network, it won't reconnect to an unsecured one until I unload and reload wl. This is all very empirical guessing, mind you - based on some simple experiments.

I have now added the following in /etc/modprobe.d/wl.conf:

Code:

softdep wl pre: rndis_wlan
... which allows me to connect to an unsecured wifi network after booting - every time - but only if it is the first network I connect to. Otherwise I have to unload the wl and rndis_wlan modules and reload them. It also unloads both modules when I do a "modprobe -r wl" - to save some typing.

At least I found a solution (of sorts) - but I wouldn't call it elegant or easy. If anybody has a deeper understanding of the kernel modules above - and maybe a better solution - I am very much willing to give it a try.


Edit 1: So the solution seems to be (in two parts):

1. rndis_wlan module needs to load before wl module
2. Both modules need to be reloaded when changing from a secure to a non-secure connection (but not when changing from a non-secure to a secure one).


All times are GMT -5. The time now is 12:09 AM.