How to get RSSI in Wi-Fi

679 views
Skip to first unread message

Boopala Krishnan

unread,
Jan 28, 2015, 3:53:20 AM1/28/15
to ns-3-...@googlegroups.com
I am trying to get received signal strength in Wi-Fi.
The code which I used :

YansWifiPhy yans;
std::cout<< "rxgain : " << yans.GetRxGain() << std::endl;

output: rx gain : 6.93963e-310

Pls help me. Thank you in advance.

Konstantinos

unread,
Jan 28, 2015, 6:05:16 AM1/28/15
to ns-3-...@googlegroups.com
Hi,

What you are trying to do is completely wrong both in terms of C++/programing, as well as meaningfulness.

You created a new YansWifiPhy object and called a method named GetRxGain from that.
Problems with this approach: uninitialized object, you ask for signal strength however you call a method to get the antenna gain...

The signal strength is calculated on per packet basis. You can use the NS3 tracing system (http://www.nsnam.org/docs/release/3.21/manual/html/tracing.html) and hook to one of the trace sources that provide the singal strength (e.g. MonitorSnifferRx).
Otherwise, you can modify the code slightly and use the SNR tag as it is explained in other threads (just search for it in the mailing list).

Regards,
K.

姜忠泰

unread,
Sep 28, 2018, 4:07:54 AM9/28/18
to ns-3-users
hello,i want to get some information(RSSI or CSI)in ns-3 by runing rata adaptation,could i get your help?

在 2015年1月28日星期三 UTC+8下午4:53:20,Boopala Krishnan写道:
Reply all
Reply to author
Forward
0 new messages