Emu Net Device with WIFI P2P

141 views
Skip to first unread message

Murad Kablan

unread,
Jan 25, 2013, 11:34:53 PM1/25/13
to ns-3-...@googlegroups.com
Hello guy,
I have a host that runs ns3 in it. The host has a wireless interface card wlan0. I configured wlan0 (using wpa_supplicant) to have a wifi p2p connection with my android phone that uses wifi-direct feature. When I establish the connection, the phone works as a group owner GO and gets ip 192.168.49.1 for itself and assigns 192.168.49.111 for the wlan0. From my host, i can ping the phone using the command ping -I wlan0 192.168.49.1.

Now the challenging part with ns3. I want to ping my phone from ns3. Following the example of emu-ping http://www.nsnam.org/doxygen/emu-ping_8cc_source.html,  I created a node in ns3 and installed emu net device on it and made the following configuration:

78
  std::string deviceName ("wlan0");
79  std::string remote ("192.168.49.1"); // The android phone wlan0 is connecting and I want to ping from ns3
91  Ipv4Address localIp ("192.168.49.113"); // ns3 node (the one with emu net)
173  Ipv4Address gateway ("192.168.49.1"); // Gateway for wlan0, I set it up manually through route command

------------
| node n0 |
| |
| --- |
| | | |
| |emu| |ip 192.168.49.113
| | | |
| --- |
| | |
----|-------
|
(device on host system) wlan0 with ip 192.168.49.111 <------WIFI-Direct P2P ------ Android phone with ip: 192.168.49.1

I want 192.168.49.113 to ping 192.168.49.1


When I run the program, it seems that packets cannot ping 192.168.49.1. And in Wireshark, I see broadcast announcements from 00:00:00:00:01 asking "who has 192.168.49.1 Tell 192.168.49.113" But no one replies

Please help, it is very important for me.
Thanks a lot!

Murad

Reply all
Reply to author
Forward
0 new messages