[email protected] wrote:
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
svn co http://gnuradio.org/svn/gnuradio/trunk
First, build the code.
Then, travel into this directory:
At line 312, there is an if() statement, write this else statement to
if(pmt_t rssi = pmt_dict_ref(properties,
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:
…and put it in the appropriate USRP RBF directory, which is usually:
… 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
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:
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:
Let me know if you want the full 32-bits and I will explain.