Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPC FAIL TO DECODE #4

Closed
mori94 opened this issue Jun 18, 2018 · 23 comments
Closed

EPC FAIL TO DECODE #4

mori94 opened this issue Jun 18, 2018 · 23 comments

Comments

@mori94
Copy link

mori94 commented Jun 18, 2018

During running, the output is without plot:
UINFO: READER COMMAND DETECTED
INFO: RN16 DECODED
INFO: SEND ACK
INFO: SEND CW
INFO: READER COMMAND DETECTED
INFO: EPC FAIL TO DECODE
INFO: QUERY
INFO: INVENTORY ROUND : 506 SLOT NUMBER : 1
INFO: READER COMMAND DETECTED
INFO: RN16 DECODED
INFO: SEND ACK
INFO: SEND CW
INFO: READER COMMAND DETECTED
INFO: EPC FAIL TO DECODE
INFO: QUERY
INFO: INVENTORY ROUND : 507 SLOT NUMBER : 1

@swadhin
Copy link

swadhin commented Feb 27, 2019

Did you solve the problem ? I am facing similar issue ...

@swadhin
Copy link

swadhin commented Feb 27, 2019

There are many underflows in my attempt. Is that the reason of this failed decoding of EPC ? Do you need specific UHF tags ?

@xcluo
Copy link

xcluo commented Mar 11, 2019

There are many underflows in my attempt. Is that the reason of this failed decoding of EPC ? Do you need specific UHF tags ?

Have you already solved the failed of EPC? I checked the parameters and analyzed its IQ plane, but I got no progress. hope your reply

@swadhin
Copy link

swadhin commented Oct 18, 2019

Did you make any progress regarding this ? Where did you analyze the I/Q plane ?

@ktountas
Copy link
Collaborator

Most of the times "Failed to decode" errors occur when the PC running the code either is not powerful enough or other processes are consuming processing power, violating the protocol timing requirements. My advice is to close everything except GNURadio and try again.

The receiver works regardless of the tags you use, but the read-range highly depends on the tags.

@swadhin
Copy link

swadhin commented Oct 18, 2019

Okay. What is according to you 'powerful' enough PC to run this program ? Is there any need to separate the Tx and Rx antennas to avoid the interference ? I am using SBX daughterboard with 100 mW output power with USRP N2100 board. My gnuradio version is 3.7.11.1. My machine is 8-core, 16GB RAM running Ubuntu 16.04.4 LTS.

@nkargas
Copy link
Owner

nkargas commented Oct 18, 2019

The reader is most likely unable to decode the tags due to latency. These "debug" messages (e.g., INFO: RN16 DECODED, INFO: READER COMMAND DETECTED) should not be displayed in real time execution as mentioned here:

Latency: For real time execution you should disable the output on the terminal. If you see debug messages, you should either install log4cpp or comment the corresponding lines in the source code e.g., GR_LOG_INFO(d_debug_logger, "EPC FAIL TO DECODE");

If you use SBX you should uncomment the line #self.source.set_auto_dc_offset(False) in reader.py file.

If the reader still fails to decode could you please share the figure that you get by plotting the amplitude of the received samples as described in the README file?

@swadhin
Copy link

swadhin commented Oct 18, 2019

Thanks a lot for your detailed reply. I am attaching a figure. Sometimes, it sends all the queries, and some other times it does not send all the queries. In this example, it sent 5 queries and then stopped.

@swadhin
Copy link

swadhin commented Oct 18, 2019

USRP_Record

@swadhin
Copy link

swadhin commented Oct 18, 2019

If I further zoom in, I see this:
USRP_Record2

@nkargas
Copy link
Owner

nkargas commented Oct 19, 2019

If the reader fails to detect a query that was sent then it stops transmitting. Note that the figure you posted is very different than the one included in the misc folder called figure.eps (there are no fluctuations).

I would try to changing the parameters in reader.py file

self.ampl = 0.1
self.freq = 910e6

or the antennas placement.

@swadhin
Copy link

swadhin commented Oct 20, 2019

Thanks a lot for your detailed reply. Can you please tell me the impact of the amplitude parameters in overall transmission regime ? How do I systematically debug the issue to find out the root cause of the issue (in hardware or software) ? Where is the system failing -- the antenna or the daughterboard or the USRP or the connection to PC or the under-power PC or the code parameters ? I have changed the parameter of self.ampl from 0.1 to 0.7 with no difference. Sometimes, it sends 1000 queries, sometimes it stops after a few queries, and sometimes it decodes & stops, and some other time it decodes and completes the full query cycle. Sorry for too many questions.

@xcluo
Copy link

xcluo commented Oct 20, 2019

Maybe my experience can help you. I did this experiment on my laptop with i5 5200U previously and failed to decode epc, then I move to a PC with i5 8400 and make it. Therefore I draw a conclusion that the CPU must possess Turbo Speed faster than 3.2 GHz or the laotop has not enough power to drive this application.
Besides, I encountered the same problem "sometimes it does not send all queries", too. According to my understanding of the code, there is no a timeout mechanism so that when the detect part ignores the fixed low amplitude duration, it will detect this desired wave constantly and can not go on the following queries procedures. To jump out from the infinite loop, you can implement a time mechanism obeying 18000-C protocol.
Wish my experience can help you!

@swadhin
Copy link

swadhin commented Oct 20, 2019

Thanks a lot for your reply. What should be the minimum hardware requirement to make it run in a robust manner ? I am not sure that I fully understand your suggestion about '.. implement a time mechanism obeying 18000-C protocol ...' . Can you please share the code portion or the change you are talking about ?

@swadhin
Copy link

swadhin commented Oct 21, 2019

If the reader fails to detect a query that was sent then it stops transmitting. Note that the figure you posted is very different than the one included in the misc folder called figure.eps (there are no fluctuations).

I would try to changing the parameters in reader.py file

self.ampl = 0.1
self.freq = 910e6

or the antennas placement.

It would be great if anyone can suggest, what I am missing here ? It seems to work for everyone except me :(

@nkargas
Copy link
Owner

nkargas commented Oct 21, 2019

There are two different issues, the underflows (computer issue) and the received waveform (related to the USRP, daughterboard...).

The reader will NOT be able to decode the tag's response given the waveform that you have posted, which is most likely a hardware issue. When the reader is not transmitting a query, you should observe a flat waveform. In your case you can see the reader queries on top of a sinusoid? Have you tried changing the self.freq?

It's been many years since I worked on this but using an RFX, I could decode the tags response just by looking at this figure (in some cases). I know that people have been using the code with an SBX too.

@swadhin
Copy link

swadhin commented Oct 21, 2019

I understand. Thanks a lot. Sorry for too many queries. Now, it is working, albeit intermittently, which can decode a single tag upto 1.5m range. I am attaching the decoded signal figure and the setup figure. However, it is sometimes failing to send all the queries, which may be related to the timing issue luomou97 mentioned. Can you please comment on that ? Furthermore, it is unable to decode two tags simultaneously ? What might be the issue ?
TagCode
setuptags

@nkargas
Copy link
Owner

nkargas commented Oct 21, 2019

To decode multiple tags change const int FIXED_Q so that you increase the number of slots per inventory round and compile again

In global_vars.h:
// Fixed number of slots (2^(FIXED_Q))
const int FIXED_Q = 0;

For the other issue, if something goes wrong in detecting the reader query, the reader will not restart but it will get stuck in an infinite loop. You can probably set reader_state->gen2_logic_status to START if the reader is idle for some seconds.

@swadhin
Copy link

swadhin commented Oct 22, 2019

Thanks a lot for the suggestions. It can now decode multiple tags. However, the decoding and the range are very limited (even after changing different combination of parameters). If I attach an amplifier to the receiver antenna (like this https://www.minicircuits.com/WebStore/dashboard.html?model=ZHL-3010%2B), will this help in increasing the range ?

For the second, do you suggest this to perform in the python application code or the C++ library itself ? Moreover, I also want to understand the code flow in a better way. Can you suggest some resource ? Thanks again.

@nkargas
Copy link
Owner

nkargas commented Oct 24, 2019

I think it would be easier to change the C++ library itself.

@marxwolf
Copy link

@swadhin When everything works, does the program still print U in the terminal? What does U mean here?

@MuhammadZakirKhan
Copy link

MuhammadZakirKhan commented Feb 24, 2022

Thank you @nkargas for the awesome code and a starter for me. I face an issue with multiple tags with their own EPC name instead of Tag ID such as e1 etc 0, 1. How we are able to replace the original tag name?

image

@maybefree
Copy link

@nkargas @MuhammadZakirKhan @swadhin hi, guys. EPC FAIL TO DECODE. I try so many ways to solve. Including adjust the amplitude and using high performance laptop. But I still failed. How did you solve this? Please tell me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants