cancel
Showing results for 
Search instead for 
Did you mean: 

ST25RU3993 slow RSSI reading

Malvi
Associate II

Hello,

I am currently using the SDK for this evaluation board to read the RSSI for my single tag withing a frequency bandwidth. my problem is that this process with my C# code takes like a minute and is not real time.

in further details here is my code for each frequency:

{
demo_SetupGen2Config( true, false, 
STUHFL_D_USED_ANTENNA.ANTENNA_1, STUHFL_D_TUNING_ALGO.FAST)

for (int cnt = 0; cnt < number_of_mean_rounds; cnt++) { 
inventory.execute();
STUHFL_T_InventoryTag tag = inventory.tagList[0];
rssilinI_cnt = (int)tag.rssilinI;
rssilinQ_cnt = (int)tag.rssilinq;
}
}
// end of code

Now can you help how to improve speed of my code? 
for example can I use frequency hopping mode for reading RSSI ?
or is there anything I can do just for setting frequency instead of calling the SetupGen2Config function for each frequency?
or is there other option for reading tags other than inventory.execute() that can do 10 times reading (for averagig) faster and allow me to read the RSSI from it?

warm regards,
Mostafa

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

To use some specific frequencies it is necessary to setup a frequency list with exact these frequencies.
The FW then hop through these frequencies using the specified hopping strategy and time.

The RSSIlin is measured whenever a transponder reply to a Query command in every slot during the inventory process. This links the measurement to a specific transponder.

If you need to measure the RSSI for only one transponder you have to select this one before running inventory.

BR

View solution in original post

4 REPLIES 4
Nick K
ST Employee

Hello,

>> Now can you help how to improve speed of my code?
inventory.execute() is a blocking call that starts an complete inventory cycle and waits until all requested slots are executed. The number of slots is given by the number of rounds and the Q value that are specified. When setup the STUHFL library to use adaptive Q, the Q value may change during runtime. This depends on the number of collisions and empty rounds. Subsequently this could then increase the number slots and the runtime of the inventory itself in addition.

When using inventory.start(..) inventory is called non-blocking. This allow to continue code execution on host side. The non-blocking version then uses callback functions to frequently notify about the progress of the inventory loop. For C# please have a look to the public static void demo_InventoryRunner(UInt32 rounds) implementation. This showcase how to start the non-blocking inventory. The callback function then is called immediately whenever a slot happened with an found transponder.

 

>> for example can I use frequency hopping mode for reading RSSI ?
Frequency hopping is done automatically when specifying more then one frequency in the channel list. The hopping then happens when the max sending time expires. Please be aware the different regions have different maximum allowed sending times. The STUHFL library has convenience functions to setup correct frequency hopping.

 

>> or is there anything I can do just for setting frequency instead of calling the SetupGen2Config function for each frequency?
Please have a look inside the demo implementation of demo_SetupGen2Config(..). This uses STUHFL API calls to setup a default Gen2 setup, including the setup of a frequency list.

 

>> or is there other option for reading tags other than inventory.execute() that can do 10 times reading (for averagig) faster and allow me to read the RSSI from it?
Please use inventory.start(..) and process the received data within the callback whenever a transponder is found. See above the answer to the first question for details.

 

BR

Malvi
Associate II

Hi Nick,

Thank you for your help. I'll be using inventory.start() in my code. Just a quick question: does it include RSSI linear for the signal? Can we extract RSSI linear in frequency hopping mode?

Thanks again!

Malvi
Associate II

To be more precise I am looking for reading the RSSIlinI and RSSIlinQ of a single tag in some frequencies. 
I tried to use the gen2read function to read the specified tag instead of inventorying all tags. but I cannot connect the read data to the RSSIlinI, frequency or etc.

Hello,

To use some specific frequencies it is necessary to setup a frequency list with exact these frequencies.
The FW then hop through these frequencies using the specified hopping strategy and time.

The RSSIlin is measured whenever a transponder reply to a Query command in every slot during the inventory process. This links the measurement to a specific transponder.

If you need to measure the RSSI for only one transponder you have to select this one before running inventory.

BR