How do I get wireless D-Link DWA-645 working?

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

How do I get wireless D-Link DWA-645 working?

Postby Gustav » Sun Feb 27, 2011 14:20

Hi,
I installed SL from Sabayon_Linux_x86_5.5_K.iso and
did equo update and equo upgrade.

My wireless adapter D-Link DWA-645 (PCMCIA) doesn't work Out of The Box
and I don't know what to look for.
Please help.
The last part of dmesg is shown below.
Thanks
Gustav

    [ 214.625120] pcmcia_socket pcmcia_socket1: pccard: CardBus card inserted into slot 1
    [ 214.625157] pci 0000:07:00.0: [168c:0023] type 0 class 0x000280
    [ 214.625194] pci 0000:07:00.0: reg 10: [mem 0x00000000-0x0000ffff]
    [ 214.625341] pci 0000:07:00.0: BAR 0: assigned [mem 0x4c000000-0x4c00ffff]
    [ 214.625352] pci 0000:07:00.0: BAR 0: set to [mem 0x4c000000-0x4c00ffff] (PCI address [0x4c000000-0x4c00ffff])
    [ 214.699125] cfg80211: Calling CRDA to update world regulatory domain
    [ 214.886310] ath9k 0000:07:00.0: enabling device (0000 -> 0002)
    [ 214.886332] ath9k 0000:07:00.0: PCI INT A -> Link[LNKD] -> GSI 11 (level, low) -> IRQ 11
    [ 215.321633] ath: EEPROM regdomain: 0x30
    [ 215.321639] ath: EEPROM indicates we should expect a direct regpair map
    [ 215.321646] ath: Country alpha2 being used: AM
    [ 215.321650] ath: Regpair used: 0x30
    [ 215.328279] ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'
    [ 215.330118] cfg80211: Calling CRDA for country: AM
    [ 215.330897] Registered led device: ath9k-phy0::radio
    [ 215.331129] Registered led device: ath9k-phy0::assoc
    [ 215.331222] Registered led device: ath9k-phy0::tx
    [ 215.331309] Registered led device: ath9k-phy0::rx
    [ 215.331324] ieee80211 phy0: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81 mem=0xf8a00000, irq=11
    [ 215.439702] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Gustav
Baby Hen
 
Posts: 9
Joined: Mon Feb 21, 2011 17:56
Location: Sweden

Re: How do I get wireless D-Link DWA-645 working?

Postby Fitzcarraldo » Sun Feb 27, 2011 15:32

From what you've posted, your PCMCIA or CardBus device (PCMCIA is 16-bit only) uses the Atheros AR5416 chip, which is not supported by the ath5k driver (see http://linuxwireless.org/en/users/Drive ... ed_Devices) but looks like it is supported by the ath9k driver (see http://wireless.kernel.org/en/users/Dri ... d_chipsets). The ath9k driver is configured in the SL kernel to be an external module:

Code: Select all
# cat /usr/src/linux/.config | grep ATH9K
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K=m
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_ATH9K_HTC=m


Check if the ath9k module is loaded:

Code: Select all
# lsmod | grep ath9k

If it isn't, load it (although from what you've posted it looks like it is):

Code: Select all
# modprobe ath9k

and unload the ath5k module if it's loaded:

Code: Select all
# rmmod ath5k

You may need to restart NetworkManager after that:

Code: Select all
# /etc/init.d/NetworkManager restart


If you can't get the ath9k driver to work, there's always NDISwrapper with the Windows XP drivers on the driver CD-ROM that came with your CardBus card (see the SL Wiki article Using Broadcom wireless and ndiswrapper w/Sabayon miniEd as an example, but you'd have to replace the Broadcom names with the appropriate Atheros names).

Are you trying to connect to an encrypted network? If so, try connecting to an unencrypted network first to see if that works.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7977
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: How do I get wireless D-Link DWA-645 working?

Postby Richlion » Sun Feb 27, 2011 19:21

Is this on a laptop? Did it work with previous SL versions?
You also didn't write if you are using KDE, or Gnome?

In my opinion there is a problem with the KDE network manager.

When I setup my WI-FI connection, I have to reboot. Every time I install SL with KDE and setup my WI-FI on KDE I never can get it working after the initial setup. After a reboot everything is fine.
And also with the new SL5.5 and KDE4.6 when I have the "Auto connect at startup" the password popup window comes up when I login to SL, I confirm pressing OK, and my Network manager can't connect saying "waiting for authorization". I have to click on the Network interface, click on my Wireless router, force the popup window to login, the second time I press OK I am connected. It never works the first time.

I also recently went through reinstalling SL5.5 making sure my wireless was switched on.
viewtopic.php?f=52&t=23146
When it was switched off during the installation, WI-FI was not working at all. My wireless button would blink 5-6 times and it would die. I almost thought my freshly purchased laptop was usless :roll:
And I tried reinstalling SL5.3, 5.4 and 5.5 again with the same experience.

Don't know if this helps.
Richlion
Technological Hen
 
Posts: 393
Joined: Sun Nov 11, 2007 2:19
Location: Manchester

Re: How do I get wireless D-Link DWA-645 working?

Postby Gustav » Sun Feb 27, 2011 20:56

Thank you Fitzcarraldo for your fast and dedicated answer.
However, I had no success so far and must give up for now.

The ath9k was loaded and the ath5k wasn`t.
So I tried the NDISwrapper as instructed and then
Code: Select all
# ndiswrapper -l
netathw : driver installed
device (168C:0023) present (alternate driver: ath9k)

Code: Select all
# iwconfig

    lo no wireless extensions.

    eth0 no wireless extensions.

    wlan0 IEEE 802.11bgn ESSID:off/any
    Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
    Retry long limit:7 RTS thr:off Fragment thr:off
    Encryption key:off
    Power Management:off
Code: Select all
# dhclient wlan0

But the only time the LEDs on the interface were lit during the process, was when I did the NetworkManager restart and when inserting the PCMCIA card. And it was only during a fraction of a second in both cases.

Again thanks.
All for now.
Gustav
P.S. Thanks Richlion,
It's a laptop, Dell Inspiron 8200 dual boot with XP.
Gustav
Baby Hen
 
Posts: 9
Joined: Mon Feb 21, 2011 17:56
Location: Sweden

Re: How do I get wireless D-Link DWA-645 working?

Postby Fitzcarraldo » Mon Feb 28, 2011 0:55

What is the output of the ifconfig command?

As it happens, in one of my laptops I have a Linksys CardBus Wireless card, but mine uses the Atheros AR2413 chip, and hence the ath5k module.

Code: Select all
# lspci | grep Atheros
02:00.0 Ethernet controller: Atheros Communications Inc. AR2413 802.11bg NIC (rev 01)

Code: Select all
# lsmod | grep ath
ath5k                 108890  0
ath                     9895  1 ath5k
mac80211              139254  1 ath5k
cfg80211               95249  3 ath5k,ath,mac80211

Below is the tail of the dmesg command's output:

Code: Select all
[   28.695792] cfg80211: Calling CRDA to update world regulatory domain
[   29.378326] ath5k 0000:02:00.0: enabling device (0000 -> 0002)
[   29.378358] ath5k 0000:02:00.0: PCI INT A -> Link[LNKA] -> GSI 9 (level, low) -> IRQ 9
[   29.378537] ath5k 0000:02:00.0: registered as 'phy0'
[   29.968915] ath: EEPROM regdomain: 0x30
[   29.968926] ath: EEPROM indicates we should expect a direct regpair map
[   29.968936] ath: Country alpha2 being used: AM
[   29.968943] ath: Regpair used: 0x30
[   29.977992] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   29.979266] cfg80211: Calling CRDA for country: AM
[   29.980576] ath5k phy0: Atheros AR2413 chip found (MAC: 0x78, PHY: 0x45)
[   30.175401] es1968: not attempting power management.
[   30.727953] input: ES1978 as /devices/pci0000:00/0000:00:08.0/input/input6
[   30.779083] es1968: clocking to 48000
[   37.009064] EXT4-fs (dm-0): re-mounted. Opts: (null)
[   38.032298] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   77.613737] Adding 589820k swap on /dev/mapper/vg_meshedgedx-lv_swap.  Priority:-1 extents:1 across:589820k
[  141.704174] wlan0: authenticate with 00:14:7f:9b:09:1c (try 1)
[  141.706472] wlan0: authenticated
[  141.706549] wlan0: associate with 00:14:7f:9b:09:1c (try 1)
[  141.708955] wlan0: RX AssocResp from 00:14:7f:9b:09:1c (capab=0x411 status=0 aid=3)
[  141.708970] wlan0: associated

Now, in my case I have to lower the MTU to 1464 in order to get WiFi to work. There are different ways to do this. One is to use the following command as root user in a Konsole/Terminal window:

Code: Select all
ifconfig wlan0 mtu 1464

To save doing this every time you start up your PC, you can add that line to the file /etc/conf.d/local. Alternatively, if you are using nm-applet or the Network Management widget, you can edit the connection via the applet/widget GUI and specify the MTU there.

I also found with this MTU and CardBus card that a few Web sites would not load (see One Web site stalls (due to 'black hole' router) [Solved]), so I have to perform a further little trick in /etc/conf.d/local:

Code: Select all
# Here is where you can put anything you need to start
# that there is not an init script for.

local_start() {
   # This is a good place to load any misc programs
   # on startup (use &>/dev/null to hide output)

   # The Linksys CardBus card does not work with MTU greater than 1464:
   ifconfig wlan0 mtu 1464
   # Enable TCP MTU probing to deal with black hole routers:
   echo 2 > /proc/sys/net/ipv4/tcp_mtu_probing

   # We should always return 0
   return 0
}

local_stop() {
   # This is a good place to unload any misc.
   # programs you started above.
   
   # We should always return 0
   return 0
}


You can find out what MTU is appropriate for your wireless card by using the ping command as explained in the following blog post: How to determine the proper MTU size with ICMP pings.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7977
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest