NSLU2-Linux
view · edit · print · history
 This how-to assumes that you have cross-compiled your own kernel (kernel >= 2.6.21); ie, that you have a build environment and  the source code for YOUR kernel. And wireless-tools and wpa_supplicant installed on the slug.

 My USB wireless adapter is an Inventel UR045G?. For a list of supported devices visit:


 http://www.prism54.org/newdrivers.html


 1. Download latest Linux wireless drivers from http://linuxwireless.org/download/compat-wireless-2.6/

 2. Extract the content of the package: tar jxvf compat-wireless-xxxx-xx-xx.tar.bz2

 3. #cd compat-wireless-xxxx-xx-xx

 4. Edit config.mk for a successful build. Basically, I've removed the PCI, PCMCIA, and  Sonics Silicon     Backplane sections:

 config.mk
 

 export

 ## NOTE
 ## Make sure to have each variable declaration start
 ## in the first column, no whitespace allowed.

 ifeq ($(wildcard $(KLIB_BUILD)/.config),)
 # These will be ignored by compat autoconf
   CONFIG_PCI=n
   CONFIG_USB=y
   CONFIG_PCMCIA=n
 else
 include $(KLIB_BUILD)/.config
 endif

 # Wireless subsystem stuff
   CONFIG_MAC80211=m

  # Enable QOS for 2.6.22, we'll do some hacks here to enable it.
  # You will need this for HT support (802.11n) and WME (802.11e).
  # If you are >= 2.6.23 we'll only warn when you don't have MQ support
  # or NET_SCHED enabled.
  #
  # We could consider just quiting if MQ and NET_SCHED is disabled
  # as I suspect all users of this package want 802.11e (WME) and
  # 802.11n (HT) support.
   ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes)
   KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
   ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 23 && echo yes),yes)
   CONFIG_MAC80211_QOS=y
  else

  # we're in a kernel >= 2.6.23

  ifneq ($(KERNELRELEASE),) # This prevents a warning

 ifeq ($(CONFIG_NETDEVICES_MULTIQUEUE),) # checks MQ first
  QOS_REQS_MISSING+=CONFIG_NETDEVICES_MULTIQUEUE
 endif

 ifeq ($(CONFIG_NET_SCHED),)
  QOS_REQS_MISSING+=CONFIG_NET_SCHED
 endif

 ifeq ($(QOS_REQS_MISSING),) # if our dependencies match for MAC80211_QOS
 CONFIG_MAC80211_QOS=y
 else # Complain about our missing dependencies
 $(warning "WARNING: You are running a kernel >= 2.6.23, you should enable in it $(QOS_REQS_MISSING) for  802.11[ne] support")
 endif

 endif # In build module mode

 endif # kernel release check
 endif # kernel Makefile check

 CONFIG_MAC80211_RC_DEFAULT=pid
 CONFIG_MAC80211_RC_PID=y

 # enable mesh networking too
 CONFIG_MAC80211_MESH=y

 CONFIG_CFG80211=m
 CONFIG_NL80211=y

 # mac80211 test driver
 CONFIG_MAC80211_HWSIM=m


 # This is required for some cards
 CONFIG_EEPROM_93CX6=m

 # USB Drivers
 ifneq ($(CONFIG_USB),)
 CONFIG_ZD1211RW=m



 CONFIG_P54_USB=m


 endif # end of USB driver list


 # p54
 CONFIG_P54_COMMON=m



 ifeq ($(NEED_IEEE80211),y)
 # Old ieee80211 "stack"
 # Note: old softmac is scheduled for removal so we
 # ignore that stuff
 CONFIG_IEEE80211=m
 CONFIG_IEEE80211_CRYPT_CCMP=m
 CONFIG_IEEE80211_CRYPT_TKIP=m
 CONFIG_IEEE80211_CRYPT_WEP=m
 CONFIG_IEEE80211_SOFTMAC=n
 endif


 5. Now it's time to cross-compile.

 make    ARCH=arm  CROSS_COMPILE=/home/slug/slug/slugos/tmp/cross/bin/armeb-linux- \   KLIB=/home/slug/slug/slugos/tmp/work/nslu2be-linux/linux-ixp4xx-2.6.24.7+svnr1066-r0/linux-2.6.24     KLIB_BUILD=/home/slug/slug/slugos/tmp/work/nslu2be-linux/linux-ixp4xx-2.6.24.7+svnr1066-r0/linux-2.6.24


 6. Copy the required kernel modules to their respective postion on the slug:

 p54usb.ko                  
 p54common.ko              
 mac80211.ko              
 cfg80211.ko

 7. Obtain driver for wireless adapter: http://prism54.org/newdrivers.html(approve sites) Version 2.5.8.0. Rename the  driver 2.5.8.0.arm to  isl3887usb_bare - place in directory /lib/firmware

 8. Install wpa_supplicant (make sure kernel modules are not overwritten, if you're using ipkg install)

 create /etc/wpa_supplicant.conf

 wpa_supplicant.conf - START ------------------------
 # See /usr/doc/wpa_supplicant-0.5.10/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/volatile/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=1                                                                                              
  ssid="Bollocks"                                                                                    
  proto=WPA2?                                                                                               
  key_mgmt=WPA-PSK                                                                                         
  pairwise=CCMP TKIP                                                                                       
  group=CCMP TKIP WEP104? WEP40?                                                                             
  psk=" your key"                                    

 }                                                                                                          

 # Plaintext connection (no WPA, no IEEE 802.1X),                                                           
 # nice for hotel/airport types of WiFi? network.                                                            
 network={                                                                                                  
  key_mgmt=NONE                                                                                            
  priority=0                                                                                               
 }

=]

 9. Plugin wireless card, make sure firmware has loaded - use dmesg.

 p54: LM86? firmware
 p54: FW rev 2.5.8.0 - Softmac protocol 3.0
 phy0: Selected rate control algorithm 'simple'
 phy0: hwaddr 00:88:78:67:67:8b, isl3887
 usbcore: registered new interface driver prism54usb
 wlan0: Initial auth_alg=0
 wlan0: authenticate with AP 00:23:34:45:4e:ab
 wlan0: RX authentication from 00:14:7f:8e:4e:ab (alg=0 transaction=2 status=0)
 wlan0: authenticated
 wlan0: associate with AP 00:23:34:45:4e:ab
 wlan0: RX AssocResp? from 00:55:55:55:55:55 (capab=0x431 status=0 aid=3)
 wlan0: associated
 wlan0: switched to short barker preamble (BSSID=00:xx:xx:xx:xx:xx)
 wlan0: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15 cWmax=1023 burst=0
 wlan0: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15 cWmax=1023 burst=0
 wlan0: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 burst=30
 wlan0: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 burst=15


 root@twollocks:/lib/firmware# lsmod
 Module                  Size  Used by
 p54usb                 12480  0 
 p54common              10432  1 p54usb
 mac80211              130940  2 p54usb,p54common
 cfg80211               22504  1 mac80211



 10. Bring up wireless lan: ifconfig wlan 192.168.0.53 up

 11. wpa_supplicant -i wlan0   -D wext -c /etc/wpa_supplicant.conf -B

 Set rate:

 12. iwconfig eth1 rate 54M fixed

 13. Do an iwconfig

	  wlan0     IEEE 802.11g  ESSID:"Bollocks"  
          Mode:Managed  Frequency:2.462 GHz?  Access Point: 00:zz:xx:xx:ss:00  
          Bit Rate=54 Mb/s   Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2346 B   
          Encryption key:1111-1111-2222-3333-4333-7777-6766-45451. [2]
          Link Signal level=98/127  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
view · edit · print · history · Last edited by General Slug.
Originally by General Slug.
Page last modified on July 15, 2008, at 08:01 AM