Wireless network configuration (ไทย)

From ArchWiki
Revision as of 04:20, 23 November 2006 by Pkc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Wireless network configuration (ไทย)#)

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Wireless network configuration (ไทย)#)

ขั้นตอนแรก

  1. ตรวจสอบว่าอุปกรณ์ของคุณสามารถใช้งานกับ Linux ได้หรือไม่ โดยคุณสามารถดูชื่อของอุปกรณ์ของคุณโดยใช้คำสั่ง lshwd
    • wlan-ng สนับสนุนการ์ดมากพอสมควร โปรดตรวจสอบที่นี่ก่อน
    • madwifi สำหรั Atheros chipset (AR5210, AR5211, AR5212 and AR5213)
    • rt2x00 สำหรัล Ralink rt2400, rt2500, และ rt2570
    • ipw2100 สำหรับ Intel Pro/Wireless 2100 Mini PCI
    • ipw2200 สำหรับ Intel Pro/Wireless 2200 Mini PCI
    • ipw3945 สำหรับ Intel Pro/Wireless 3945 AB/G Mini PCI-E
    • orinoco สำหรับการ์ดที่ใช้ Prism 2 บางตัว
    • prism54 สำหรับ Prism 54
    • โปรดดู Linux Wireless Support สำหรับคำถามอื่นๆ และ hardware compatibility list (HCL) ซึ่งมีรายชื่อของอุปกรณ์ที่ทำงานกับ Linux ได้
  2. ถ้าอุปกรณ์ของคุณทำงานได้กับ Windows เท่านั้น
  3. แต่ถ้าฮาร์ดแวร์ของคุณไม่อยู่ในรายชื่อใดๆ เลย
    • เราว่าคุณโดนหลอกขายของมาแน่ๆ
    • ทดลองค้นหาเว็บไซท์ โดยใส่เลขรุ่นของอุปกรณ์ของคุณ พร้อมกับคำว่า Linux หรือคุณสามารถถามคำถามได้ที่กระดานข่าว the forums


การติดตั้ง

คุณต้องติดตั้ง wireless-tools ก่อน

pacman -S wireless_tools

คุณจะไม่สามารถใช้งาน Wireless Hardware ได้ถ้าไม่มีโปรแกรมนี้


Drivers

Here are the details of how to get the drivers for your card. You may find that there are several options open to you so remember you can check the HCL for help on selecting the best driver.

wlan-ng

pacman -S wlan-ng24
or
pacman -S wlan-ng26

rt2x00

See the rt2x00 wiki page

madwifi

pacman -S madwifi

The module is called ath_pci. You may need to use the countrycode option when loading the MadWifi driver in order to use channels and transmit power settings that are legal in your country/region. In the Netherlands, for example, you would load the module like this:

modprobe ath_pci countrycode=528

You can verify the settings with the iwlist command. See man iwlist and the CountryCode page on the MadWifi wiki. To have this setting automatically apply during boot, add the following to /etc/modprobe.conf:

options ath_pci countrycode=528

ipw2100 and ipw2200

Depending on which of the chips you have, use either:

pacman -S ipw2100-fw

or:

pacman -S ipw2200-fw

ipw3945

pacman -S ipw3945

this should install ipw3945-ucode, ipw3945, and ipw3945d (daemon)

to properly initialize the driver in startup...

nano /etc/rc.conf

in the modules=() array, add ipw3945 to the list

in the daemons=() array, add ipw3945d to the list

CTRL + X, Y to close and save

The ipw3945 module should load during "Loading Modules.." and "Starting IPW3945d" should appear during daemon initialization, and ethX should be present.

orinoco

This should be part of the kernel package and installed already

ndiswrapper

Ndiswrapper is not a real driver, but you can use it when there are no native Linux drivers for your Wireless-chips. So it is very usefull in some situations. To use it you need the *.inf file from your Windows driver. To install ndiswrapper use the steps below:

To install the ndiswrapper use pacman:

pacman -Sy ndiswrapper ndiswrapper-utils

Note: AchrCK and Beyond kernels need the packages ndiswrapper-archck and ndiswrapper-beyond instead of the ndiswrapper package!

Note: If you do not have internet access on the machine running arch, you can also download the packages to a disk from one of the mirrors, eg http://www2.cddc.vt.edu/linux/distributions/archlinux/extra/os/i686/ . You need the ndiswrapper (or ndiswrapper-archck or ndiswrapper-beyond as it says above) and ndiswrapper-utils packages. You may also have to download the latest kernel26 (or archck or beyond), as the version provided on the CD is not always the lastest one.

Once the installation has completed, follow the steps to configure ndiswrapper.

ndiswrapper -i filename.inf
ndiswrapper -l
ndiswrapper -m
depmod -a

now that's the ndiswrapper install almost finished, just got to update /etc/rc.conf to load the module at boot (below is a sample of my config, yours might look slightly different):

MODULES=(ndiswrapper snd-intel8x0 !usbserial)

the important part is making sure that ndiswrapper exists on this line. It would be best to test that ndiswrapper will load now, so:

modprobe ndiswrapper
iwconfig

and wlan0 should exist, check this page if you're having problems: Ndiswrapper installation wiki

prism54

Download the firmware driver for your appropriate card from this site. Rename the firmware file to 'isl3890'. If nonexistend create a directory /lib/firmware and place the file 'isl3890' in it. This should do the trick. (forum source)

ACX100/111

The ACX100/111 driver can be found at [1]. This can be used for cards which are based on the Texas Instruments ACX100/111 chipset.

Contrary to what people think, this is relatively easy to setup. There is a huge guide written by Craig here. However, the README which comes with the driver is actually easier to follow.

  1. Download the latest version of the driver.
  2. Extract the archive in a directory of your choice. Beware, the archive does not have a directory inside, so if you don't extract within a directory, a lot of files will spill out everywhere.
  3. Change to the directory containing the extracted files.
  4. Execute
    make -C /lib/modules/`uname -r`/build M=`pwd`
  5. Change to root user.
  6. Execute
    make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
  7. Execute
    depmod -ae
    so the kernel detects the new module.
  8. Insert your Driver CD which came with the card into the CD/DVD drive on your computer.
  9. Mount the drive with
    mount <device>
  10. Copy the firmware from the CD to /lib/firmware.
  11. Rename the firmware to 'tiacxNNNcMM' (NNN=100/111, MM=radio module ID (in uppercase hex)) for the PCI driver or tiacxNNNusbcMM for the USB driver.
  12. Load the acx module with
    modprobe acx
  13. Add the acx module to the MODULES array in /etc/rc.conf so it gets loaded on startup.
  14. Follow the instructions for connecting to your network with iwconfig.


Note: It is also possible to compile the driver inside the kernel tree. This is documented in the README file with the driver.

BCM43XX

Broadcom users that have 43xx series chipsets have a new alternative to ndiswrapper! Finally! In kernel version 2.6.17, the bcm43xx driver was introduced, and it's easy as can beasy to set up!

  1. Run
    iwconfig
    or
    hwd -s
    to determine that you have an appropriate card. My output of hwd -s looked like this:
    Network    : Broadcom Corp.|BCM94306 802.11g NIC module: unknown
  2. Run
    pacman -Sy bcm43xx-fwcutter
    to install the firmware cutter application.
  3. Download the windows driver file for your card to extract the firmware from.
    • I initially downloaded the driver from Dell's support site. When that didn't work I found a link on the Ubuntu Wiki and used that file instead: [2]. I just saved this file to my desktop, you won't need it after the next step.
  4. Run
    bcm43xx-fwcutter -w /lib/firmware /home/<user>/Desktop/wl_apsta.o
    You may have to create /lib/firmware first.
  5. Restart, and configure your device as normal. You may want to add bcm43xx into the modules section of your rc.conf file. Good luck!

Setup and Boot

Archlinux provides two methods for enabling wireless connections. The first method is based on the existing network script and is to be used for non-roaming wireless access. If you're only on 1 wireless network, this is the best setup to use. However, if you continually roam from network to network, the Network Profiles setup would be best, though slightly more complicated.

Using the Archlinux Wireless Network settings

  • Typical Archlinux Wireless configuration is rather straight forward. The network itself is configured in the exact same way a non-wireless network is in /etc/rc.conf. For example:
# /etc/rc.conf
wlan0="dhcp"
INTERFACES=(lo eth0 wlan0)
  • Beyond this, the networking scripts need some way to determine that wlan0 is a wireless interface (as not all wireless interfaces are wlan*). This is done in the /etc/conf.d/wireless file. The setup here is very simple. For each wireless interface, you simply declare a setting called wlan_<interface name>. If your wireless interface is "wlan0", it uses wlan_wlan0. If your wireless interface is "eth1", wlan_eth1 is what you need. The value for this setting is simply the parameters to iwconfig (see man iwconfig for details) including the interface name.
  • A simply, non encrypted setup for the above would look like:
# /etc/conf.d/wireless
wlan_wlan0="wlan0 essid MyEssid"
  • phrakture's trick
    • My personal trick isn't much of a trick at all, it just simplifies alot of the process. While /etc/conf.d/wireless is sourced (included) in the network script, it is not a requirement for having a wireless interface. Therefore, the actual settings for the wireless interface can exist in anything sourced by the network script. For that reason, I put all my settings in /etc/rc.conf:
# /etc/rc.conf
eth0="dhcp"
wlan0="dhcp"
wlan_wlan0="wlan0 essid MyEssid"
#wlan_wlan0="wlan0 essid MyEssid key 12345678"
#wlan_wlan0="wlan0 essid MyEssid key s:wirelesspassword"
WLAN_INTERFACES=(wlan0)
INTERFACES=(lo eth0 wlan0)

If your wireless card is eth0 so you change wlan_wlan0 in wlan_eth0="eth0 essid ...."

Using the Archlinux Roaming Network Profiles

Quick Setup

  1. Create new profile
    1. Create a new network profile in /etc/network-profiles/ based on the template file. Let's call it home. Remember the filename you chose! We'll use it to refer to our new profile later.
    2. Adjust the settings in the new profile to your needs.
  2. Remove outdated settings from rc.conf
    1. Remove all interfaces which should be managed by the Network Profiles in the future from INTERFACES.
    2. Remove any relevant routes from ROUTES.
    3. Leave the "lo" interface in place.
  3. Add Network Profile settings to rc.conf
    1. Add the name of your new network profile to NET_PROFILES=()
      NET_PROFILES=(home)

So much for the quick setup... You can also set NET_PROFILES to "menu" and it will present a dialog/ncurses menu (which requires the dialog package installed) at bootup where you can pick the profile you want.

Alternatively, you can pass a NET= value on the kernel boot line, telling netcfg which profile you wish to start with.

vmlinuz root=/dev/hda3 vga=773 ro NET=home

Picked from Judd's explanation.

Simple Wireless Autodetection iphitus created an autodetection patch for the official initscripts which has now been imported as standard. Please see here for an explanation of how it works.

WPA support phydeaux created a great patch for WPA support which has been adopted straight into the main tree and will be in the next release (after 0.7.1). For informtion about how to use WPA with the Network Profiles see also Ndiswrapper and wpa supplicant.

Netcfg GUI A simple GUI script to switch networkprofile from Gnome (or another windowmanager) can be found in AUR. (Screenshots)

Wifi-radar

Wifi-radar This is a nifty little GUI program that lets you switch wireless networks with ease. Simply do the following:

  1. # pacman -S wifi-radar
  2. # visudo
   here, add the following line: 
       yourusername     ALL=(ALL) NOPASSWD: /usr/sbin/wifi-radar
   then press ESC, then colon (:), then x, then ENTER to save and exit.
  1. now, just add wifi-radar to your daemons list in /etc/rc.conf, and run wifi-radar from your internet menu and you're all set :) If you want to change your network profile after boot, you can run 'netcfg' as root.
  2. oh, and you might need to edit /etc/conf.d/wifi-radar to set the particular network interface that you want to use

NetworkManager

NetworkManager A more advanced network management system for Linux. This is included in various Linux distributions and now can be used in Arch Linux. It is very painless for roaming users, and includes an easy-to-use GUI program for selcting your desired network. One caveat however is that you are prompted for your keyring password every time you log into gnome and the program starts. This most likely won't be fixed until later versions, and can be quite annoying. More information on NetworkManager can be found at: Networkmanager.

Using phrakture's old scripts (very outdated)

  • In order to use these scripts, place them where indicated. The main script is in /etc/rc.d and the profiles are in /etc/conf.d/wireless-profiles. Making a new profile involves copying the sample and renaming it. The script can be used in two ways. It can be added to the DAEMONS array, with an added WIRELESS_PROFILES collection in rc.conf that lists the profiles to start on boot. In addition, the script can be called manually: /etc/rc.d/wireless start/stop/restart will use the listed profiles in rc.conf, and /etc/rc.d/wireless profile sample up/down will use a named profile and bring it up or down.
  • Wireless Bootup Script - /etc/rc.d/wireless
  • Sample Wireless Profile - /etc/conf.d/wireless-profiles/sample/*

Misc Links