포럼 회원으로 등록하신분만 다운로드가 가능합니다. 최대 업로드 가능한 용량은 20MB 입니다.

http://wirelessdefence.org/Contents/LinuxWirelessCommands.htm

NOTE: NOT ALL CARDS/FIRMWARE SUPPORT ALL OF THE COMMANDS LISTED BELOW.

 

 

Note: To connect your Linux machine to a WLAN using WPA, WPA2 or 802.1X you will need to use WPA Supplicant

 

 

Connecting to an OPEN / WEP WLAN (DHCP)

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

iwconfig [interface] mode managed key [WEP key] (128 bit WEP use 26 hex characters, 64 bit WEP uses 10)

 

 

iwconfig essid "[ESSID]" (Specify ESSID for the WLAN)

 

 

dhclient [interface] (to receive an IP address, netmask, DNS server and default gateway from the Access Point)

 

 

ping www.bbc.co.uk  (if you receive a reply you have access)

 

 

 

Connecting to an OPEN / WEP WLAN (Manual IP Setup)

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

It may be necessary to run some packet capture software (e.g. Ethereal) to determine the IP addresses of both the Default Gateway and DNS servers.

 

iwconfig [interface] mode managed key [WEP key] (128 bit WEP use 26 hex characters, 64 bit WEP uses 10)

 

 

iwconfig essid "[ESSID]"

 

 

ifconfig [interface] [IP address] netmask [subnetmask]

 

 

route add default gw [IP of default gateway] (Configure your default gateway; usually the IP of the Access Point)

 

 

echo nameserver [IP address of DNS server]  >>  /etc/resolve.conf (Configure your DNS server)

 

 

ping www.bbc.co.uk (if you receive a reply you have access)

 

 

 

iwconfig Commands:

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

iwconfig [interface] mode master (set the card to act as an access point mode)

 

 

iwconfig [interface] mode managed (set card to client mode on a network with an access point)

 

 

iwconfig [interface] mode ad-hoc (set card to peer to peer networking or no access point mode)

 

 

iwconfig [interface] mode monitor (set card to RFMON mode our favourite)

 

 

iwconfig [interface] essid any (with some cards you may  disable the  ESSID  checking)

 

 

iwconfig [interface] essid �your ssid_here(configure ESSID for network)

 

 

iwconfig [interface] key 1111-1111-1111-1111 (set 128 bit WEP key)

 

 

iwconfig [interface] key 11111111 (set 64 bit WEP key)

 

 

iwconfig [interface] key s:mykey (set key as an ASCII string)

 

 

iwconfig [interface] key off (disable WEP key)

 

 

iwconfig [interface] key open (sets open mode, no authentication is used and card may accept non-encrypted sessions)

 

 

iwconfig [interface] channel [channel no.] (set a channel 1-14)

 

 

iwconfig [interface] channel auto (automatic channel selection)

 

 

iwconfig [interface] freq 2.422G (channels can also be specified in GHz)

 

 

iwconfig [interface] ap 11:11:11:11:11:11 (Force card to register AP address)

 

 

iwconfig [interface] rate 11M (card will use the rate specified)

 

 

iwconfig [interface] rate auto (select automatic rate)

 

 

iwconfig [interface] rate auto 5.5M (card will use the rate specified and any rate below as required)

 

 

 

ifconfig Commands:

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

ifconfig [interface] up (bring up specified interface)

 

 

ifconfig [interface] down (take down specified interface)

 

 

ifconfig [interface] [IP address] netmask [subnet-mask] (manually set IP and subnet-mask details)

 

 

ifconfig [interface] hw ether [MAC] (Change the wireless cards MAC address, specify in format 11:11:11:11:11:11)

 

 

 

iwpriv Commands:

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

iwpriv [interface] hostapd 1 (used to set card mode to hostapd e.g. for void11)

 

 

When the monitor mode patch is installed as per the Wireless Build HOWTO the following commands may be used to set the card into monitor mode.

 

 

iwpriv [interface] monitor [A] [B]


[A]

0 = disable monitor mode


1 = enable monitor mode with Prism2 header
 

2 = enable monitor mode with no Prism2


[B]

Channel to monitor (1-14)

 

iwlist Commands:

 

Note: replace [interface] with your interface name as required (e.g. eth1, wlan0, ath0 etc.)

 

iwlist is used to display some large chunk of information from a wireless network interface that is not displayed by iwconfig.

 

 

iwlist [interface] scan (Give the list of Access Points and Ad-Hoc cells in range (ESSID, Quality, Frequency, Mode etc.) Note: In tests only worked with Atheros cards).

 

 

iwlist [interface] channel (Give the list of available frequencies in the device and the number of channels).

 

 

iwlist [interface] rate (List the bit-rates supported by the device).

 

 

iwlist [interface] key (List the encryption key sizes supported and display all the encryption keys available in the device).

 

 

iwlist [interface] power (List the various Power Management attributes and modes of the device).

 

 

iwlist [interface] txpower (List the various Transmit Power available on the device).

 

 

iwlist [interface] retry (List the transmit retry limits and retry lifetime on the device).

 

 

iwlist [interface] ap (Give the list of Access Points in range, and optionally the quality of link to them.  Deprecated in favour of scan)

 

 

iwlist [interface] peers (Give the list of Peers associated/registered with this card).

 

 

iwlist [interface] event (List the wireless events supported by this card).

 

 

Madwifi-ng Commands:

 

MADWiFi supports virtual access points (VAPS), which means you can create more than one wireless device per wireless card (the host wireless card = wifi0). 

 

By default, a sta mode VAP is created by, which is MadWifi talk for a 'managed mode wireless interface'.

 

 

Note: replace athx with your interface name as required (e.g. ath0, ath1)

 

 

wlanconfig athx destroy (Destroy VAP, athx)

 

 

wlanconfig athx create wlandev wifi0 wlanmode sta (Create a managed mode VAP, athx)

 

 

wlanconfig athx create wlandev wifi0 wlanmode ap (Create an Access Point VAP, athx)

 

 

wlanconfig athx create wlandev wifi0 wlanmode adhoc (Create an Ad-Hoc VAP, athx)

 

 

wlanconfig athx create wlandev wifi0 wlanmode monitor (Create a Monitor mode VAP, athx)

 

 

Changing modes:

 

ifconfig athx down (Take the VAP down)

 


wlanconfig athx destroy
(Destroy the VAP, athx)

 


wlanconfig athx create wlandev wifi0 wlanmode [sta|adhoc|ap|monitor]
(Create a new sta, adhoc, ap or monitor VAP)

 

 

Scan for Access Points (requires both steps):

 

modprobe wlan_scan_sta (To insert the scanning module)

 

 

wlanconfig athx list scan (To list the APs)

 

 

For more detailed information, see Madwifi Docs

 


profile

인생은 연극이고 세상은 무대이다!

이솝 임베디드 포럼 운영 및 비즈니스와 관련된 것 이외에 E-Mail이나 메신저 및 휴대폰 등을 통한 개인적인 질문 및 답변은 받지 않습니다. 문의 사항은 이솝 임베디드 포럼 게시판을 이용해 주시면 감사하겠습니다.

엮인글 :
http://www.aesop.or.kr/index.php?mid=Board_Documents_Linux_Applications&document_srl=35532&act=trackback&key=5e7

정철진

2010.02.19 05:57:34
*.150.54.136

언제나 좋은 정보 감사합니다. 

 

안드로이드 보드에 SDIO  wlan하나 붙이려는데... 모르는게 너무 많네요

 

List of Articles
번호 제목 글쓴이 날짜 조회 수sort
93 GIT 사용법 (ProGIT) - 1.4. GIT 설치 JhoonKim 2010-01-11 21208
92 GIT 사용법 (ProGIT) - 1.1. 버전 관리 시스템의 개념 file [6] JhoonKim 2010-01-07 19510
91 GIT 사용법 (ProGIT) - 2.1. GIT 저장소(Repository)의 취득 JhoonKim 2010-01-20 18399
90 Makefile 문법 [3] 김재훈 2009-07-25 17144
89 GIT 사용법 (ProGIT) - 1.5. 최초 GIT의 환경 설정 [3] JhoonKim 2010-01-13 16603
88 GIT 사용법 (ProGIT) - 2.5. 원격 저장소의 사용 방법 [2] JhoonKim 2010-02-04 16060
87 GIT 사용법 (ProGIT) - 2.2. GIT 저장소(Repository)에 기록 file [2] JhoonKim 2010-01-21 16033
86 리눅스 Linked-List 구현 관련 참고 자료 김재훈 2009-07-11 15466
85 GIT 사용법 (ProGIT) - 2.6. 태그(TAGS) 붙이기 [2] JhoonKim 2010-02-09 15136
84 GIT 사용법 (ProGIT) - 2.4. 작업의 취소 [1] JhoonKim 2010-02-03 15113
83 GIT 사용법 (ProGIT) - 1.2. GIT 개발 역사 / 1.3. GIT 기본 ... file [3] JhoonKim 2010-01-10 14794
82 리눅스에서 네트워크 속도 측정 방법 [3] 김재훈 2009-07-04 13609
81 ffmpeg encoding option 고현철 2009-10-01 13409
80 GIT 사용법 (ProGIT) - 2.3. 위탁 이력의 열람 file [1] JhoonKim 2010-02-03 13308
79 uBuntu 8.10 에서의 리눅스 개발 환경 설정 [6] 김재훈 2009-01-29 12618
» Useful Linux Wireless Commands [1] 김재훈 2009-06-05 11966
77 I.MX Multimedia and Applications Framework 기술자료 ... file [2] 장석원 2009-10-26 11060
76 uBuntu Linux - dash를 bash로 변경하는 방법 김재훈 2009-04-28 10966
75 리눅스 어셈블리 프로그래밍을 하자! [2] : ARM 부트코드와 실전... file [2] 김재훈 2009-08-25 10596
74 oss를 이용한 read, write, read/write program file [2] 고도리 2011-01-25 10531

사용자 로그인