我在主机连接到一个AccessPoint之间发送udp数据报时遇到问题。下面我展示了我的ned和omnetpp.ini文件,我使用了inet / examples / wireless / lan80211中的示例。 我想做的就是发送一些间隔的信标帧,并在主机之间发送UDP数据报。
.ned file:
package inet.examples.wireless.lan80211;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.inet.WirelessHost;
import inet.nodes.wireless.AccessPoint;
import inet.world.radio.ChannelControl;
network Lan80211
{
parameters:
int numHosts;
submodules:
host[numHosts]: WirelessHost {
@display("r=,,#707070");
wlan[*].mgmtType = "Ieee80211MgmtSTASimplified";
}
ap: AccessPoint {
@display("p=213,174;r=,,#707070");
wlan[*].mgmtType = "Ieee80211MgmtAP";
}
channelControl: ChannelControl {
numChannels = 2;
@display("p=61,46");
}
configurator: IPv4NetworkConfigurator {
config=xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
@display("p=140,50");
}
}
Omnetpp.ini文件:
[General]
network = Lan80211
#cmdenv-output-file = omnetpp.log
#debug-on-errors = true
tkenv-plugin-path = ../../../etc/plugins
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 600m
**.constraintAreaMaxY = 400m
**.constraintAreaMaxZ = 0m
**.debug = true
**.coreDebug = false
**.channelNumber = 1
# channel physical parameters
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 2.0mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
# access point
**.ap.wlan[*].mac.address = "10:00:00:00:00:00" #1=*
**.host[*].**.mgmt.accessPointAddress = "10:00:00:00:00:00"
**.mgmt.frameCapacity = 15
**.mgmt.beaconInterval = 0.04s
# UDP app (host[0] pinged by others)
**.numUdpApps = 2
**.udpApp[1].typename = "UDPBasicApp"
**.udpApp[0].typename = "UDPEchoApp"
**.udpApp[1].localPort = 1000
#**.udpApp[0].destAddresses = "host[0]"
#*Host[*].udpApp[0].typename = "UDPBasicApp"
**.host[0].udpApp[1].destPort = 1000
**.host[1].udpApp[1].destPort = 1000
**.host[0].udpApp[1].destAddresses = "host[1]"
**.host[1].udpApp[1].destAddresses = "host[0]"
**.host[*].udpApp[1].sendInterval = 10ms
# nic settings
**.wlan*.bitrate = 2Mbps
**.mac.address = "auto"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 3000B
**.wlan[*].mac.retryLimit = 7
**.wlan[*].mac.cwMinData = 7
**.wlan[*].mac.cwMinBroadcast = 31
**.radio.transmitterPower = 2.0mW
**.radio.carrierFrequency = 2.4GHz
**.radio.thermalNoise = -110dBm
**.radio.sensitivity = -85dBm
**.radio.pathLossAlpha = 2
**.radio.snirThreshold = 4dB
[Config Ping1]
description = "host1 pinging host0"
*.numHosts = 2
[Config Ping2] # __interactive__
description = "n hosts"
我发现当我改变行
wlan[*].mgmtType = "Ieee80211MgmtAP";
在.ned文件中,数据报从一个主机到另一个主机,但随后信标的发送不起作用。
另外,当udp数据报待处理时,我在模拟期间从命令窗口获得一些信息:
**事件#320 T = 0.02 Lan80211.host [0] .udpApp [1](UDPBasicApp,id = 15),关于selfmsg sendTimer' (cMessage, id=10)
** Event #321 T=0.02 Lan80211.host[1].udpApp[1] (UDPBasicApp, id=35), on selfmsg
sendTimer'(cMessage,id = 21)
**事件#322 T = 0.02 Lan80211.host [0] .udp(UDP,id = 16),在UDPBasicAppData-2' (cPacket, id=304)
Sending app packet UDPBasicAppData-2 over IPv4.
** Event #323 T=0.02 Lan80211.host[1].udp (UDP, id=36), on
UDPBasicAppData-2'上(cPacket,id = 305)
通过IPv4发送应用程序包UDPBasicAppData-2。
**事件#324 T = 0.02 Lan80211.host [0] .networkLayer.ip(IPv4,id = 18),UDPBasicAppData-2' (UDPPacket, id=306)
Sending datagram
UDPBasicAppData-2',dest = 145.236.0.2
路由数据报UDPBasicAppData-2' with dest=145.236.0.2: output interface is wlan0, next-hop address: <unspec>
no next-hop address, using destination address 145.236.0.2 (proxy ARP)
Sending out packet to interface wlan0
** Event #325 T=0.02 Lan80211.host[1].networkLayer.ip (IPv4, id=38), on
UDPBasicAppData-2'(UDPPacket,id = 307)
使用dest = 145.236.0.1发送数据报UDPBasicAppData-2' with dest=145.236.0.1
Routing datagram
UDPBasicAppData-2':输出接口是wlan0,下一跳地址:
没有下一跳地址,使用目标地址145.236.0.1(代理ARP)
发送数据包到接口wlan0
有任何建议吗?
谢谢, MB