problem about packet send after associated in 802.11 network

58 views
Skip to first unread message

丁磊

unread,
Dec 16, 2015, 10:25:34 AM12/16/15
to ns-3-users
hi~ 

I'm new in ns3 and I'm working on optimizing the hand-off process of 802.11 network.
In short, if the movement path of the mobile station and the access points around the path are known. 
It's my work to decide the station should handoff to which access point at which position to reduce the total packet loss rate.
My scheme is to send association request to next access point at certain position.

I met such a problem:
after association, the transmission of data packet still failed, the log information is below:
05 is the mobile station, 06 is the target access position.
the association is completed at 1.23 second but the transmission is still failed. The mac layer did not send packet.

ap: 00:00:00:00:00:06 associated with sta: 00:00:00:00:00:05  1.23152
associated with sta=00:00:00:00:00:05 at: 1.23152
..........
TraceDelay TX 1024 bytes to 192.168.0.5 Uid: 434 Time: 1.27
UdpClient:Send(0x21c6bc0)
UdpSocketImpl:Send(0x21c7630, 0x21c31b0, 0)
UdpSocketImpl:DoSend(0x21c7630, 0x21c31b0)
UdpSocketImpl:DoSendTo(0x21c7630, 0x21c31b0, 03-04-c0:a8:00:05)
Connected
UdpSocketImpl:DoSendTo(0x21c7630, 0x21c31b0, 192.168.0.5, 9)
UdpSocketImpl:GetTxAvailable()
Route exists ipv4
UdpL4Protocol:Send(0x21b3960, ipv4 with route , 0x21bf850, 192.168.0.2, 192.168.0.5, 49153, 9, 0x21c86f0)
m_downTarget (packet, saddr, daddr, PROT_NUMBER, route)
TraceDelay TX 1024 bytes to 192.168.0.5 Uid: 435 Time: 1.28
UdpClient:Send(0x21c6bc0)
UdpSocketImpl:Send(0x21c7630, 0x21c31b0, 0)
UdpSocketImpl:DoSend(0x21c7630, 0x21c31b0)
UdpSocketImpl:DoSendTo(0x21c7630, 0x21c31b0, 03-04-c0:a8:00:05)
Connected
UdpSocketImpl:DoSendTo(0x21c7630, 0x21c31b0, 192.168.0.5, 9)
UdpSocketImpl:GetTxAvailable()
Route exists ipv4
UdpL4Protocol:Send(0x21b3960, ipv4 with route , 0x21bf850, 192.168.0.2, 192.168.0.5, 49153, 9, 0x21c86f0)
m_downTarget (packet, saddr, daddr, PROT_NUMBER, route)
............

after about one second (from Seconds 1.23152 to Seconds 2.24), I got log like this:

sta: 00:00:00:00:00:05send packet from: 00:00:00:00:00:05 to: ff:ff:ff:ff:ff:ff bssid: 00:00:00:00:00:06 type: 19
ap: 00:00:00:00:00:06receive packet from: 00:00:00:00:00:05 to: ff:ff:ff:ff:ff:ff bssid: 00:00:00:00:00:06 type: 19
ap: 00:00:00:00:00:06 forwarding frame from=00:00:00:00:00:05, to=ff:ff:ff:ff:ff:ff 2.24041


then the StaWifiMac send packets and UdpServer can receive packets:

TraceDelay TX 1024 bytes to 192.168.0.5 Uid: 646 Time: 2.54
    ap: 00:00:00:00:00:06receive packet from: 00:00:00:00:00:05 to: 00:00:00:00:00:08 bssid: 00:00:00:00:00:06 type: 19
UdpL4Protocol:Receive(0x21c21d0, 0x21c7560, tos 0x0 DSCP Default ECN Not-ECT ttl 64 id 254 protocol 17 offset (bytes) 0 flags [none] length: 1052 192.168.0.2 > 192.168.0.5)
Looking up dst 192.168.0.5 port 9
UdpSocketImpl:ForwardUp(0x21c77d0, 0x21bf850, tos 0x0 DSCP Default ECN Not-ECT ttl 64 id 254 protocol 17 offset (bytes) 0 flags [none] length: 1052 192.168.0.2 > 192.168.0.5, 49153)
UdpServer:HandleRead(0x21c6810, 0x21c77d0)
UdpSocketImpl:RecvFrom(0x21c77d0, 4294967295, 0)
UdpSocketImpl:Recv(0x21c77d0, 4294967295, 0)
TraceDelay: RX 1012 bytes from 192.168.0.2 Sequence Number: 254 Uid: 646 TXtime: +2540000000.0ns RXtime: +2541178167.0ns Delay: +1178167.0ns
UdpSocketImpl:RecvFrom(0x21c77d0, 4294967295, 0)
UdpSocketImpl:Recv(0x21c77d0, 4294967295, 0)
UdpClient:Send(0x21c6bc0)
UdpSocketImpl:Send(0x21c7630, 0x21ae2b0, 0)
UdpSocketImpl:DoSend(0x21c7630, 0x21ae2b0)
UdpSocketImpl:DoSendTo(0x21c7630, 0x21ae2b0, 03-04-c0:a8:00:05)
Connected
UdpSocketImpl:DoSendTo(0x21c7630, 0x21ae2b0, 192.168.0.5, 9)
UdpSocketImpl:GetTxAvailable()
Route exists ipv4
UdpL4Protocol:Send(0x21b3960, ipv4 with route , 0x21bf850, 192.168.0.2, 192.168.0.5, 49153, 9, 0x210a870)
m_downTarget (packet, saddr, daddr, PROT_NUMBER, route)
    sta: 00:00:00:00:00:05send packet from: 00:00:00:00:00:05 to: 00:00:00:00:00:08 bssid: 00:00:00:00:00:06 type: 19

I have tried to check the source code to find the reason but it is too hard for me to understand the " IpL4Protocol::DownTargetCallback".
So I can only track to " m_downTarget (packet, saddr, daddr, PROT_NUMBER, route);" in "UdpL4Protocol::Send (Ptr<Packet> packet, Ipv4Address saddr, Ipv4Address daddr, uint16_t sport, uint16_t dport,Ptr<Ipv4Route> route)"
Is there anyone can help me with this problem: why this 0.5 minute delay happen?
Please give me some advice about what the reason may be and where should i check?

Thanks a lot && sorry for my poor English.

PS: I upload my code but it can not run on original ns-3 because i change some of the source code of StaWifiMac in order to trigger the SendAssocReq function in the script.
1216-1.cc

gabriela

unread,
Apr 27, 2016, 12:33:57 PM4/27/16
to ns-3-users
Hello.

I'm having a similar problem with AdhocWifiMac. 
Everything seems to be fine (there are no error messages or warnings at the log), but the packet does not get send. The transmission never starts but the pkt is not dropped either. It just vanish.
I even checked the trace source PhyTxBegin (Trace source indicating a packet has begun transmitting over the channel medium) at ns3::WifiPhy. Nothing happens.

Did you figure out what was wrong in your simulation?

Regards.
Reply all
Reply to author
Forward
0 new messages