一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

Cross compile wpa_supplicant

 海漩渦 2014-11-05

轉(zhuǎn)自:http://seanhuang./Cross-compile+wpa_supplicant+and+WPS+instruction
Reference site:
http://www./simple/index.php?t20393.html

Cross compile wpa_supplicant

1.移植準(zhǔn)備
a. 下載 openssl源代碼 (使用openssl-0.9.8e ) 官網(wǎng): http://www./source/ 源碼:http://www./source/openssl-0.9.8e.tar.gz
b. 下載 wpa_supplicant源代碼 (使用wpa_supplicant-0.7.3 ) 官網(wǎng):http://hostap./wpa_supplicant/ 源碼:http://hostap./releases/wpa_supplicant-0.7.3.tar.gz c: 下載:libtommath源代碼(libtommath_0.39.orig.tar.gz) 源碼:ftp://220.165.12.10/debian/pool/main/libt/libtommath/libtommath_0.39.orig.tar.gz

2. 編譯openssl
a.將openssl解到 wpa_supplicant/patches 目錄下 # tar zxvf openssl-0.9.8e.tar.gz -C ../ wpa_supplicant-0.7.3/patches/

b.將openssl-0.9.8-tls-extensions.patch拷貝到 wpa_supplicant/patches/openssl-0.9.8e 目錄下
  1. cp wpa_supplicant-0.7.3/patches/openssl-0.9.8e-tls-extensions.patch openssl-0.9.8e/

c.patch openssl-0.9.8e # patch -p1 < openssl-0.9.8e-tls-extensions.patch

d. 編譯openssl
方式1.
  1. ./Configure linux-elf-arm -DB_ENDIAN linux:' arm-linux-gcc' shared --prefix=/usr/local/openssl
  2. make CC=arm-linux-gcc install >>產(chǎn)生 libssl.a 及l(fā)ibcrypto.a
方式2.
  1. ./Configure no-asm --prefix=/usr/local/openssl
  2. make CC=arm-linux-gcc install >>產(chǎn)生 libssl.so及l(fā)ibcrypto.so

3.編譯libtommath-0.39
a.將libtommath-0.39解到/usr/src/ 目錄下 # tar zxvf libtommath_0.39.orig.tar.gz -C /usr/src
b.編譯libtommath # make CC=arm-linux-gcc 產(chǎn)生libtommath.a (Add "CC=/home/fedora/.exdisk/FtenSVN/AU1330/13pf/rma1/arm/toolchains/arm-2010q1/bin/arm-none-linux-gnueabi-gcc" into makefile)

4. 編譯wpa_supplicant(增加WPS功能)
#cp defconfig .config
CONFIG_DRIVER_WEXT=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_FAST=y
CONFIG_TLS=openssl
CONFIG_TLS=internal
CONFIG_INTERNAL_LIBTOMMATH=y
ifndef CONFIG_INTERNAL_LIBTOMMATH
LTM_PATH=/usr/src/libtommath-0.39
CFLAGS += -I$(LTM_PATH)
LIBS += -L$(LTM_PATH)
LIBS_p += -L$(LTM_PATH) endif
CONFIG_WPS=y
CONFIG_EAP_WPS=y
#vim makefile
CC= gcc -L/usr/local/ssl/lib/
CFLAGS += -I/usr/local/ssl/include/
LIBS += -L/usr/local/ssl/lib/
#make CC=arm-linux-gcc install


Start wpa_supplicant service in Linux

Copy "wpa_cli" "wpa_supplicant" "wpa_passphrase" into the device under /usr/bin Copy configuration files into /root/wifi (can be any dir)
Before calling "wpa_cli", "wpa_supplicant" service need to be up

Configuration file for wpa_supplicant service

  1. WPA-PSK/TKIP
ctrl_interface=/var/run/wpa_supplicant



"wpa_supplicant -B -Dwext -iwlan0 -c/root/wifi/wpa_supplicant.conf" to start the service
ioctl[SIOCSIWESSID]: Input/output error
ioctl[SIOCSIWENCODEEXT]: Input/output error
Input/output error can be ignored. wpa_supplicant service is in process now
Could not connect to wpa_supplicant - re-trying


Connect AP using "wpa_cli"


Input "wpa_cli" to access interactive mode:
To press WPS button on the device
>wps_pbc
After issue above, press the button on the AP, authentication can be granted.

To generate a PIN code on device side
>wps_pin <MAC of the device>
Input the generated PIN code in AP configuration console to authenticate the connection request

To use the PIN code on the AP
>wps_pin <MAC of the device> 12345670
Manualy input 12345670 into the configuration web console of the AP (As to authenticate the request)
After that connection between AP and the device can be established.
"udhcpc -i wlan0 -n" to retrieve the IP from AP  

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類(lèi)似文章 更多

    日本一品道在线免费观看| 亚洲日本加勒比在线播放| 国产一区二区三区香蕉av| 中文日韩精品视频在线| 日韩欧美一区二区不卡看片| 久久福利视频视频一区二区 | 色综合视频一区二区观看| 亚洲欧洲一区二区中文字幕| 国产成人精品资源在线观看| 一区二区欧美另类稀缺| 亚洲国产天堂av成人在线播放| 亚洲成人黄色一级大片| 亚洲欧美日韩国产自拍| 国产又色又爽又黄的精品视频 | 国产一区二区三区口爆在线| 亚洲欧美日韩精品永久| 日本最新不卡免费一区二区| 午夜精品麻豆视频91| 日韩欧美91在线视频| 精品女同在线一区二区| 特黄大片性高水多欧美一级 | 中文精品人妻一区二区| 国产一区二区三区四区中文| 91日韩欧美国产视频| 欧美老太太性生活大片| 日本加勒比中文在线观看| 久久婷婷综合色拍亚洲| 日韩精品视频香蕉视频| 国产91麻豆精品成人区| 国产又粗又爽又猛又黄的| 黄色片国产一区二区三区| 人妻久久这里只有精品| 男女午夜福利院在线观看| 国产成人综合亚洲欧美日韩| 国产精品超碰在线观看| 日本久久中文字幕免费| 黄片三级免费在线观看| 极品少妇嫩草视频在线观看| 东京热男人的天堂一二三区| 亚洲综合激情另类专区老铁性| 国产精品不卡一区二区三区四区|