下午在开发板运行了aodv算法,过程如下:
环境:
主机 ubuntu 10.04 2.6.32
开发板 友善之臂的6410 2.6.38
查看无线网为wlan0
[root@FriendlyARM /]# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:off/any
Mode:Managed Access Point: Not-Associated
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
配置ip地址
[root@FriendlyARM /]# ifconfig wlan0 10.0.1.1 up
[root@FriendlyARM /]# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:off/any
Mode:Managed Access Point: Not-Associated
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
[root@FriendlyARM /]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:90:00:A0:90:90
inet addr:192.168.1.230 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:108
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:448 (448.0 B) TX bytes:448 (448.0 B)
wlan0 Link encap:Ethernet HWaddr 70:F3:95:EC:4B:D7
inet addr:10.0.1.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
配置wlan0为dahoc模式,essid为 zengaodv
[root@FriendlyARM /]# iwconfig wlan0 mode ad-hoc essid zengaodv
[root@FriendlyARM /]# ls
bin home mnt root sys usr
dev lib opt sbin tmp var
etc linuxrc proc sdcard udisk www
打开u盘上的aodv
[root@FriendlyARM /]# cd udisk/
[root@FriendlyARM /udisk]# ls
ARM
OS??
VC6.0 ?????
aodv
aodv-uu-0.9.6
arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz
linux-2.6.28.6-20101007.tar.gz
syncguid.dat
zImage
zc
[root@FriendlyARM /udisk]# cd aodv-uu-0.9.6/
[root@FriendlyARM aodv-uu-0.9.6]# ls
ChangeLog aodv_rrep.c defs.h nl.o
GPL aodv_rrep.h endian.c params.h
Makefile aodv_rrep.o kaodv.ko patches
README aodv_rreq.c list.c rfc3561.txt
README.ns aodv_rreq.h list.h routing_table.c
TAGS aodv_rreq.o list.o routing_table.h
TODO aodv_socket.c llf.c routing_table.o
aodv_hello.c aodv_socket.h llf.h seek_list.c
aodv_hello.h aodv_socket.o lnx seek_list.h
aodv_hello.o aodv_timeout.c locality.c seek_list.o
aodv_neighbor.c aodv_timeout.h locality.h timer_queue.c
aodv_neighbor.h aodv_timeout.o locality.o timer_queue.h
aodv_neighbor.o aodvd main.c timer_queue.o
aodv_rerr.c debug.c main.o
aodv_rerr.h debug.h nl.c
aodv_rerr.o debug.o nl.h
加载kaodv.ko前查看系统内的模块
[root@FriendlyARM aodv-uu-0.9.6]# lsmod
zd1211rw 44699 0 - Live 0xbf195000
rtl8192cu 413497 0 - Live 0xbf123000
rt2800usb 11232 0 - Live 0xbf11a000
rt2800lib 38271 1 rt2800usb, Live 0xbf10b000
rt73usb 20351 0 - Live 0xbf101000
rt2x00usb 7010 2 rt2800usb,rt73usb, Live 0xbf0fa000
rt2x00lib 27707 4 rt2800usb,rt2800lib,rt73usb,rt2x00usb, Live 0xbf0ed000
ath9k_htc 46769 0 - Live 0xbf0da000
ath9k_common 1305 1 ath9k_htc, Live 0xbf0d4000
mac80211 182987 5 zd1211rw,rt2800lib,rt2x00usb,rt2x00lib,ath9k_htc, Live 0xbf09c000
ath9k_hw 293213 2 ath9k_htc,ath9k_common, Live 0xbf04c000
ath 12478 2 ath9k_htc,ath9k_hw, Live 0xbf043000
libertas_sdio 7583 0 - Live 0xbf03c000
libertas 46854 1 libertas_sdio, Live 0xbf029000
cfg80211 130228 6 zd1211rw,rt2x00lib,ath9k_htc,mac80211,ath,libertas, Live 0xbf000000
加载kaodv.ko
[root@FriendlyARM aodv-uu-0.9.6]# insmod kaodv.ko
查看是否加载成功
[root@FriendlyARM aodv-uu-0.9.6]# lsmod
kaodv 13305 0 - Live 0xbf1a7000
zd1211rw 44699 0 - Live 0xbf195000
rtl8192cu 413497 0 - Live 0xbf123000
rt2800usb 11232 0 - Live 0xbf11a000
rt2800lib 38271 1 rt2800usb, Live 0xbf10b000
rt73usb 20351 0 - Live 0xbf101000
rt2x00usb 7010 2 rt2800usb,rt73usb, Live 0xbf0fa000
rt2x00lib 27707 4 rt2800usb,rt2800lib,rt73usb,rt2x00usb, Live 0xbf0ed000
ath9k_htc 46769 0 - Live 0xbf0da000
ath9k_common 1305 1 ath9k_htc, Live 0xbf0d4000
mac80211 182987 5 zd1211rw,rt2800lib,rt2x00usb,rt2x00lib,ath9k_htc, Live 0xbf09c000
ath9k_hw 293213 2 ath9k_htc,ath9k_common, Live 0xbf04c000
ath 12478 2 ath9k_htc,ath9k_hw, Live 0xbf043000
libertas_sdio 7583 0 - Live 0xbf03c000
libertas 46854 1 libertas_sdio, Live 0xbf029000
cfg80211 130228 6 zd1211rw,rt2x00lib,ath9k_htc,mac80211,ath,libertas, Live 0xbf000000
运行用户态aodvd文件
[root@FriendlyARM aodv-uu-0.9.6]# ./aodvd
17:59:10.195 host_init: Attaching to wlan0, override with -i <if1,if2,...>.
17:59:10.423 aodv_socket_init: RAW send socket buffer size set to 217088
17:59:10.425 aodv_socket_init: Receive buffer size set to 217088
17:59:10.425 main: In wait on reboot for 15000 milliseconds. Disable with "-D".
17:59:10.426 hello_start: Starting to send HELLOs!
17:59:25.430 wait_on_reboot_timeout: Wait on reboot over!!
^C17:59:39.380 cleanup: CLEANING UP!
至此aodv路由算法在开发板上跑起来了