I tried the iwconfig route, I got this:
- Code: Select all
absols-sabayon-desktop absol # /etc/init.d/NetworkManager stop
* Stopping NetworkManager ... [ ok ]
absols-sabayon-desktop absol # ifconfig wlan0 up
absols-sabayon-desktop absol # iwconfig wlan0 mode managed
absols-sabayon-desktop absol # iwconfig wlan0 essid colon_network
absols-sabayon-desktop absol # dhclient
Internet Systems Consortium DHCP Client V3.0.5-Gentoo-r1
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/wlan0/00:c0:a8:f8:bc:0a
Sending on LPF/wlan0/00:c0:a8:f8:bc:0a
Listening on LPF/wmaster0/
Sending on LPF/wmaster0/
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wmaster0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
absols-sabayon-desktop absol # dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.5-Gentoo-r1
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/wlan0/00:c0:a8:f8:bc:0a
Sending on LPF/wlan0/00:c0:a8:f8:bc:0a
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
absols-sabayon-desktop absol # man dhclient
Formatting page, please wait...
absols-sabayon-desktop absol # iwconfig
lo no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:"colon_network"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
(btw, my wireless network is unprotected, because I live in the country and I only have one neighbor, and I doubt he knows that the internet exists. So wep/wpa would just be a needless hassle for me.)
So, unless, I did something wrong, it won't work by itself. Therefore, I tried the driver route.
Here's the driver's readme:
- Code: Select all
RTL8185 Linux Driver v1010.0531.2006 for linux kernel 2.6
- Support Client mode for either infrastructure or adhoc mode
- Support WEP and WPAPSK connection
===============================================================================================
< Component >
The driver is composed of several parts:
(1)source code
r818x.tar.gz
stack.tar.gz
(2)Script ot build the modules
makedrv
(3)Script to load/unload modules
wlan0up
wlan0down
(4)Script and configuration for DHCP
wlan0dhcp
ifcfg-wlan0
(5)Supplicant source code
wpa_supplicant-0.3.8.tar.gz
(6)Example of supplicant configuration file
wpa1.conf
< Installation >
Running the scripts can finish all operations of building up modules from source code and start the nic:
(1)Build up the driver from the source code
./makedrv
(2)Load the driver module to kernel and start up nic
./wlan0up
(if "insmod: error inserting 'r8180.ko': -File exists." met,
./wlan0rmv
./wlan0down
./wlan0up
should be OK.
)
(3)Refer to < Set wireless lan MIBs > to set Wireless LAN specific parameters.
< Set wireless lan MIBs >
This driver uses Wireless Extension as an interface allowing you to set
Wireless LAN specific parameters.
Current driver supports "iwlist" to show the device status of nic
iwlist wlan0 [parameters]
where
parameter explaination [parameters]
----------------------- -------------
Show available chan and freq freq / channel
Show and Scan BSS and IBSS scan[ning]
Show supported bit-rate rate / bit[rate]
Show Power Management mode power
For example:
iwlist wlan0 channel
iwlist wlan0 scan
iwlist wlan0 rate
iwlist wlan0 power
Driver also supports "iwconfig", manipulate driver private ioctls, to set MIBs.
iwconfig wlan0 [parameters] [val]
where
parameter explaination [parameters] [val] constraints
----------------------- ------------- ------------------
Connect to AP by address ap [essid]
Set the essid, join (I)BSS essid [mac_addr]
Set operation mode mode {Managed|Ad-hoc}
Set keys and security mode key / enc[ryption] {N|open|restricted|off}
For example:
iwconfig wlan0 ap XX:XX:XX:XX:XX:XX
iwconfig wlan0 essid "ap_name"
iwconfig wlan0 mode Ad-hoc
iwconfig wlan0 mode essid "name" mode Ad-hoc
iwconfig wlan0 key 0123456789 [2] open
iwconfig wlan0 key off
iwconfig wlan0 key restricted [3] 0123456789
< Getting IP address >
After start up the nic, the network needs to obtain an IP address before transmit/receive data.
This can be done by setting the static IP via "ifconfig wlan0 IP_ADDRESS" command, or using DHCP.
If using DHCP, setting steps is as below:
(1)connect to an AP via "iwconfig" settings
iwconfig wlan0 essid [name] or
iwconfig wlan0 ap XX:XX:XX:XX:XX:XX
(2)run the script which run the dhclient
./wlan0dhcp
or
dhcpcd wlan0
(Some network admins require that you use the
hostname and domainname provided by the DHCP server.
In that case, use
dhcpcd -HD wlan0)
< WPAPSK >
WPA_SUPPLICANT help the network to communicate under the protection of WPAPSK mechanism
(1)Unpack source code of WPA supplicant:
tar -zxvf wpa_supplicant-0.4.9.tar.gz
cd wpa_supplicant-0.4.9
(2)Create .config file:
cp defconfig .config
(3)Edit .config file, uncomment the following line:
#CONFIG_DRIVER_IPW=y.
(4)Build WPA supplicant:
make
If make error for lack of <include/md5.h>, install the openssl lib:
1. Install the openssl lib from corresponding installation disc:
Fedora Core 2/3/4/5(openssl-0.9.71x-xx), Mandrake10.2/Mandriva10.2(openssl-0.9.7x-xmdk),
Debian 3.1(libssl-dev), Suse 9.3/10.0/10.1(openssl_devl), Gentoo(dev-libs/openssl), etc.
2. Download the openssl open source package from http://www.openssl.org, build and install it.
(5)Edit wpa_supplicant.conf to set up SSID and its passphrase.
For example, the following setting in "wpa1.conf" means SSID to join is "BufAG54_Ch6"
and its passphrase is "87654321".
network={
ssid="BufAG54_Ch6"
proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk="87654321"
priority=2
}
(6)Execute WPA supplicant (Assume 8185 and related modules had been loaded):
./wpa_supplicant -D ipw -c wpa1.conf -i wlan0 &
I tried the first driver on that page, and I couldn't get it to compile:
- Code: Select all
absols-sabayon-desktop rtl8185_linux_26.1010.0531.2006 # ./makedrv
ieee80211/
ieee80211/ieee80211_tx.c
ieee80211/Modules.symvers
ieee80211/ieee80211_softmac_wx.c
ieee80211/LICENSE
ieee80211/ieee80211_rx.c
ieee80211/ieee80211_crypt_tkip.c
ieee80211/ieee80211_crypt.h
ieee80211/ieee80211_crypt_ccmp.c
ieee80211/ieee80211_module.c
ieee80211/Makefile
ieee80211/.tmp_versions/
ieee80211/.tmp_versions/ieee80211_crypt-rtl.mod
ieee80211/.tmp_versions/ieee80211_crypt_wep-rtl.mod
ieee80211/.tmp_versions/ieee80211_crypt_tkip-rtl.mod
ieee80211/.tmp_versions/ieee80211_crypt_ccmp-rtl.mod
ieee80211/.tmp_versions/ieee80211-rtl.mod
ieee80211/ieee80211.h
ieee80211/ieee80211_softmac.c
ieee80211/README
ieee80211/ieee80211_wx.c
ieee80211/ieee80211_crypt_wep.c
ieee80211/ieee80211_crypt.c
rtl818x-0.1/
rtl818x-0.1/r8180_wx.h
rtl818x-0.1/r8180_wx.c
rtl818x-0.1/r8180_rtl8225.h
rtl818x-0.1/r8180_rtl8255.h
rtl818x-0.1/AUTHORS
rtl818x-0.1/r8180_max2820.c
rtl818x-0.1/r8180.h
rtl818x-0.1/r8180_max2820.h
rtl818x-0.1/tags
rtl818x-0.1/r8180_sa2400.h
rtl818x-0.1/r8180_93cx6.c
rtl818x-0.1/ieee80211.h
rtl818x-0.1/r8180_gct.c
rtl818x-0.1/r8180_gct.h
rtl818x-0.1/.r8180_core.o.d
rtl818x-0.1/r8180_rtl8225.c.old
rtl818x-0.1/Modules.symvers
rtl818x-0.1/CHANGES
rtl818x-0.1/LICENSE
rtl818x-0.1/r8180_93cx6.h
rtl818x-0.1/README.master
rtl818x-0.1/r8180_hw.h
rtl818x-0.1/README
rtl818x-0.1/r8180_pm.c
rtl818x-0.1/r8180_sa2400.c
rtl818x-0.1/COPYING
rtl818x-0.1/README.adhoc
rtl818x-0.1/r8180_rtl8225.c
rtl818x-0.1/.tmp_versions/
rtl818x-0.1/.tmp_versions/r8180.mod
rtl818x-0.1/INSTALL
rtl818x-0.1/r8180_rtl8255.c
rtl818x-0.1/r8180_core.c
rtl818x-0.1/r8180_pm.h
rtl818x-0.1/Makefile
rtl818x-0.1/ieee80211_crypt.h
rm -f *.mod.c *.mod *.o .*.cmd *.ko
rm -rf /home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/tmp
make -C /lib/modules/2.6.22-sabayon/build M=/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211 CC=gcc modules
make[1]: Entering directory `/usr/src/linux-2.6.22-sabayon'
CC [M] /home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.o
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_softmac_scan_wq’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:391: warning: ISO C90 forbids mixed declarations and code
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:412: warning: passing argument 2 of ‘queue_delayed_work’ from incompatible pointer type
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_softmac_stop_scan’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:486: warning: passing argument 1 of ‘cancel_delayed_work’ from incompatible pointer type
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_associate_abort’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:885: warning: passing argument 2 of ‘queue_delayed_work’ from incompatible pointer type
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:1359:4: warning: #warning CHECK_LOCK_HERE
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:1399:2: warning: #warning CHECK_LOCK_HERE
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_rx_frame_softmac’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:1470: warning: ISO C90 forbids mixed declarations and code
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_stop_protocol’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2059: warning: passing argument 1 of ‘cancel_delayed_work’ from incompatible pointer type
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2167:78: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_softmac_init’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2167: error: ‘INIT_WORK’ undeclared (first use in this function)
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2167: error: (Each undeclared identifier is reported only once
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2167: error: for each function it appears in.)
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2168:88: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2169:94: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2170:96: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2171:82: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2172:82: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_softmac_free’:
/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.c:2191: warning: passing argument 1 of ‘cancel_delayed_work’ from incompatible pointer type
make[2]: *** [/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211/ieee80211_softmac.o] Error 1
make[1]: *** [_module_/home/absol/rtl8185_linux_26.1010.0531.2006/ieee80211] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-sabayon'
make: *** [modules] Error 2
rm -f *.mod.c *.mod *.o .*.cmd *.ko
rm -rf /home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/tmp
make -C /lib/modules/2.6.22-sabayon/build M=/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1 CC=gcc modules
make[1]: Entering directory `/usr/src/linux-2.6.22-sabayon'
CC [M] /home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.o
In file included from /home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:61:
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180.h:29:26: error: linux/config.h: No such file or directory
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c: In function ‘rtl8180_rx’:
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:2080: warning: implicit declaration of function ‘rdtsc’
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:2953:67: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c: In function ‘rtl8180_init’:
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:2953: error: ‘INIT_WORK’ undeclared (first use in this function)
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:2953: error: (Each undeclared identifier is reported only once
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:2953: error: for each function it appears in.)
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:3276: warning: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interrupt.h:66)
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:3276: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c: In function ‘rtl8180_pci_probe’:
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:4031: error: ‘struct net_device’ has no member named ‘get_wireless_stats’
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c: In function ‘rtl8180_pci_module_init’:
/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.c:4156: warning: implicit declaration of function ‘pci_module_init’
make[2]: *** [/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1/r8180_core.o] Error 1
make[1]: *** [_module_/home/absol/rtl8185_linux_26.1010.0531.2006/rtl818x-0.1] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.22-sabayon'
make: *** [modules] Error 2
If I'm doing something wrong, I'm sorry, I was lucky enough that my old desktop and my laptop both used out-of-the-box supported wireless cards. Now, I've gotta learn how to get one workin the hard way. I've read a lot of documentation, but sometimes I need some help putting it all together.
Thanks again for helping me, I don't know what I'd do without people like you.
Somebody once said: "If you've got it you've got it, if you don't you don't." That statement was terribly flawed.