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

Unable to read tag information #10

Closed
kingyxz opened this issue Jan 9, 2020 · 37 comments
Closed

Unable to read tag information #10

kingyxz opened this issue Jan 9, 2020 · 37 comments

Comments

@kingyxz
Copy link

kingyxz commented Jan 9, 2020

My test environment is Ubuntu16.04 + USRP N210 + SBX, the following problems occurred, ask the author for advice.
1
2

@nkargas
Copy link
Owner

nkargas commented Jan 17, 2020

Did you uncomment the line
self.source.set_auto_dc_offset(False)
in reader.py file cd Gen2-UHF-RFID-Reader/gr-rfid/apps ?

What type of antennas are you using? Can you give some information about your setup?

Can you please follow the instructions of the Debugging section and post the output that you get?

@kingyxz
Copy link
Author

kingyxz commented Jan 18, 2020

Testing environment is Ubuntu16.04 + USRP N200 + WBX
I uncomment the line self.source.set_auto_dc_offset(False)
I am using two sucker antennas.In addtion,no other settings have changed
The output of the source folder is as shown below
Ubuntu -2020-01-18-15-08-18

@kingyxz
Copy link
Author

kingyxz commented Jan 18, 2020

The results obtained from each experiment are very different.
Ubuntu -2020-01-15-17-57-52

@marxwolf
Copy link

@kingyxz Do you solve your problem? I am into the same problem.

@marxwolf
Copy link

@nkargas This is my source look like:
source
It looks not like your given figure.eps

@kingyxz
Copy link
Author

kingyxz commented Sep 11, 2020 via email

@marxwolf
Copy link

@kingyxz I already use the circular polarized antennas. It does not work.

@marxwolf
Copy link

This is what happened:

hu@hu:~/rfid/Gen2-UHF-RFID-Reader/gr-rfid/apps$ sudo GR_SCHEDULER=STS nice -n -20 python ./reader.py
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.HEAD-0-gaea0e2de
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 1472 bytes.
[INFO] [X300] Radio 1x clock: 200 MHz
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.929b
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1312 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1306 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
'Q' to quit
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| Execution time : 13 seconds
Uq


| Number of queries/queryreps sent : 1000
| Current Inventory round : 1001

| Correctly decoded EPC : 0
| Number of unique tags : 0

@marxwolf
Copy link

@nkargas Does the code only works for commercial Gen2 RFID Tags with FM0 line coding and 40kHz data rate (BLF)? How can I know my tag is this type or not?

@marxwolf
Copy link

@kingyxz How do you place the antennas and tags? Is it important to make them in the right place and orientation?

@marxwolf
Copy link

marxwolf commented Sep 11, 2020

@nkargas
self.usrp_address_source = "addr=192.168.10.2,recv_frame_size=256"
self.usrp_address_sink = "addr=192.168.10.2,recv_frame_size=256"

Why do you put recv_frame_size=256 here, it cause a problem,
hu@hu:~/rfid/Gen2-UHF-RFID-Reader/gr-rfid/apps$ sudo GR_SCHEDULER=STS nice -n -20 python ./reader.py
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.HEAD-0-gaea0e2de
[INFO] [X300] X300 initialization sequence...
[ERROR] [X300] RuntimeError: System receive MTU size is less than the minimum required by the IP protocol.
[WARNING] [X300] You requested a receive frame size of (256) but your NIC's max frame size is (0).Please verify your NIC's MTU setting using 'ip link' or set the recv_frame_size argument appropriately.UHD will use the auto-detected max frame size for this connection.
[WARNING] [X300] For the 192.168.10.2 connection, UHD recommends a send frame size of at least 1472 for best
performance, but your configuration will only allow 0.This may negatively impact your maximum achievable sample rate.
Check the MTU on the interface and/or the send_frame_size argument.
[WARNING] [X300] For the 192.168.10.2 connection, UHD recommends a receive frame size of at least 1472 for best
performance, but your configuration will only allow 0.This may negatively impact your maximum achievable sample rate.
Check the MTU on the interface and/or the recv_frame_size argument.
[INFO] [X300] Radio 1x clock: 200 MHz
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.929b
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1319 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1313 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
[WARNING] [RFNOC] Assuming max packet size for 0/Radio_0
[WARNING] [RFNOC] Assuming max packet size for 0/Radio_0
[WARNING] [RFNOC] Assuming max packet size for 0/Radio_1
[WARNING] [RFNOC] Assuming max packet size for 0/Radio_1
[WARNING] [RFNOC] Assuming max packet size for 0/DUC_0
[WARNING] [RFNOC] Assuming max packet size for 0/DUC_1
[WARNING] [RFNOC] Assuming max packet size for 0/DmaFIFO_0
[WARNING] [RFNOC] Assuming max packet size for 0/DmaFIFO_0
'Q' to quit
[WARNING] [STREAMER] Requested recv_frame_size of 256 exceeds the maximum possible on this stream. Using 0

So I reset recv_frame_size=1472 or remove it, both works.

Does it affect?

@kingyxz
Copy link
Author

kingyxz commented Sep 15, 2020 via email

@marxwolf
Copy link

@kingyxz Thanks so much. I appreciate your generous help. I have another question, did you print the log information to the file? Did it work? I want to view the log to get more information.

@Wangshuai8156
Copy link

I have a similar problem.Can anyone help me?
My test environment is Ubuntu16.04 + USRP N210 + SBX+two circular polarization antenna.The two antennas are placed side by side with a distance of 70cm. The tags are 50cm away from the antennas.The number of tags often read is 0; Sometimes the tags can be read, but the number of times the EPC is decoded correctly is too few, as shown in the figure below.
image

@marxwolf
Copy link

@Wangshuai8156 Can you show your plotted figure of received signal following the instruction of the debugging?

@Wangshuai8156
Copy link

@Wangshuai8156 Can you show your plotted figure of received signal following the instruction of the debugging?

The source is look like this:
image
The gate is this:
image
The reader is this:
image
The file sink is this:
image
And decoder is empty.Looking forward to your help.Thank you!

@Wangshuai8156
Copy link

Wangshuai8156 commented Sep 29, 2020 via email

@marxwolf
Copy link

In the debugging part, the author provides the ./misc/code/figure.eps ./misc/data/file_source_test, you'd probably to plot your received ./misc/data/source, zoom it and comparing with the plotted ./misc/code/figure.eps and ./misc/data/file_source_test to see the difference.

@marxwolf
Copy link

marxwolf commented Oct 4, 2020

@Wangshuai8156 Try to use different combination of self.ampl and self.tx_gain, I do think there exists magic number for the combination. When you get the magic number, the code can decode all the received EPC successfully.

@Wangshuai8156
Copy link

Wangshuai8156 commented Oct 4, 2020 via email

@Wangshuai8156
Copy link

Wangshuai8156 commented Oct 10, 2020 via email

@marxwolf
Copy link

@Wangshuai8156 The reason why the detection distance is very close is the transmission power. When tag is too far from the antenna, the power cannot activate the tags. You can use linear polarized antenna or power amplifier.
The highest successfully probability is about 85%. Yes, the reason why it cannot reach 100% is also due to the possible power activation. RN16 is actually also not received sometime, but RN16 is random numbers, so the code might think the noise as RN16 here.

@Wangshuai8156
Copy link

Wangshuai8156 commented Oct 11, 2020 via email

@nkargas
Copy link
Owner

nkargas commented Oct 11, 2020

Hello,

Sorry I am not able to provide much help since I now work on a totally different field and it has been 5 years since I implemented this software.

When I implemented and tested the reader I had experimented only with RFX. Since then, many people have contacted me and were able to make the reader work with SBX by a minor modification mentioned in the How to run section.

  • Apart from the three reasons mentioned in the Debugging section, you should also note that the reader may fail to decode the tags because of collisions (the default number of slots at each inventory round is 1). The parameter for controlling the number of slots at each inventory round is located at include/global_vars.h

  • The following is true:
    RN16 is actually also not received sometime, but RN16 is random numbers, so the code might think the noise as RN16 here.
    The reader cannot tell if there exists an RN16 or not. It will always try to decode the received signal.

  • If there are a lot of Os or Us at the terminal this is usually a latency issue. Either the computer needs to drop received samples or it cannot produce samples fast enough. I didn't have logging enabled during real time execution. The easiest way to debug was to check the output of source or matched_filter block by uncommenting the corresponding lines in the reader.py file, plot the results and zoom.

There are some photos (setup+received signal) here: #4
I have also attached two photos with two different setups of mine and an example with a tag collision.

setup_collisions

setup

@Wangshuai8156
Copy link

Wangshuai8156 commented Oct 15, 2020 via email

Repository owner deleted a comment from Timothytrue Oct 19, 2020
@IeohMingChan
Copy link

IeohMingChan commented Jan 23, 2021

@marxwolf hello,Have you solved the log information output problem now?I can't get any log information like "[INFO] XXXXX" neither from the terminal nor the file. According to the author's instructions @nkargas in the README , I need to add a file path to in config.conf to make the log information output to the file, but I didn't see config.conf file. I tried to create a new configuration file named config.conf and add a file path in it, although it can create a new file as I set in the file path, I didn't get any log information. Is there any requirement for the format of the log information output file? I've tried . txt, no suffix and . log in the file path, but they all don't work. Looking forward for your reply! Thank you very much!

@IeohMingChan
Copy link

IeohMingChan commented Jan 23, 2021

@nkargas Hello Kargas,Thank you very much for providing me with this precious code, and I'm sorry to disturb you after five years. My current hardware is USRP N210 motherboard, UBX-40 daughter board and two VERT900 antennas. I encountered the same problem as before, that is, the terminal continuously outputs "U". should I first consider replacing the hardware? Should I replace the antenna or the daughter board first? Here is my source file when the terminal output two "U":
source1
And here is the set up:
1

Thank you very much !

@marxwolf
Copy link

@marxwolf hello,Have you solved the log information output problem now?I can't get any log information like "[INFO] XXXXX" neither from the terminal nor the file. According to the author's instructions @nkargas in the README , I need to add a file path to in config.conf to make the log information output to the file, but I didn't see config.conf file. I tried to create a new configuration file named config.conf and add a file path in it, although it can create a new file as I set in the file path, I didn't get any log information. Is there any requirement for the format of the log information output file? I've tried . txt, no suffix and . log in the file path, but they all don't work. Looking forward for your reply! Thank you very much!

As I remember, I found a solution online. You need to add two lines in the CMakeLists.txt in the file root directory

include(GrMiscUtils)
GR_LOGGING()

I add them in the line 101, 102.
I hope this can help.

@IeohMingChan
Copy link

@marxwolf It works, thank you very much! But the Tag ID I get is always 0, can you get the actual EPC Code of the tag? Thank you again for your help and best wishes for you!

@marxwolf
Copy link

marxwolf commented Feb 5, 2021

@marxwolf It works, thank you very much! But the Tag ID I get is always 0, can you get the actual EPC Code of the tag? Thank you again for your help and best wishes for you!

Yes, the EPC id value output by the author is not the standard EPC id. I think he just wants to distinguish them. So if you read the code carefully, you might find in tag_decoder_impl.cc file, the vector EPC_bits stores the EPC id. You may also need to find the start index of the EPC id in EPC_bits.
I hope this helps.

@mariorioMa
Copy link

I have encountered a problem that cannot be solved. I use USRPX310 to read tag. The enviroment is Ubuntu18.04, UHD version is 3.10.3, and Gnuradio version is 3.7.13.
There are no errors when I cmake the module of Gen2. When i run the code, the terminal does not display information such as gr::log:INFO. The terminal situation is as follows.

Screenshot 2021-04-15 21:18:51
Screenshot 2021-04-15 21:02:17

@fabriziogiuliano
Copy link

@nkargas Hello Kargas,Thank you very much for providing me with this precious code, and I'm sorry to disturb you after five years. My current hardware is USRP N210 motherboard, UBX-40 daughter board and two VERT900 antennas. I encountered the same problem as before, that is, the terminal continuously outputs "U". should I first consider replacing the hardware? Should I replace the antenna or the daughter board first? Here is my source file when the terminal output two "U": source1 And here is the set up: 1

Thank you very much !

Same issue from my side with similar configuration, I'm using B210

@nkargas nkargas closed this as completed Mar 1, 2022
@ZDeeQ
Copy link

ZDeeQ commented Oct 26, 2022

@nkargas Hello Kargas,Thank you very much for providing me with this precious code, and I'm sorry to disturb you after five years. My current hardware is USRP N210 motherboard, UBX-40 daughter board and two VERT900 antennas. I encountered the same problem as before, that is, the terminal continuously outputs "U". should I first consider replacing the hardware? Should I replace the antenna or the daughter board first? Here is my source file when the terminal output two "U": source1 And here is the set up: 1

Thank you very much !

Hi @IeohMingChan ! How do you solve this prolem? I'am facing the same problem with the same configuration and hope you help. Looking forward to your reply!

@ZDeeQ
Copy link

ZDeeQ commented Oct 26, 2022

@nkargas Hello Kargas,Thank you very much for providing me with this precious code, and I'm sorry to disturb you after five years. My current hardware is USRP N210 motherboard, UBX-40 daughter board and two VERT900 antennas. I encountered the same problem as before, that is, the terminal continuously outputs "U". should I first consider replacing the hardware? Should I replace the antenna or the daughter board first? Here is my source file when the terminal output two "U": source1 And here is the set up: 1
Thank you very much !

Same issue from my side with similar configuration, I'm using B210

Hi @fabriziogiuliano ! I meet the same problem. Have you ever solved it? I'll appreciate it a lot if you could give me a favor.

@XGBL
Copy link

XGBL commented Nov 2, 2022

@Wangshuai8156你能按照调试说明显示你的接收信号曲线图吗?

源代码看起来是这样: image大门是这样的: image读者是这样的: image文件接收器是这样的: image解码器是空的。期待您的帮助。谢谢大家!

Hello, the reader file cannot be printed successfully. Can you help me?

@ForIn2you
Copy link

@nkargas Hello Kargas,Thank you very much for providing me with this precious code, and I'm sorry to disturb you after five years. My current hardware is USRP N210 motherboard, UBX-40 daughter board and two VERT900 antennas. I encountered the same problem as before, that is, the terminal continuously outputs "U". should I first consider replacing the hardware? Should I replace the antenna or the daughter board first? Here is my source file when the terminal output two "U": source1 And here is the set up: 1
Thank you very much !

Same issue from my side with similar configuration, I'm using B210

Hi @fabriziogiuliano ! I meet the same problem. Have you ever solved it? I'll appreciate it a lot if you could give me a favor.

Hi @ZDeeQ ! I am also trying to use B210 to complete the configuration. Have you implemented the design using B210? I would like to ask you some questions, and I would greatly appreciate it if you could help me!

@U201213632
Copy link

@fabriziogiuliano @ForIn2you @ZDeeQ I am also trying to use B210 to implement RFID READER. However, it always fails to read the tag. Any suggestions? Thanks a lot.

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