How can I read the value of RSSI?

Hi,
the PC receives packets BULK of 512 byte by USB. I have seen the form of
packet
and in several fields there is the field RSSI. I want to read the value
of RSSI
by packets but I don’t understand where I can read this value by code
C++. Could
you suggest where I can read this value by files C++?
Thank you very much.

Calogero

On Fri, Sep 14, 2007 at 10:58:37AM +0200, removed_email_addres[email protected] wrote:

Hi,
the PC receives packets BULK of 512 byte by USB. I have seen the form of packet
and in several fields there is the field RSSI. I want to read the value of RSSI
by packets but I don’t understand where I can read this value by code C++. Could
you suggest where I can read this value by files C++?
Thank you very much.

Calogero

It’s a bit too early to be trying to use the inband signaling stuff.
Yes, RSSI will be in there. The format is not yet determined. There
are several issues that still need to be resolved. The interfaces are
still moving around a lot.

When it’s really ready for prime time, we’ll make an announcement.

Eric

Hi Calogero,

[email protected] wrote:

Hi,
the PC receives packets BULK of 512 byte by USB. I have seen the form of packet
and in several fields there is the field RSSI.

Do you mean the in-band USB packet? I think the default USB packet does
not carry the RSSI.

I want to read the value of RSSI
by packets but I don’t understand where I can read this value by code C++. Could
you suggest where I can read this value by files C++?
Thank you very much.

You’re in luck, we have been working on in-band signaling through the
use of the new m-block which can get you this value in 1 of 2 ways. But
you need to checkout the SVN trunk. It is not in the current GNU Radio
release:

svn co http://gnuradio.org/svn/gnuradio/trunk

First, build the code.

Then, travel into this directory:
usrp/host/apps-inband

At line 312, there is an if() statement, write this else statement to
it:
else {
if(pmt_t rssi = pmt_dict_ref(properties,
pmt_intern(“rssi”),
PMT_NIL)) {
if(!pmt_eqv(rssi, PMT_NIL) && verbose)
std::cout << "RSSI: " << rssi << std::endl;
}

One more change at line 104:
“nanocell9.rbf” to “usrp-inband.rbf”

Then, download this file:
http://www.andrew.cmu.edu/user/gnychis/usrp-inband.rbf

…and put it in the appropriate USRP RBF directory, which is usually:
/usr/local/share/usrp/rev2/

Rebuild and:
./test_usrp_inband_rx

… you will see the RSSI field being dumped for every packet you
receive from the USRP.

Note that you can only use basic TX/RX daughterboards with this code
currently.

You can use this as a building block for whatever you want to do. But I
strongly suggest you read this thread to really understand what RSSI
value that is:
http://lists.gnu.org/archive/html/discuss-gnuradio/2007-08/msg00085.html

If you really want the 32-bits (if you read the thread, you’ll
understand)… you can use a read_reg command. We have mapped the RSSI
register to a local register that you can read from. But, I’d have to
look up where we mapped this too, double check that it’s still mapped,
and then you can use this as a building block:
host/apps-inband/test_usrp_inband_registers.cc

Let me know if you want the full 32-bits and I will explain.

  • George

George N. wrote:

At line 312, there is an if() statement, write this else statement to it:

Sorry! line 312 of this file:
test_usrp_inband_rx.cc

file names help :wink:

  • George

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs