Comments (12)
Yeah. The bank retrieval is not supported for the continuous reading. This is how the MercuryAPI works. They assume the user first reads all tags (e.g. by the continuous reading) and then makes a targeted request to read the bank data. I think this is because the operation is quite time&energy consuming.
from python-mercuryapi.
I see, so what function should I use if I want to keep track of whats near the antenna every minute, should I use the reader.read() function or reader.start reading and run it for a quick second? What is their difference in terms of printout.
from python-mercuryapi.
The read() is synchronous and can read the bank data. The start_read() is asynchronous, so your python program can continue and do other tasks while scanning. If you don't need the asynchronicity, then the start_read() is of no use for you.
from python-mercuryapi.
@gotthardp Can you post a sample code on how to read user data with the bank parameter?
My Code returns EPC, despite setting the bank in the set_read_plan:
reader.set_read_plan([1], "GEN2", bank=["user"], read_power=1400)
allTags.extend(reader.read(timeout=450))
from python-mercuryapi.
The following works for me
#!/usr/bin/env python3
from __future__ import print_function
import mercury
reader = mercury.Reader("tmr://dev/ttyUSB0", baudrate=115200)
reader.set_region("EU3")
reader.set_read_plan(reader.get_antennas(), "GEN2", "user")
for tag in reader.read(timeout=450):
print("EPC", tag.epc)
print("Antenna", tag.antenna)
print("Count", tag.read_count)
print("RSSI", tag.rssi)
print("user", tag.user_mem_data)
from python-mercuryapi.
Hey @gotthardp
I tried your code. Unfortunately I get the following results:
EPC b'E200001963020091231027DE'
Antenna 1
Count 7
RSSI -37
user bytearray(b'L18100117\r\n\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
EPC b'E2000017230C01961100AA8E'
Antenna 1
Count 7
RSSI -31
user None
As you can see, the second tag does not return user data. That is, if two tags are read at the same time. Both show the correct user data if read seperately.
from python-mercuryapi.
Hi can you post a sample code for the start_reading and what response are you getting? Thanks!
from python-mercuryapi.
The https://github.com/gotthardp/python-mercuryapi/blob/master/test.py contains a sample start_reading code. Do you need something more?
from python-mercuryapi.
Yeah sorry, let me rephrase my question. Basically what I need is a fast continuous read from the m6e that returns tags and its rssi. Can you help me with that? Thanks!
from python-mercuryapi.
When I ran the test.py, I'm getting tag reads however it seems to be inconsistent and doesn't read all of the tags I placed on top of the antenna.
from python-mercuryapi.
You may need more antennas or multiple read attempts if there are many tags. But this is beyond this library.
from python-mercuryapi.
There was a bug fixed in the code, so the original issue has been addressed.
Please open a new issue (one ticket per issue) if you continue having troubles.
from python-mercuryapi.
Related Issues (20)
- Anyone ported this to Micropython HOT 1
- TypeError: No such file or directory (Raspberry Pi)
- Windows Installer based on Python3.6 (32 bits)
- reader.get_connected_ports() always return nothing
- Timeout error - M6e Nano and Raspberry Pi Zero W HOT 4
- Why can't connect over ip+port ?? HOT 2
- Lock & unlock tag ? HOT 2
- SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats HOT 3
- Installation error due to dead link of Jadak API HOT 6
- make error HOT 2
- Python freezes when reader unavailable HOT 2
- Support for powermode HOT 1
- error: subprocess-exited-with-error HOT 4
- Whether to support the chip of E710? HOT 3
- mercuryapi_osx.patch is out of sync with the SDK
- can't build on macos with make
- Can you please update the 'pip install python-mercuryapi' for the new jadak mercury api? HOT 1
- Help reading the tag data HOT 1
- Using this wrapper on new M7E pico dev kit HOT 2
- Question!! How to increase the tag read range? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-mercuryapi.