How to modify wifi stanode ssid and channel during run time? And some related question.

62 views
Skip to first unread message

童大維

unread,
Oct 18, 2016, 3:10:43 AM10/18/16
to ns-3-users
Hello everyones , I'm new to NS3.
I modified the example file third.cc , and made it's topology just like

                                *
                                |
                                |
                                *
                              /    \
                            /        \
                           *          *
                          ap1       ap2

                                 *
                                 STA

And make sure that the distance between ap1-sta is as long as ap2-sta .

I found that if they are in same channel and same ssid the STA can't connect to any ap , so I change 2 ap in different channel and ssid.

Then , I used Simulator::Schedule to install a new WifiNetDevice  , but it didn't work well , I can't change the connection form ap1 to ap2 , how should I do .

And how to uninstall an older netdevice (i.e staDevices=wifi.install(phy , mac , wifistanode)    how to uninstall or modify it?)

Simplify to said , I want to    change the connection form ap1 to ap2 during runtime , how should i do?


Thank for any reply ,

Regards,
Tung


fail2.cc

Tommaso Pecorella

unread,
Oct 20, 2016, 4:10:41 PM10/20/16
to ns-3-users
Hi,

NetDevices can not be created or deleted once the simulation has begun. We have a proposal to stop and restart a NetDevice, but it has not been finalized yet. In the meantime, some netDevice support a sleep mode.
Nevertheless, what you're trying to do seems to be an handover. I'd strongly suggest to think about it.
You might also want to take a look at the StaWifiMac::StartActiveAssociation (void) function.

T.

童大維

unread,
Oct 22, 2016, 9:55:18 AM10/22/16
to ns-3-users
Thank you so much for your reply , what I'm trying to do is Handout .
I'll try to find more information about handout and read some document  about StaWifiMac::StartActiveAssociation (void) function , 
Really thanks for your help




Regards,

Tung.
Reply all
Reply to author
Forward
0 new messages