Skip to first unread message

Mohammad Afrashteh

unread,
Sep 26, 2017, 10:58:17 AM9/26/17
to ns-3-users
Hi, everyone,

I want to simulate a VANET scenario with two types of devices on the nodes (vehicles):

1) 802.11p
2) RFID Reader

I use Wifi80211pHelper, Yans, and WaveDevice for 802.11p nodes (vehicles) and want to use 802.15.4 or Wifi for RFID Reader (also for passive tags on roads as constant nodes). Now I have some questions:

1) What is the best selection to simulate RFID Readers and passive tags?
2) In multi-interface nodes how can we assign sockets to each NetDevice? In single mode we use this one:

InternetStackHelper.Install(NodeContainer);
Ipv4AddressHelper.SetBase("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer = Ipv4AddressHelper.Assign(NetDeviceContainer);
TypeIdVar = TypeId::LookupByName("ns3::UdpSocketFactory");

SocketVar = Socket::CreateSocket(NodeContainer.Get(Index), TypeIdVar);
SocketVar->SetAllowBroadcast(true);
SocketVar->Connect(InetSocketAddress);

Then we can use Send method to send packets that here this question arises:

3) What is the relation between Socket and NetDevice?

In fact, I want to distinguish packet sending for each NetDevice in multi-interface scenarios like this:

SocketVehicle->Send(p)
SocketRfidReader->Send(p)

The last question is:

4) How is it possible to determine only special devices to communicate with each other, that means 802.11p only with 802.11p and RFID devices with constant passive tags devices?

Thanks a lot.

Konstantinos

unread,
Sep 26, 2017, 11:15:21 AM9/26/17
to ns-3-users
Hi,

Comments inline.

Regards
K


On Tuesday, September 26, 2017 at 3:58:17 PM UTC+1, Mohammad Afrashteh wrote:
Hi, everyone,

I want to simulate a VANET scenario with two types of devices on the nodes (vehicles):

1) 802.11p
2) RFID Reader

I use Wifi80211pHelper, Yans, and WaveDevice for 802.11p nodes (vehicles) and want to use 802.15.4 or Wifi for RFID Reader (also for passive tags on roads as constant nodes). Now I have some questions:

1) What is the best selection to simulate RFID Readers and passive tags?

I am not sure you can accurately simulate RFID with the WiFi or LRWPAN modules in ns-3, especially for passive devices.  
According to this wikipedia entry https://en.wikipedia.org/wiki/Radio-frequency_identification the RFID that uses the ISM band at 2.4/5Ghz (wifi, bluetooth) is for active, not passive devices. 
 
2) In multi-interface nodes how can we assign sockets to each NetDevice? In single mode we use this one:

InternetStackHelper.Install(NodeContainer);
Ipv4AddressHelper.SetBase("10.1.1.0", "255.255.255.0");
Ipv4InterfaceContainer = Ipv4AddressHelper.Assign(NetDeviceContainer);
TypeIdVar = TypeId::LookupByName("ns3::UdpSocketFactory");

SocketVar = Socket::CreateSocket(NodeContainer.Get(Index), TypeIdVar);
SocketVar->SetAllowBroadcast(true);
SocketVar->Connect(InetSocketAddress);


When you assign IP interfaces, that is done per device, so you will have a different IP for each device.
Then, when you connect the socket with an InetSocketAddress (which is basically an IP with Port), this will be configured to send the data to that IP.
The link between socket and Devices is the Network layer, and in particularly the routing protocol where you can route specific IPs to specific Devices.
So, you can put a simple static routes for each subnets to go to different devices.
 
Then we can use Send method to send packets that here this question arises:

3) What is the relation between Socket and NetDevice?

In fact, I want to distinguish packet sending for each NetDevice in multi-interface scenarios like this:

SocketVehicle->Send(p)
SocketRfidReader->Send(p)


This is possible. See reply above.
 
The last question is:

4) How is it possible to determine only special devices to communicate with each other, that means 802.11p only with 802.11p and RFID devices with constant passive tags devices?


This is done 'automatically'. A 11p device will not be able to talk or interfere with any other device since a difference PHY instance will be created.
 
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages