대표적인 wireless 유틸리티 프로그램인 wireless_tools 를 소개한다. 이를 사용하여 Wi-Fi 의 기본 동작을 확인 및 검증할 수 있다.

준비운동 하기

먼저 소스 코드를 다운 받아야 한다. http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html 에서 최신 버전(wireless_tools.29.tar.gz)을 다운 받는다(2013/3월 기준).

빌드 및 설치하기(i386)

아래 처럼 압축을 풀고 빌드한다.

#tar xzf wireless_tools.29.tar.gz
#cd wireless_tools.29
#make

에러없이 빌드 되었다면, 몇 개의 실행파일들(iwconfig, iwlist, iwpriv 등)이 보일 것이다. 실행해보자.

#./iwconfig 
./iwconfig: error while loading shared libraries: libiw.so.29: cannot open shared object file: No such file or directory

실행 시 필요한 라이브러리를 찾지 못해 에러가 발생했다. 경로를 지정해주어도 되겠지만, 간단하게 동적 라이브러리 링킹이 아닌 정적 라이브러리를 링킹하기 위해 Makefile 을 아래 처럼 수정한다.

## Uncomment this to build tools using static version of the library.
## Mostly useful for embedded platforms without ldd, or to create
## a local version (non-root).
BUILD_STATIC = y             // 주석 해제

이제 빌드 후 다시 실행해보자!

빌드 및 설치하기(ARM)

빌드하기 전에 Makefile 파일을 아래와 같이 수정한다.

## Compiler to use (modify this for cross compile).
CC = arm-none-linux-gcc
## Other tools you need to modify for cross compile (static lib only).
AR = arm-none-linux-ar
RANLIB = arm-none-linux-ranlib
 
## Uncomment this to build tools using static version of the library.
## Mostly useful for embedded platforms without ldd, or to create
## a local version (non-root).
BUILD_STATIC = y
  • computer/technology/wireless_tools_사용하기.txt
  • Last modified: 3 years ago
  • by likewind