Dhcpcd problems with connecting to wireless network?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Dhcpcd problems with connecting to wireless network?
I installed a full install of Slackware 12.1 and the first thing I did was get started with the wireless cards. I have two Linksys network adapters that needed drivers. A Linksys usb model wusb54g with a ralink chipset and a linksys wpc54g with a broadcom chipset. After successfully installing them, I went to try and connect them to my wireless router. But for some reason I couldn't connect. Seemed to be getting stuck at "dhcpcd". I had the same wireless cards and same drivers working great under slackware 11 / 12.0
I used ndiswrapper for both and everything when smooth, no problem.
If I tried running "iwlist wlan1 scan" I'm able to see the network.
However, after running "dhcpcd wlan1", I'm not able to connect to the router. Dmesg gave me this:
dmesg:
ADDRCONF(NETDEV_UP): wlan1: link is not ready
ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
wlan1: no IPv6 routers present
I have tried to disconnect the wpa encryption and leaving the network unsecured but no change.
Also, tried to disable the ipv6 in modprobe.conf and blacklisting it but it only gets rid of the dmesg error and does not connect.
Does any body know what could be done to fix it. Thank you in advance.
I had similar problems with my Lenovo N200 notebook (intel wireless chipset - the intel drivers, no ndiswrapper), especially before I moved up from Slack 12.0 to 12.1. dhcpcd sometimes did the business and sometimes did not. Always on a fresh boot my wireless network was fine. If however I lost it for some reason, re-starting it by running rc.inet1 again sometimes worked and sometimes did not. Like you, running "iwlist scan" (nearly) always showed that the network could be detected - sometimes I had to do a "ifconfig wlan0 up" command first.
Since moving to 12.1 I find I almost never have to re-boot to get the wireless working again. Some combination of iwlist, ifconfig, iwconfig and dhcpcd commands usually gets me up and networking again. Sorry I can't be clearer than this, but just when I think I have figured out the exact right order and parameters to these, I find that next time round it does not quite work...
I tried the Ralink driver from the Slackbuilds for my usb adapter, and like always every thing when thought except dhcpcd. First dhcpcd took to long to complete and when it did go thought, I was not able to connect.
After checking dmesg this is what I get:
Code:
usb 1-5: new high speed USB device using ehci_hcd and address 2
usb 1-5: configuration #1 chosen from 1 choice
phy0: Selected rate control algorithm 'simple'
usbcore: registered new interface driver rt2500usb
ADDRCONF(NETDEV_UP): wlan2: link is not ready
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1d:7e:db:11:9b
wlan2: RX authentication from 00:1d:7e:db:11:9b (alg=0 transaction=2 status=1)
wlan2: AP denied authentication (auth_alg=0 code=1)
wlan2: authenticate with AP 00:1d:7e:db:11:9b
wlan2: RX authentication from 00:1d:7e:db:11:9b (alg=0 transaction=2 status=1)
wlan2: AP denied authentication (auth_alg=0 code=1)
wlan2: authenticate with AP 00:1d:7e:db:11:9b
wlan2: RX authentication from 00:1d:7e:db:11:9b (alg=0 transaction=2 status=1)
wlan2: AP denied authentication (auth_alg=0 code=1)
wlan2: authentication with AP 00:1d:7e:db:11:9b timed out
pccard: card ejected from slot 0
ndiswrapper: device wlan1 removed
ACPI: PCI interrupt for device 0000:02:00.0 disabled
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1d:7e:db:11:9b
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: RX authentication from 00:1a:70:ef:73:37 (alg=0 transaction=2 status=0)
wlan2: authenticated
wlan2: associate with AP 00:1a:70:ef:73:37
wlan2: authentication frame received from 00:1a:70:ef:73:37, but not in authenticate state - ignored
wlan2: RX AssocResp from 00:1a:70:ef:73:37 (capab=0x431 status=0 aid=4)
wlan2: associated
wlan2: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15 cWmax=1023 burst=0
wlan2: failed to set TX queue parameters for queue 2
wlan2: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15 cWmax=1023 burst=0
wlan2: failed to set TX queue parameters for queue 3
wlan2: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 burst=30
wlan2: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 burst=15
ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready
wlan2: no IPv6 routers present
wlan2: RX deauthentication from 00:1a:70:ef:73:37 (reason=7)
wlan2: deauthenticated
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: authentication with AP 00:1a:70:ef:73:37 timed out
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: Initial auth_alg=0
wlan2: authenticate with AP 00:1a:70:ef:73:37
wlan2: RX authentication from 00:1a:70:ef:73:37 (alg=0 transaction=2 status=0)
wlan2: authenticated
wlan2: associate with AP 00:1a:70:ef:73:37
wlan2: RX ReassocResp from 00:1a:70:ef:73:37 (capab=0x431 status=0 aid=4)
wlan2: associated
wlan2: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15 cWmax=1023 burst=0
wlan2: failed to set TX queue parameters for queue 2
wlan2: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15 cWmax=1023 burst=0
wlan2: failed to set TX queue parameters for queue 3
wlan2: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 burst=30
wlan2: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 burst=15
I did not disable the ipv6 but I do not see it in dmesg.
When posting before I didn't read your OP thoroughly. Now
I see you have an USB device, not PCI or PCMCIA.
I don't have much time this morning to check your output,
but a couple of things are mentionable.
First, you had at one time wlan0, then your OP has wlan1,
and now the above post has wlan1 changing to wlan2. This
is setup by UDEV in /etc/udev/rules.d/70-persistent-net.rules.
Every time you change devices, or drivers, that file is
recreated. I would suggest you remove it and reboot, so
the clutter is gone. You can edit it, but if you choose
incorrect settings you'll still have problems.
I have a "ID 13b1:000d Linksys WUSB54G Wireless Adapter"
which the default Slackware-12.1 generic-smp-2.6.24.5-smp
kernel loads with the rt2500usb module. However, in the
very short time I had this morning, I could not get an IP
address with my router using DHCP. NB: We normally use
WPA and static IPs on this LAN, and time did not permit
me to throughly check my settings.
To use either the kernel driver, or the Slackware package
that was previously suggested, you do not need ndiswrapper.
Therefore, you should remove it or disable it before you
reboot with the Ralink adapter. To use the Slackware package
rather than the kernel driver, you'll need to blacklist the
kernel module. However, I haven't tested the other driver
from serial monkey in the Slackware package from Alien Bob
with an USB device. It works fine with a PCI Ralink card,
and the kernel driver does not work well with that card.
Afterwards, if you're still not connected, please post the
output of the following:
Code:
lsmod
/sbin/lsusb
/sbin/iwconfig
/sbin/ifconfig
less /etc/rc.d/rc.inet1.conf
This evening I should have time to test the two cards and
the two different drivers to see what will work with the
USB device. I suspect you're still using the driver built
into the kernel, because the one from the Slackware package
names the card ra0.
I removed devices from the /etc/udev/rules.d/70-persistent-net.rules, then removed ndiswrapper the system and only left the rt2500 driver I installed from the Slackbuilds for the usb adapter. Still had no lucky.
Code:
lsmod:
Module Size Used by
sg 30224 0
rt2500 179168 0
snd_seq_dummy 6660 0
snd_seq_oss 32896 0
snd_seq_midi_event 10112 1 snd_seq_oss
snd_seq 50256 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_pcm_oss 40352 0
snd_mixer_oss 17920 1 snd_pcm_oss
ipv6 234724 12
lp 13348 0
parport_pc 27556 0
parport 34632 2 lp,parport_pc
fuse 45588 3
tifm_sd 13704 0
pcmcia 35884 0
snd_via82xx 26520 1
gameport 14472 1 snd_via82xx
snd_ac97_codec 98724 1 snd_via82xx
ac97_bus 5760 1 snd_ac97_codec
rt2500usb 25088 0
snd_pcm 72068 3 snd_pcm_oss,snd_via82xx,snd_ac97_codec
rt2x00usb 12672 1 rt2500usb
snd_timer 22532 2 snd_seq,snd_pcm
rt2x00lib 21504 2 rt2500usb,rt2x00usb
snd_page_alloc 11528 2 snd_via82xx,snd_pcm
rfkill 9488 1 rt2x00lib
snd_mpu401_uart 10496 1 snd_via82xx
ac 8068 0
input_polldev 7304 1 rt2x00lib
battery 14340 0
snd_rawmidi 22560 1 snd_mpu401_uart
thermal 16540 0
button 10000 0
crc_itu_t 5760 1 rt2x00lib
snd_seq_device 10380 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
processor 32680 1 thermal
i2c_viapro 11156 0
via_rhine 24968 0
mac80211 122124 2 rt2x00usb,rt2x00lib
snd 47716 13 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
rtc_cmos 11040 0
tifm_7xx1 9344 0
via_agp 12032 1
mii 8448 1 via_rhine
sdhci 18692 0
soundcore 9824 1 snd
rtc_core 18696 1 rtc_cmos
shpchp 32788 0
yenta_socket 26636 1
agpgart 30664 1 via_agp
psmouse 40336 0
cfg80211 14600 1 mac80211
tifm_core 10884 2 tifm_sd,tifm_7xx1
rtc_lib 6528 1 rtc_core
mmc_core 47236 2 tifm_sd,sdhci
rsrc_nonstatic 14592 1 yenta_socket
serio_raw 9092 0
evdev 12672 5
pcmcia_core 35988 3 pcmcia,yenta_socket,rsrc_nonstatic
/sbin/lsusb:
Bus 001 Device 003: ID 0781:5406 SanDisk Corp. Cruzer Micro 1/4GB Flash Drive
Bus 001 Device 002: ID 13b1:000d Linksys WUSB54G Wireless Adapter
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
/sbin/iwconfig:
lo no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:"XXXXX"
Mode:Managed Frequency:2.412 GHz Access Point: 00:XX:00:XX:00:XX
Bit Rate=2 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:xxxxxxxxxxx [2]
Link Quality=32/100 Signal level=-48 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
/sbin/ifconfig:
lo Link encap:Local Loopback
inet addr:XXXXXXX Mask:XXXXXXXXX
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1840 (1.7 KiB) TX bytes:1840 (1.7 KiB)
wlan0 Link encap:Ethernet HWaddr XXXXXXXXXX
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:397 (397.0 B) TX bytes:2841 (2.7 KiB)
wmaster0 Link encap:UNSPEC HWaddr XXXXXXXXXXXXXXX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/etc/rc.d/rc.inet1.conf:
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").
# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.
# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.
# =============================================================================
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
# Default gateway IP address:
GATEWAY=""
# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
## Example config information for wlan0. Uncomment the lines you need and fill
## in your data. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="XXXXXXXXXXXXXXX"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set "<the key>"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30
## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name instead of
# the default 'eth4'
#IFNAME[4]="eth0:1" # Set up an IP alias.
#HWADDR[4]="XXXXXXXXXXXXXXXX" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to
# wait for server resonse is 30 seconds, but
# you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes" # If you don't want the DHCP server to change
# your default gateway
#DHCP_IPADDR[4]="" # Request a specific IP address from the DHCP
# server
#WLAN_ESSID[4]=XXXXX # An example of how you can override _any_
# parameter defined in rc.wireless.conf, by
# prepending 'WLAN_' to the parameter's name.
# Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (separated with the pipe (|)
# character, see the example).
#WLAN_WPA[4]="wpa_supplicant" # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
# ndiswrapper driver (if you leave this empty
# the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30 # In case it takes long for the WPA association
# to finish, you can increase the wait time
# (defaults to 10 seconds)
Last edited by ALSiPSClAr; 05-31-2008 at 09:05 PM.
It worked on my network unsecured, but we don't run wireless without WPA; so I set it up first in the file with:
Code:
WLAN_IWPRIV[1]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=key"
which did not work.
Then I removed the above line and added /etc/wpa_supplicant.conf and that did the trick. Here's the settings:
Code:
root@james:~# ls -l /etc/wpa_supplicant.conf
-rw-r--r-- 1 mingdao users 865 2008-01-06 16:02 /etc/wpa_supplicant.conf
root@james:~# cat /etc/wpa_supplicant.conf
# See /usr/doc/wpa_supplicant-0.5.8/wpa_supplicant.conf.sample
# for many more options that you can use in this file.
# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="philemon"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=<your_64_hex_characters_long_key>
}
# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
# You'll need a recent version of wireless-tools for this!
network={
ssid="any"
key_mgmt=NONE
priority=2
}
root@james:~# root@james:~# egrep -v "(^#|^ *$)" /etc/rc.d/rc.inet1.conf
IFNAME[1]="wlan0"
IPADDR[1]="192.168.1.52"
NETMASK[1]="255.255.255.0"
WLAN_ESSID[1]=philemon
WLAN_MODE[1]=Managed
WLAN_RATE[1]="54M auto"
WLAN_CHANNEL[1]="auto"
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"
GATEWAY="192.168.1.1"
DEBUG_ETH_UP="yes"
(those lines are only the uncommented lines in the file)
Hope this helps you (or someone else) get it working.
NB: This device and setup may not even work well. These new kernel drivers are experimental, and I have not even transferred a file with rsync. When I did previously with rt2500pci on another card, it hung my machine.
I've now run what I believe to be a reliable test with the 2.6.24.5 rt2500usb module. Last night I did all the work on that box over ssh from my workstation. I started rsync to backup the box and it looked really good. The transfer times were good for wireless, and it seemed like it was going to be a good driver. However ...
This morning when I woke up my terminal here reported:
Code:
<snip>
kernel/linux-2.6.25.2/drivers/i2c/busses/i2c-sis630.ko
Read from remote host 192.168.1.52: Connection timed out
Connection to 192.168.1.52 closed.
mingdao@silas:~$
It had closed before it finished the rsync. Also, the Linksys WUSB54G Wireless Adapter power and link lights both were off. I tried to ssh back into the box, and got:
Code:
mingdao@silas:~$ ssh mingdao@192.168.1.52
ssh: connect to host 192.168.1.52 port 22: No route to host
So I built a 2.6.25.4 kernel, hoping it was better. When the kernel booted, I was installing the Nvidia driver over a NFS mount, and it hung the terminal.
So, I'm removing rt2500usb from my kernel, and building rt2570 (USB) from rt2x00.serialmonkey.com.
Alien Bob is helping me with a SlackBuild script. When it's done, I'll report back the results. If it's good, I'm sure he or I will publish the SlackBuild.
I copy all the setting that you showed and this is what I get from the boot up screen:
Code:
Triggering udev events: /sbin/edevtrigger --retry-failed
/etc/rc.d/rc.M wlan0 information: 'ANY ESSID'
Error for wireless request "SET Nickname" (8B1C) :
SET failed on device wlan0 : Operation not supported.
wlan0 no private ioctls.
wlan0 no private ioctls.
wlan0 no private ioctls.
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
Polling for DHCP server on interface wlan0
No carrier detected on wlan0. Reducing DHCP timeout to 10 seconds.
dhcpcd: MAC address = "<mac address>"
Hopefully this could make more sense to you then it does to me. Thanks.
Bruce Hill thanks for all the help. I really appreciate it. I still was not able to get it going but I probably go get a different wireless card and hopefully that work better. Thank again everybody.
Solved: Dhcpcd problems with connecting to wireless network?
I finally got it going. I reinstalled Slackware 12.1 and the driver for the usb wireless adapter (Linsys WUSB54G). I used all the command to start it up and nothing happened. Then I decided to restart the router first, then the computer. After rebooting I could not believe it, it started to work. It fired up from the first try and is still working even after a second reboot. So I guess sometime it does not hurt to reboot the router.
Once again thanks everybody for helping me out, especially Bruce Hill. He was the one that helped me not to give up and try again by posting new ideas for me to try. Thanks!
bash-3.1$ rsync -va --progress http://slackwarebox.dyndns.org:88/sl...install-d1.iso
ssh: connect to host http port 22: No route to host
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at io.c(635) [receiver=3.0.2]
However, by opening the url with firefox downloader it was downloading it.
I would have to try it at night because of the slow connections and other
people in the house. Do not want to jam everybody.
Last edited by ALSiPSClAr; 05-31-2008 at 08:51 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.