How to set Preamble type of the packet to WIFI_PREAMBLE_SHORT for 802.11?

216 views
Skip to first unread message

liuj...@gmail.com

unread,
Jun 2, 2016, 6:44:13 AM6/2/16
to ns-3-users

Hello everyone

Now the default preamble of the packet is 
WIFI_PREAMBLE_LONG. I want to sent the preamble of the packet to WIFI_PREAMBLE_SHORT, but  it seemed that there isn't any attribute to set.  Can anyone please tell me how to set? 


Thanks in advance,
Best Regards,


The type of preamble to be used by an IEEE 802.11 transmission.


Enumerator
WIFI_PREAMBLE_LONG 
WIFI_PREAMBLE_SHORT 
WIFI_PREAMBLE_HT_MF 
WIFI_PREAMBLE_HT_GF 
WIFI_PREAMBLE_VHT 
WIFI_PREAMBLE_NONE 

Tommaso Pecorella

unread,
Jun 2, 2016, 6:46:51 PM6/2/16
to ns-3-users
Hi,

the preamble is set to short if the standard you're using asks this. E.g., 802.11g always uses short preambles, unless ... well, it's in the standard.

T.

liuj...@gmail.com

unread,
Jun 2, 2016, 9:14:00 PM6/2/16
to ns-3-users

Thank you for your reply.

I have used

 

          WifiHelper wifi = WifiHelper::Default ();

          wifi.SetStandard (WIFI_PHY_STANDARD_80211g);

 

 to set the standard to  802.11g, and also set DataMode and  ControlMode like this

 

          wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", StringValue("ErpOfdmRate24Mbps"),

                                "ControlMode", StringValue("ErpOfdmRate24Mbps"));

 

I used OnOffApplication to send packet.But when I traced by



          MonitorSnifferRxCallback (Ptr< const Packet > packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txVector, struct mpduInfo aMpdu, struct signalNoiseDbm signalNoise)

 

The preambles of all packets are WIFI_PREAMBLE_LONG, but not WIFI_PREAMBLE_SHORT.

Can you help me to deal with this problem? 

 

Thanks in advance,
Best Regards,




在 2016年6月3日星期五 UTC+9上午7:46:51,Tommaso Pecorella写道:

Tommaso Pecorella

unread,
Jun 3, 2016, 4:59:54 PM6/3/16
to ns-3-users
Hi,

from the code I can see that you're not using the latest ns-3. Please upgrade at least to 3.25 and try again.

Thanks,

T.

liuj...@gmail.com

unread,
Jun 3, 2016, 8:28:20 PM6/3/16
to ns-3-users

Thanks a lot. I will try 3.25.

Best regards.


在 2016年6月4日星期六 UTC+9上午5:59:54,Tommaso Pecorella写道:
Reply all
Reply to author
Forward
0 new messages