Wireless network configuration (ไทย)
- 1 ขั้นตอนแรก
- 2 การติดตั้ง
- 3 Setup and Boot
- 4 Misc Links
- ตรวจสอบว่าอุปกรณ์ของคุณสามารถใช้งานกับ 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 ได้
- ถ้าอุปกรณ์ของคุณทำงานได้กับ Windows เท่านั้น
- แต่ถ้าฮาร์ดแวร์ของคุณไม่อยู่ในรายชื่อใดๆ เลย
- ทดลองค้นหาเว็บไซท์ โดยใส่เลขรุ่นของอุปกรณ์ของคุณ พร้อมกับคำว่า Linux หรือคุณสามารถถามคำถามได้ที่กระดานข่าว the forums
คุณต้องติดตั้ง wireless-tools ก่อน
pacman -S wireless_tools
คุณจะไม่สามารถใช้งาน Wireless Hardware ได้ถ้าไม่มีโปรแกรมนี้
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.
pacman -S wlan-ng24or
pacman -S wlan-ng26
See the rt2x00 wiki page
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
pacman -S ipw2200-fw
pacman -S ipw3945
this should install ipw3945-ucode, ipw3945, and ipw3945d (daemon)
to properly initialize the driver in startup...
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.
This should be part of the kernel package and installed already
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
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)
The ACX100/111 driver can be found at . 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.
- Download the latest version of the driver.
- 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.
- Change to the directory containing the extracted files.
make -C /lib/modules/`uname -r`/build M=`pwd`
- Change to root user.
make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
depmod -aeso the kernel detects the new module.
- Insert your Driver CD which came with the card into the CD/DVD drive on your computer.
- Mount the drive with
- Copy the firmware from the CD to /lib/firmware.
- 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.
- Load the acx module with
- Add the acx module to the MODULES array in /etc/rc.conf so it gets loaded on startup.
- 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.
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!
hwd -sto determine that you have an appropriate card. My output of hwd -s looked like this:
Network : Broadcom Corp.|BCM94306 802.11g NIC module: unknown
pacman -Sy bcm43xx-fwcutterto install the firmware cutter application.
- 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: . I just saved this file to my desktop, you won't need it after the next step.
bcm43xx-fwcutter -w /lib/firmware /home/<user>/Desktop/wl_apsta.oYou may have to create /lib/firmware first.
- 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
- Create new profile
- 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.
- Adjust the settings in the new profile to your needs.
- Remove outdated settings from rc.conf
- Remove all interfaces which should be managed by the Network Profiles in the future from INTERFACES.
- Remove any relevant routes from ROUTES.
- Leave the "lo" interface in place.
- Add Network Profile settings to rc.conf
- Add the name of your new network profile to NET_PROFILES=()
- Add the name of your new network profile to NET_PROFILES=()
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.
Wifi-radar This is a nifty little GUI program that lets you switch wireless networks with ease. Simply do the following:
- # pacman -S wifi-radar
- # 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.
- 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.
- oh, and you might need to edit /etc/conf.d/wifi-radar to set the particular network interface that you want to use
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/*