OpenWrt Forum Archive

Topic: zd1211rw trouble using trunk 18124 on Linksys NSLU2

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

uname -a: Linux OpenWrt 2.6.28.10 #1 Thu Oct 22 23:46:40 CEST 2009 armv5teb GNU/Linux

I am trying to configure my NSLU2 to use a acer wlan 11g usb dongle which uses the zd1211rw driver.

1. using wpa_supplicant
I have compiled trunk rev 18124 and the wireless dongle works fine in sta mode using wpasupplicant, with /etc/config/wireless setup with

config wifi-device "wlan0"
        option type "mac80211"
        option channel auto
        
config wifi-iface
     option device wlan0
#     option network lan
     option mode "sta"
     option ssid r-stue
     option encryption none

Problem 1 (using wpasupplicant):
The wlan connection is working fine using /etc/wpa_supplicant to specify the psk2 key and so on, but it seems that I when I disconnect eth0 I also loose the wlan connection, and also when adding an init script of:

start() {
       echo start
       wpa_supplicant -Dwext -iwlan0 -B -c/etc/wpa_supplicant.conf
       sleep 15
                                                  
       udhcpc -i wlan0
}

and asking it to start at boot with /etc/init.d/wpa_supplicant enable it will only start if also eth0 is connected at bootup.

Does anybody know how to configure the openwrt to only use wpasupplicant as a sole network connection ?

2. using /etc/config/wireless without wpa_supplicant
When configuring the wireless setup without using wpa_supplicant manually, with a /etc/config/wireless of:

config wifi-device "wlan0"
        option type "mac80211"
        option channel 6
       option macaddr 00:11:E2:04:98:AB

config wifi-iface
     option device "wlan0"
#     option network lan
     option mode "sta"
     option ssid "r-stue"     
        option encryption "psk2"
     option passphrase 1
        option key "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

the wlan0 interface is not brougth up after rebooting, and when restarting the network manually with /etc/init.d/network restart, I get the following error message:

PHY for wifi device wlan0 not found

PHY for wifi device wlan0 not found

and "cat  /sys/class/ieee80211/phy0/macaddress"
gives the following mac address (which seems very strange)

c12e00c0

If I change the wireless config macaddr line to read " option macaddr c12e00c0" I get the following result:

ifconfig: invalid hw-addr 00:c12e00c0

Problem 2 (without wpa_supplicant
It seems like the zd1211rw driver (or the mac80211 driver) registrert a really weird mac address.
Changing the mac addr using "ifconfig wlan0 hw ether 00:11:E2:04:98:AB" also did not help.

Does anybody have any experiences with zd1211rw and the issues above ?

Regards,

Rune

(Last edited by rune.evjen on 16 Nov 2009, 23:19)

Same problem over here with r18485. To my understanding there are some troubles with modules. The kmod-zd1211rw depends on:

kmod-usb-core
kmod-crypto-aes
kmod-crypto-arc4

All the above seam to be missing from the http://downloads.openwrt.org/snapshots/ … /packages/

As a workaround I tried adding http://downloads.openwrt.org/kamikaze/8 … /packages/
where those packages seams to be present, but when I try an opkg install kmod-zd1211rw it fails with an error:

* Packages were found, but none compatible with the architectures configured

you can force opkg to install zd1211rw (-force-depend) but still the missing modules will not make it working. To my surprise I have an older installation of openwrt from trunk (maybe an year or so) where all seams to work just fine...

Any help from the developers will be much appreciated ...

regards Fulvio.

(Last edited by fulvy70 on 26 Nov 2009, 05:22)

Fulvio,

I have compiled zd1211rw as well as the dependencies from trunk, and opkg list_installed shows that they are installed
kmod-crypto-aes - 2.6.28.10-1 -
kmod-crypto-arc4 - 2.6.28.10-1 -
kmod-crypto-core - 2.6.28.10-1 -
kmod-usb-audio - 2.6.28.10-1 -
kmod-usb-core - 2.6.28.10-1 -
kmod-usb-ohci - 2.6.28.10-1 -
kmod-usb-storage - 2.6.28.10-1 -
kmod-usb2 - 2.6.28.10-1 -
libusb - 0.1.12-2 -
usbutils - 0.86-1

All the modules except the zd1211rw (since I might switch to another wireless usb stick because of the zd1211rw problems) are compiled into the image (i.e not as modules/ipk packages).

Also, wpa_supplicant works, but  configuring the zd1211 device using /etc/config/wireless without wpa_supplicant didn't.

I have added a bug report at https://dev.openwrt.org/ticket/6208
Did your earlier trunk version support zd1211rw through the mac80211 driver without wpa_supplicant ?

Best Regards,

Rune

Hi Rune!
I've worked a bit on my NSLU2. I downloaded from svn a trunk distribution for openwrt and complied it myself... took a while but was OK, I was expecting something more "painful". Installed on the NSLU2 no problems, I can now load my version of the modules that were some how not properly complied in the trunk distribution provided by Openwrt themselves.

Every needed module/tool seams to load fine, dependencies seams to be fulfilled and WPA works too ... finally ...

As far as I've understood Openwrt in all cases uses wpa_supplicant to authenticate. The network start-up scripts will parse the /etc/config/wireless and will create a temporary wpa_supplicant.conf file and wpa_supplicant will be started with that temp file.

The second NSLU2 unit I have (one year old or so) with Openwrt and a zd1211rw wireless key does exactly the same things (all the configuration is in the /etc/conf/wireless) and it uses wpa_supplicant.

What's I've noticed in my case is that I have to be sure all modules are really coming form "my own" complied openwrt distribution (opkg.conf must point only at my package source). A mix of stuff compiled by me and something from the official openwrt "breaks the box"

I tried a "wifi detect" and I noticed an error:

Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not supported.

Probably It's something not to really worry about ... who knows ...


Cheers Fulvio.

(Last edited by fulvy70 on 27 Nov 2009, 23:28)

Fulvio,

I'm glad it works for you.

Could you please check If you see the real mac address when issuing `cat /sys/class/ieee80211/phy1/macaddress`

When I issue this command I get a really strange reply ("c12b80c0"). This value seems to break the tests in /lib/wifi/wireless.sh, which prevents the /etc/config/wireless coonfiguration to work.

Rune

The discussion might have continued from here.