2023-07-20 11:27 AM
Hello,
I am currently working with the ST25RU3993 SDK in C language to develop a program that retrieves RSSI linear in I and Q mode. However, I've encountered an issue where the RSSI linear values remain constant every time I run the code. I could use some assistance in resolving this problem. Would you be able to provide some guidance? Thank you.
This is my code:
STUHFL_T_Gen2_QueryMeasureRssi queryMeasureRssi[1] = { STUHFL_O_GEN2_QUERY_MEASURE_RSSI_INIT() };
setupGen2Config(false, true, STUHFL_D_ANTENNA_1);
Gen2_Inventory(&invOption, &invData);
demo_gen2Select(invData.tagList[0].epc.data, invData.tagList[0].epc.length);
Gen2_QueryMeasureRssi(&queryMeasureRssi);
int RSSIlinI = queryMeasureRssi->rssiLinI[0];
int freq = queryMeasureRssi->frequency;
int RSSIlinQ = queryMeasureRssi->rssiLinQ[0];
printf("freq= %d", freq);
printf("RSSI_I= %d", RSSIlinI);
printf("- RSSI_Q= %d\n", RSSIlinQ);
Solved! Go to Solution.
2023-08-11 05:40 AM
Hello,
thanks for your code snippet. I tested it and would have the following comments to resolve your problems.
1. Please note that the frequency you select when calling setupGen2Config is different then the frequency that is selected with the QueryMeasure command. Please use here the same frequency, otherwise you perform the QueryMeasureRssi command with a frequency that is not tuned upfront.
2. The values RSSILin = -1 and RSSILog = 15 indicate that no transponder was inventoried and no RSSI measurement happend. The reason for this is explained below.
3. As the QueryMeasureRSSI command does not have an option to specify the Sel flags for the underlaying query command it is not possible to use Gen2_Select with target = SL.
But it is possible to globally specify the session with Gen2_InventoryCfg and then use the Gen2_Select command with session S0 instead of setting the target SL flag.
Please find attached an updated version of the function "void myRSSI(void)". The measurement runs in an infinite loop and if you move the transponder the RSSI values should change.
BR
2023-07-28 05:25 AM
Hello,
I can not reproduce this on my side yet. I have a few questions regarding
BR
2023-07-31 03:52 PM
Hello Nick,
1. Yes, I am using the V3.2.1 release.
2. No, I have not applied any modifications to the board, and it works fine with ST reader software, Python code or even the Gen2Inventory function of the C code, but when I use querrymeasure RSSI function, I only receive -1 for RSSI linear and 15 for RSSI log. while I get different values when I use the Gen2Inventory function or Python code.
I have attached my C code and the result of my software for your reference.
As my Python code is working on windows is there any proper way of deploying it on Raspberry Pi?
2023-08-11 05:40 AM
Hello,
thanks for your code snippet. I tested it and would have the following comments to resolve your problems.
1. Please note that the frequency you select when calling setupGen2Config is different then the frequency that is selected with the QueryMeasure command. Please use here the same frequency, otherwise you perform the QueryMeasureRssi command with a frequency that is not tuned upfront.
2. The values RSSILin = -1 and RSSILog = 15 indicate that no transponder was inventoried and no RSSI measurement happend. The reason for this is explained below.
3. As the QueryMeasureRSSI command does not have an option to specify the Sel flags for the underlaying query command it is not possible to use Gen2_Select with target = SL.
But it is possible to globally specify the session with Gen2_InventoryCfg and then use the Gen2_Select command with session S0 instead of setting the target SL flag.
Please find attached an updated version of the function "void myRSSI(void)". The measurement runs in an infinite loop and if you move the transponder the RSSI values should change.
BR