I have two nodes, each consists of two WLAN interfaces, wlan0
is ieee80211
, wlan1
is ieee80215
based on AdHoc Host from INET framework.
I'm sending a packet with UDP BasicAPP. When I enable both WLAN interfaces, it always sends the packet through wlan0 (i.e. ieee80211 protocol). If I want to send the packet with ieee80215, I must disable the ieee80211 WLAN interface in the sender node.
Is there any way to detemine which WLAN interface will be used for sending a packet?
You can choose which Interface you want to select to send the packet, and add the InterfaceReq Tag to the packet. The following code sends an udp packet over wlan1 interface.
Or, in the other hand, you can use the following if you know the Interface ID: