discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] How can I read the value of RSSI?


From: George Nychis
Subject: Re: [Discuss-gnuradio] How can I read the value of RSSI?
Date: Fri, 14 Sep 2007 10:33:46 -0400
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

Hi Calogero,

address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]