Changeset 1026

Show
Ignore:
Timestamp:
04/02/06 10:13:30 (3 years ago)
Author:
archaic
Message:

Updated wireless.txt.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wireless.txt

    r1023 r1026  
    1 AUTHOR:                                Dr. Edgar Alwers <edgaralwers@gmx.de> 
    2  
    3 DATE:                                  2006-01-26 
    4  
    5 LICENSE:                               GNU Free Documentation License Version 1.2 
    6  
    7 SYNOPSIS:                              Wireless Communication from the sources 
    8  
    9 PREREQUISITES:                  
    10  
    11 BLFS 6.x with  kernel 2.6.15...Older kernels shoud work accordingly, with the correspondent firmware. 
     1AUTHOR:Dr. Edgar Alwers <edgaralwers@gmx.de> 
     2 
     3DATE:2006-03-26 
     4 
     5LICENSE:GNU Free Documentation License Version 1.2 
     6 
     7SYNOPSIS:Wireless Communication from the sources 
     8 
     9PREREQUISITES: 
     10BLFS 6.x with  kernel 2.6.15. Older kernels shoud work accordingly, with the 
     11correspondent firmware. 
    1212 
    1313DESCRIPTION: 
    14  
    15 This is a Hint ( draft )  explaining how to prepare a PC for wireless communication with the Internet and how to put it into operation. I am not an expert on this field, but I solved this problem with the help of hints and advices given by many persons, and working through lots of papers, most of them not beeing actual anymore at this time.  
    16 The object I had to deal with is an 'Acer' TravelMate 291LCi with Intel Centrino Mobile Technology, equiped with an Intel PRO/Wireless 2200BG(IEEE 802.11b/g) chip. The Laptop communicates with an 54 Mbps Wireless Netgear ADSL Firewall Router DG834G as access point However, there are good chances, that this hint may also be applied to other PC's with other drivers.If you cannot obtain a native Linux driver for your wireless NIC, you may want to try 'ndiswrapper', a package that will allow to load a Windows driver under Linux. 
    17  
    18 The kernel compiled is version 2.6.15. This kernel includes already the driver ipw2200-1.0.8 and the iee802 subsystem and you may ask, why to build this two items additionally. However, I experienced serious difficulties not compiling them and decided to become independent from the kernel. 
    19  
    20 This is a draftt, comments and suggestions will be highly welcomed. 
     14This is a Hint explaining how to prepare a PC for wireless communication with  
     15the Internet and how to put it into operation. I solved this problem with the  
     16help of hints and advices given by many persons, and working through lots of  
     17papers, many of them not beeing actual anymore at this time. 
     18The object I had to deal with is an 'Acer' TravelMate 291LCi with Intel  
     19Centrino Mobile Technology, equiped with an Intel PRO/Wireless 2200BG 
     20(IEEE 802.11b/g) chip. The Laptop communicates with an 54 Mbps Wireless  
     21Netgear ADSL Firewall Router DG834G as access point However, there are good  
     22chances, that this hint may also be applied to other PC's with other drivers.  
     23If you cannot obtain a native Linux driver for your wireless NIC, you may  
     24want to try 'ndiswrapper', a package that will allow to load a Windows driver  
     25under Linux. 
     26The kernel compiled is version 2.6.15. This kernel includes already the driver  
     27ipw2200-1.0.8 and the iee802 subsystem and you may ask, why to build this two  
     28items additionally. I experienced serious difficulties not compiling them and  
     29decided to become independent from the kernel. 
     30This second issue of the hint deals with additional instructions, how to  
     31operate a PC in a wireless field under a DHCP Server ( Dynamic Host Configura- 
     32tion Protocol ) providing  IP's to the clients. This is the probably situation  
     33which will be found in most public locations, like airports, hotels etc.  
    2134 
    2235HINT: 
    23  
    24 KERNEL 
    25  
     36KERNEL: 
    2637Download: 
    2738        Kernel v. 2.6.15 
    2839        http://www.kernel.org 
    29  
    3040Configuring the kernel: 
    31  
    3241        enable Networking-> 
    3342                        Networking support-> 
     
    4150                        Network device support-> 
    4251                                Wireless LAN (non-harmradio)-> 
    43                                         Wireless LAN drivers & Wireless Extensions 
     52                                        Wireless LAN drivers & Wireless  
     53                                        Extensions 
    4454        cryptographic API-> 
    4555                        ARC4 cipher algorithm (Modul) 
    46  
    47 compile and install the kernel according to the instructions of the book 'Linux From Scratch' 
    48  
    49 HOTPLUG-2004_09_23 
    50  
     56compile and install the kernel according to the instructions of the book  
     57'Linux From Scratch' 
     58 
     59HOTPLUG-2004_09_23: 
    5160Scripts that react upon hotplug events generated by the kernel 
    5261Download: 
    5362        hotplug-2004_09_23.tar.bz2 
    5463        Http://www.kernel.org/pub/linux/utils/kernel/hotplug 
    55  
    56 Install hotplug according to the instructions given e.g. In the LFS-Book SVN-20060125, Chapter 6.49 
    57  
    58 UDEV-071.TAR.BZ2 
    59  
     64Install hotplug according to the instructions given e.g. In the LFS-Book  
     65SVN-20060125, Chapter 6.49 
     66 
     67UDEV-071.TAR.BZ2: 
    6068Programs for dynamic creation of device nodes 
    61  
    6269Download 
    6370        udev-071.tar.bz2 
    6471        ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug 
    65  
    6672make DESTDIR=/ EXTRAS="extras=firmware extras/run_directory"  
    6773make DESTDIR=/ EXTRAS="extras=firmware extras/run_directory" install   
    68 install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev/071/index.html 
     74install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev/ 
     75071/index.html 
    6976/sbin/udevstart 
    70  
    71 Check that 'firmware_helper', 'udev_run_devd' and 'udev_run_hotplugd' are installed in the /sbin directory. 
    72  
     77Check that 'firmware_helper', 'udev_run_devd' and 'udev_run_hotplugd' are  
     78installed in the /sbin directory. 
    7379Download the new udev-rules developed by Jim Gifford's cross lfs team 
    7480        udev-cross-lfs.tar.bz2  
    7581        http://ftp.jg555.com/udev 
    76 Untar the file, change to the 'udev-cross-lfs' directory and enter 'make install'. This  installs the new udev-rules in /etc/udev/rules.d 
    77  
    78 IEE80211-1.1.6 
    79  
     82Untar the file, change to the 'udev-cross-lfs' directory and enter  
     83'make install'. This  installs the new udev-rules in /etc/udev/rules.d 
     84 
     85IEE80211-1.1.12: 
    8086Kernel subsystem dealing with communications security 
    81  
    8287Download 
    83         ieee80211-1.1.6.tgz 
     88        ieee80211-1.1.12.tgz 
    8489        http://ieee80211.sourceforge.net 
    85 Untar the file, change to the ieee80211-1.1.6 directory and enter make, make install.  
     90Untar the file, change to the ieee80211-1.1.12 directory and enter make,  
     91make install.  
    8692Includes headerfiles in /lib/modules/2.6.15/net 
    8793 
    88 INTEL'S FIRMWARE 
    89  
     94INTEL'S FIRMWARE: 
    9095Download the Firmware 
    9196        ipw2200-fw-2.4 
    9297        http://ipw2200.sourceforge.net 
    93 Untar the file in the directory /lib/firmware. Seven files ipw-2.4-xxx.fw will be found there after untaring 
    94  
    95 INTEL PRO/WIRELESS DRIVER  
    96  
    97 Driver that works on the Intel hardware adapter PRO/Wireless 2200BG Network Connection 
     98Untar the file in the directory /lib/firmware. Seven files ipw-2.4-xxx.fw  
     99will be found there after untaring 
     100 
     101INTEL PRO/WIRELESS DRIVER : 
     102Driver that works on the Intel hardware adapter PRO/Wireless 2200BG Network  
     103Connection 
    98104Download the driver 
    99         ipw2200-1.0.8.tgz      
     105        ipw2200-1.0.10.tgz     
    100106        http://ipw2200.sourceforge.net 
    101 Untar the file, change to the ipw2200-1.0.8 directory and enter make, make install. 
    102  
    103 The driver requires the firmware image as well as the ieee80211 module installed.sysfs should be already mounted. 
    104  
     107Untar the file, change to the ipw2200-1.0.10 directory and enter make, make  
     108install. ( as su ) 
     109I experienced serious problems compiling the new driver versions 1.0.12 and  
     1101.0.13, so I would advice to stick to the above one for the time beeing. 
     111The driver requires the firmware image as well as the ieee80211 module  
     112installed. "sysfs" should be already mounted. 
    105113See also the INSTALL file for more instructions 
    106114 
    107 THE WIRELESS TOOLS  
    108  
     115THE WIRELESS TOOLS: 
    109116Set of tools that allows to manipulate Wireless Extensions 
    110117Download the wireless tools: 
    111118        wireless_tools.27.tar.gz 
    112119        http://pcmcia-cs.sourceforge.net/ftp/contrib/ 
    113 Untar the file, change to the wireless_tools.27 directory and enter make, make install 
    114 Seven tools will be installed in /usr/local/sbin: iwconfig, iwlist, ifrename,iwevent,iwgetid, iwpriv and iwspy 
     120Untar the file, change to the wireless_tools.27 directory and enter make,  
     121make install 
     122Seven tools will be installed in /usr/local/sbin: iwconfig, iwlist, ifrename, 
     123iwevent,iwgetid, iwpriv and iwspy 
    115124Make a link from KDE_Prefix/bin to /usr/local/sbin:  
    116125        ln -s /usr/local/sbin/iwconfig KDE_Prefix/bin/iwconfig 
    117126 
    118 BOOTING THE PC 
    119  
    120 If everything went right, the PC boots and loads firmware and wireless-driver. The corresponding booting  messages will look like 
     127THE DHCPCD CLIENT SOFTWARE: 
     128Software to connect a computer to a network which uses DHCP to assign network  
     129addresses.There are two alternatives: dhcp, which includes also the server  
     130software, and dhcpcd, an implementation of the DHCP client specified in  
     131RFC2131. I prefered  dhcpcd, wich seems to be more simple. 
     132Download  
     133        dhcpcd-2.0.1.tar.bz2 
     134        http://developer.berlios.de/projects/dhcpcd/ 
     135Untar, change to the dhcpcd-2.0.1 directory and enter 
     136        ./configure --prefix="" --sysconfdir=/var/lib 
     137        and, as superuser, make. 
     138The reason for the prefix "" in the configuration command is explained in the  
     139blfs-book, version 6.1, chapter 14. Install the network service script  
     140/etc/sysconfig/network-devices/services/dhcpcd as indicated in the same place 
     141         
     142BOOTING THE PC: 
     143If everything went right, the PC boots and loads firmware and wireless-driver.  
     144The corresponding booting  messages will look like 
    121145        ........ 
    122146        ieee80211_crypt: registered algorithm 'NULL' 
    123147        ieee80211: 802.11 data/management/control stack, 1.1.6 
    124         ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com> 
     148        ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux. 
     149                   intel.com> 
    125150        ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.8 
    126151        ipw2200: Copyright(c) 2003-2005 Intel Corporation 
    127152        ACPI: PCI Interrupt Link [LNKG] enabled at IRQ 10 
    128         ACPI: PCI Interrupt 0000:01:02.0[A] -> Link [LNKG] -> GSI 10 (level, low) -> IRQ 10 
     153        ACPI: PCI Interrupt 0000:01:02.0[A] -> Link [LNKG] -> GSI 10  
     154                 (level, low) -> IRQ 10 
    129155        ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection 
    130156        ......... 
    131157 
    132 MONITORING PROGRAMS 
    133  
    134 There are many prrograms that allows the monitoring of wireless communications. I installed two of them: 'kismet' and 'KWiFiManager'. 
    135  
    136 'kismet' is a small wireless network detector, sniffer and intrusion detection system.  
    137 Download 'kismet-2005-08-R1.tar.gz' from http://www.kismetwireless.net/download.shtml 
    138 untar the file, enter make and make suidinstall. Run kismet the first time as root. Kismet runs on a  shell console. 
    139  
    140 'kwifimanager' is a KDE frontend program used to configure and monitor wireless LAN cards. 'kwifimanager' is part of 'kdenetwork'. Download kdenetwork_3.4.1.tar.bz2 and follow the instructions given e.g. In BLFS - Version 6.1, chapter 29. Wireless tools should be installed before building this packet. 
    141  
    142 CONFIGURING THE ROUTER -  SAFETY CONSIDERATIONS 
    143  
    144 during the installation of the wireless system, the safety options of the router are deactivated. Now, it is time to activate them. Access the settings menu of the router through a browser, entering something like http://192.168.0.1. I activated WEP ( Wired Equivalent Privacy ) with  64 bit encryption. You may consider a 125 bit encryption 
    145  
    146 Enter a password in the encryption field, and the router will generate four keys, each one consisting of 10 characters, combining numbers 1 to 9 and letters A-F, like:EC670531BE. The first of this four keys is the one beeing normally used. 
    147  
    148 Furthermore, the MAC-addresses ( Media Access Control ) of the laptop's and PC's wich are allowed to access the router shoud be entered in the access list 'trusted wireless stations'. You may get the MAC addresses  from the list of connected devices in the settings menu of the router or with the help of a network exploration tool like 'nmap' ( Network Mapper ), in  the last case e.g. entering 'nmap -sP 192.168.0.1/22' 
    149  
    150 CONFIGURING THE PC FOR WIRELESS COMMUNICATIONS 
    151  
    152 immediately after the safety options of the router are activated, the PC will not more be able to see the access point: the PC also needs to be configured.  
    153  
    154 Entering the command 'iwconfig eth1 key xxxxxxxxxx'  enables the communication, but not permanently. For a permanent configuration, write a shell-script e.g.'connect' in /etc/rc.d/init.d: 
     158MONITORING PROGRAMS: 
     159There are many prrograms that allows the monitoring of wireless communi- 
     160cations. I installed two of them: 'kismet' and 'KWiFiManager'. 
     161'kismet' is a small wireless network detector, sniffer and intrusion  
     162detection system.  
     163Download 'kismet-2005-08-R1.tar.gz' from http://www.kismetwireless.net/ 
     164download.shtml 
     165untar the file, enter make and make suidinstall. Run kismet the first time  
     166as root. Kismet runs on a  shell console. 
     167 
     168'kwifimanager' is a KDE frontend program used to configure and monitor  
     169wireless LAN cards. 'kwifimanager' is part of 'kdenetwork'. Download  
     170kdenetwork_3.4.1.tar.bz2 and follow the instructions given e.g. in  
     171BLFS - Version 6.1, chapter 29. Wireless tools should be installed before  
     172building this packet. 
     173 
     174CONFIGURING THE ROUTER -  SAFETY CONSIDERATIONS: 
     175during the installation of the wireless system, the safety options of the  
     176router are deactivated. Now, it is time to activate them. Access the settings  
     177menu of the router through a browser, entering something like  
     178http://192.168.0.1. I activated WEP ( Wired Equivalent Privacy ) with  64 bit  
     179encryption. You may consider a 125 bit encryption 
     180Enter a password in the encryption field, and the router will generate four  
     181keys, each one consisting of 10 characters, combining numbers 1 to 9 and  
     182letters A-F, like:EC670531BE. The first of this four keys is the one beeing  
     183normally used. 
     184Furthermore, the MAC-addresses ( Media Access Control ) of the laptop's and  
     185PC's wich are allowed to access the router shoud be entered in the access  
     186list 'trusted wireless stations'. You may get the MAC addresses  from the list  
     187of connected devices in the settings menu of the router or with the help of  
     188a network exploration tool like 'nmap' ( Network Mapper ), in  the last case  
     189e.g. entering 'nmap -sP 192.168.0.1/22' 
     190However, even a 125 bit encryption does not give a real security today.  
     191According to a note contributed by Bryan Kadzban,  real security can only be  
     192obtained with WPA or WPA2 encryption. You may want to consider this, if you  
     193have confidential data to transmit. 
     194 
     195CONFIGURING THE PC FOR WIRELESS COMMUNICATIONS: 
     196immediately after the safety options of the router are activated, the PC will  
     197not more be able to see the access point: the PC also needs to be configured.  
     198Entering the command 'iwconfig eth1 key xxxxxxxxxx'  enables the communi- 
     199cation, but not permanently. For a permanent configuration, write a  
     200shell-script e.g.'connect' in /etc/rc.d/init.d: 
    155201        $!/bin/sh 
    156202        /usr/local/sbin/iwconfig eth1 key xxxxxxxxxx 
    157 and make this script executable: chmod ug+x connect. Make a symbolic link in /etc/rc.d/rc3.d that points to this script: ln -s /etc/rc.d/init.d/connect S19connect. The link should start with something like S19, as the script should be run before the S20network script is executed.  
    158  
    159 Furthermore, crreate a directory 'ifconfig.eth1' in '/etc/sysconfig/network-devices', cd to this directory and create a ipv4 file: 
     203and make this script executable: chmod ug+x connect. Make a symbolic link  
     204in /etc/rc.d/rc3.d that points to this script:  
     205ln -s /etc/rc.d/init.d/connect S19connect. The link should start with  
     206something like S19, as the script should be run before the S20network script  
     207is executed. For an unencrypted system, likely to be found on public places,  
     208the command in the script should not contain a key: 
     209        /usr/local/sbin/iwconfig eth1 
     210Create a directory 'ifconfig.eth1' in '/etc/sysconfig/network-devices', and  
     211cd to this directory.  
     212For operation withouth DHCP create a ipv4 file: 
    160213        ONBOOT=yes 
    161214        SERVICE=ipv4-static 
    162         IP=192.168.1.3                 // the address of your box 
     215        IP=192.168.1.3          // the address of your box 
    163216        GATEWAY=192.168.1.9     // the address of your router 
    164217        PREFIX=24 
    165218        BROADCAST=192.168.1.255 
    166219        NETMASK=255.255.255.0 
    167 And, last, change GATEWAY_IF in /etc/sysconfig/network to eth1. 
    168  
    169 USING THE WIRELESS CONNECTION 
    170  
    171 After rebooting, lsmod shows 
    172         Module                  Size            Used by 
    173         ipw2200         176576  0 
    174         ieee80211                 42664 1  ipw2200  
    175         ieee80211_crypt     4804        1  ieee80211  
    176  
    177 The command 'iwconfig eth1' in a console delivers 
     220and change GATEWAY_IF in /etc/sysconfig/network to eth1. 
     221For operation with DHCP create instead ipv4 a file dhcpcd: 
     222        ONBOOT="no" 
     223        SERVICE="dhcpcd" 
     224        DHCP_START="eth1 -t 20" 
     225        DHCP_STOP="-k " 
     226        # Set PRINTIP="yes" to have the script print 
     227        # the DHCP assigned IP address 
     228        PRINTIP="yes" 
     229        # Set PRINTALL="yes" to print the DHCP assigned values for 
     230        # IP, SM, DG, and 1st NS. This requires PRINTIP="yes". 
     231        PRINTALL="no" 
     232 
     233USING THE WIRELESS CONNECTION : 
     234After booting, lsmod shows 
     235        Module                  Size                    Used by 
     236        ipw2200                 176576  0 
     237        ieee80211                 42664 1               ipw2200  
     238        ieee80211_crypt         4804    1               ieee80211  
     239 
     240The command 'iwconfig eth1' entered in a console delivers 
    178241        eth1      IEEE 802.11g  ESSID:"Mannheim"   
    179                 Mode:Managed  Frequency:2.462 GHz  Access Point: 00:0A:B5:CF:64:28    
    180                 Bit Rate=48 Mb/s   Tx-Power=20 dBm    
    181                 Retry limit:7   RTS thr:off   Fragment thr:off 
    182                 Encryption key:57E4-DB3A-B1   Security mode:open 
    183                 Power Management:off 
    184                 Link Quality=95/100  Signal level=-29 dBm  Noise level=-86 dBm 
    185                 Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 
    186                 Tx excessive retries:0  Invalid misc:0   Missed beacon:0 
    187 The connection to the access pont is therefore activ. 
    188  
    189 The internet browser should be configured with direct access to the internet. Opening the browser should immediately establish a connection. 
    190  
    191  
    192 AKNOWLEDGEMENTS 
    193  
    194 I have tryed to compile articles, informations, hints and answers to questions I put in the BLFS-mailing list to this hint. Many thanks to all those who contributed: Gabe Yoder, Andrew Benton, Alexander E. Patrakov, Jim Gifford, David Fix, Rainer Peter Feller, Chris Staub, Randy McMurchy, 
    195 Jeremy Monnet, Stefan Krah. And in advance thanks to those who, hopfully, will give a feedback to this paper  
    196  
    197 LINKS AND LITERATURE 
    198  
     242        Mode:Managed  Frequency:2.462 GHz  Access Point: 00:0A:B5:CF:64:28    
     243        Bit Rate=48 Mb/s   Tx-Power=20 dBm    
     244        Retry limit:7   RTS thr:off   Fragment thr:off 
     245        Encryption key:57E4-DB3A-B1   Security mode:open 
     246        Power Management:off 
     247        Link Quality=95/100  Signal level=-29 dBm  Noise level=-86 dBm 
     248        Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 
     249        Tx excessive retries:0  Invalid misc:0   Missed beacon:0 
     250As the ONBOOT parameter was set to 'yes', the connection to the access point  
     251is already activ. 
     252The internet browser should be configured with direct access to the internet.  
     253Opening the browser should establish immediately a connection. 
     254 
     255USING THE WIRELESS CONNECTION UNDER A DHCP SERVER: 
     256I experienced some problems starting the dhcpcd daemon during the boot  
     257process. So I decided to set the ONBOOT parameter in the file  
     258/etc/sysconfig/network-devices/ifconfig.eth1/dhcpcd to 'no', as indicated  
     259above, and to start as 'su' a little script 'eth1_connect' : 
     260        #!/bin/bash 
     261        /sbin/dhcpcd eth1 
     262        # end 
     263After starting the daemon dhcpcd, the connection to the access point is  
     264activ. 
     265 
     266AKNOWLEDGEMENTS: 
     267I have tryed to compile articles, informations, hints and answers to questions  
     268I put in the BLFS-mailing list to this hint. Many thanks to all those who  
     269contributed: Gabe Yoder, Andrew Benton, Alexander E. Patrakov, Jim Gifford,  
     270David Fix, Rainer Peter Feller, Chris Staub, Randy McMurchy, 
     271Jeremy Monnet, Stefan Krah, Bryan Kadzban. 
     272 
     273LINKS AND LITERATURE: 
    199274Intel PRO/Wireless driver 
    200275http://ipw2200.sourceforge.net                                           
     
    210285 
    211286The devices, the drivers... Jean Tourrilhes 
    212 http://www.hpl.hp.com/personal/jean_Tourrilhes/Linux/Linux.Wireless.drivers.802.1.11ag.html#CentrinoAG 
     287http://www.hpl.hp.com/personal/jean_Tourrilhes/Linux/Linux.Wireless.drivers. 
     288802.1.11ag.html#CentrinoAG 
    213289 
    214290Sane network interface management with Hotplug. Jean Tourrilhes 
     
    218294http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation 
    219295 
     296 
    220297CHANGELOG: 
     298[2006-01-26] 
     299        initial hint 
     300[2006-03-26] 
     301        Remarks concerning safety considerations 
     302        Additional notes concerning DHCP-Server operation 
     303        Chapter "The DHCPCD Client Software"  
     304        Configuring the PC for operation under DHCP  
     305        Subsystem IEE80211-1.1.6 changed to IEE80211-1.1.12 
     306        Intel PRO/WIRELESS driver ipw2200-1.0.8 changed to ipw2200-1.0.10 
     307        Using the wireless connection under a DHCP server 
     308