libnl-3.2.25.tar.gz
http://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz
./configure --host=arm-linux --prefix=$PWD/tmp
make
头文件拷贝
cp *rf /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include
库拷贝
sudo cp * -rf -d /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib
iw
https://mirrors.edge.kernel.org/pub/software/network/iw/
烧写:
nfs 30000000 192.168.7.1:/work/nfs_root/fs_mini_mdev_new.jffs2nand erase.part rootfs
nand write.jffs2 30000000 260000 $filesize
set bootargs console=ttySAC0,115200 root=/dev/mtdblock3 rootfstype=jffs2
nfs 32000000 192.168.7.1:/work/nfs_root/uImage_new
nfs 32000000 192.168.7.1:/work/nfs_root/uImage
nfs 32000000 192.168.7.1:/work/nfs_root/uImage_jz2440_wifi
bootm 32000000
进入开发板后进行相关配置:
mount -t nfs -o nolock,vers=2 192.168.7.1:/work/nfs_root /mnt
insmod rt2x00lib.ko
insmod rt2x00usb.ko
insmod rt2800lib.ko
insmod rt2800usb.ko
cp iw /usr/bin/
cp libnl-genl-3.so.200 /usr/lib/
cp libnl-3.so.200 /usr/lib/
iw dev wlan0 scan
无密码连接:
iw wlan0 connect answer
ping 192.168.43.1
有密码连接:
iw wlan0 connect answer keys d:0:baiwenwang123
iw dev wlan0 link //查看连接状态
ping 192.168.43.1
iw wlan0 disconnect
wpa_supplicant配置:
tar xzf wpa_supplicant-2.0.tar.gz
cd wpa_supplicant-2.0/wpa_supplicant/
vi /etc/plaintext.conf
mkdir -p /var/run/wpa_supplicant
①(OPEN)无线连接
ifconfig wlan0 up
wpa_supplicant -B -c/etc/plaintext.conf -iwlan0
wpa_cli -iwlan0 status //查看状态
②(WEP-psk)有线连接
mkdir -p /var/run/wpa_supplicant //一个目录,用于wpa_supplicant和wpa_cli的socket通信
ifconfig wlan0 up
ps
kill之前的进程
wpa_supplicant -B -c/etc/wep.conf -iwlan0
wpa_cli -iwlan0 status
另:
wpa_cli可工作于"命令模式" 和"交互模式"
③设置多个无线网络