Overview of common commands for WiFi configuration

Source: Internet
Author: User

1:iwlist eth1 scanning View Wireless Routing
2:iwconfig eth1 Essid "No Line by name"
3:ifconfig eth1 IP
4:route Add default GW Gateway
For a router with a password, set the following:
1:iwconfig eth1 key s: password
2:iwconfig eth1 Key Open
3:ifconfig eth1 Essid "name"
4:ifconfig eth1 IP
5:route Add default GW Gateway

Still engaged in 8634, look at the end of the head. Alas. The disadvantage of Wireless_tools is that WPA authentication is not supported, so it is necessary to transplant wpa_supplicant. Wireless network card is based on Zydas chip, just can search the Internet Wpa_supplicant Zydas Special package: wpa_supplicant-0.4.7_zydas_pre3.tar.gz

The porting is very simple, the unpacking directly modifies the makefile, changes cc to MIPSEL-LINUX-GCC, then compiles directly through. After compiling, we can find several executable programs: WPA_SUPPLICANT,WPA_CLI and so on. Wpa_supplicant is the core program, its relationship with WPA_CLI is the relationship between the service and the client: background run wpa_supplicant, you can use WPA_CLI to search, set up, and connect to the network, and so on, most of the situation edit the configuration file, run Wpa_ Supplicant can connect to the network, create a wpa_supplicant.conf, and type the following:

#可有可无, there's no way to close wpa_supplicant with wpa_cli terminate.
Ctrl_interface=/var/run/wpa_supplicant

# Ensure that only the root user can read the WPA configuration, which is optional, especially on embedded devices
Ctrl_interface_group=0

# Use Wpa_supplicant to scan and select APs, or set to 0 or 2, but only 1 to work correctly
Ap_scan=1

network={
#AP的名字
Ssid= "My_network"
#AP的key
psk= "My_key"
}

Once the configuration file is ready, you can run wpa_supplicant. Before that, of course, first plug in the wireless card, load the driver:

bash# Insmod Zd1211b.ko
bash# ifconfig eth1 up
bash# Wpa_supplicant-b-ieth1-dzydas-c/etc/wpa_supplicant.conf


Parameter-B stands for the background run,-ieth1 represents the use of device Eth1,-dzydas to represent the NIC chip is the zydas,-c specified configuration file.
The next step is to see if the network is connected:

bash# Iwconfig
bash# udhcpc-i Eth1-n

The zd1211b driver uses the wpa_supplicant to configure the time when there will be a time to lock the system a moment, very strange.

1. This wireless network does not set a security mechanism, in other words, there is a set password, OK, what should we do? Command-line ministering

# iwlist Scanning # Search for wireless networks, let's say we've searched for oceanboo-wireless
# Iwconfig Interface Essid oceanboo-wireless
# DHCPCD Interface


That's easy enough, so your machine is connected to the Oceanboo-wireless wireless network, and DHCP gets the IP address. But it's foolish not to set a password for a wireless router, if you're not opening a café or a fast-food restaurant, or setting a password.

2. This wireless network is set up with a security mechanism that uses WEP encryption authentication.

# iwlist Scanning # Still the same search, remember this command.
# Iwconfig Interface Essid oceanboo-wireless key xxxx-xxxx-xxxx-xxxx or XXXXXXXX. # XXX A little more, but if you set up a no line, you must know what this is, I will not say more.
# DHCPCD Interface


Ha, is still the same simple.
The following are some of the options for WEP-certified encryption: request it as needed.

Reference

# Iwconfig Interface Key 0123-4567-89
# Iwconfig interface Key [3] 0123-4567-89
# Iwconfig Interface Key S:password [2]
# Iwconfig interface key [2]
# Iwconfig Interface Key Open
# Iwconfig Interface Key off
# Iwconfig interface key restricted [3] 0123456789
# Iwconfig Interface Key 01-23 key 45-67 [4] key [4]

AP Basic Commands

Iwconfig Configuration Interface

Wlanconfig Creating or destroying VAP

Iwpriv Setting properties

Iwlist searching for wireless hotspots

Brctl Bridge operation

The wireless card of the notebook has been engaged for a long time not to fix, finally still Madwifi make O (∩_∩) o haha ~

For everyone to share the next

Madwifi Configuring the WEP Atheros wireless card

After getting the package from madwifi.org

TAR-XZVF madwifi-0.9.4.tar.gz #最新的0.9.4 Package compile always error, change 0.9.3 bag ...
CD madwifi-0.9.4
Make
Make install
Modprobe Ath_pci #无线模块支持
Modprobe Wlan_scan_sta #无线扫描支持
Wlanconfig Ath0 destroy #取消所有ath0配置, may superfluous
Wlanconfig ath0 Create Wlandev wifi0 wlanmode STA
Iwconfig ath0 key xxxx #wep password, if ASCII is used s:xxxxx
Iwconfig ath0 Essid "xxxx" #广播域
Ifconfig Ath0 up
Dhclient ath0 #or Route add xxxxx

If the encryption method is WPA, it needs to be configured with Wpa_supplicant and requires a write configuration file. Continue to study

Overview of common commands for WiFi configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.