GithubHelp home page GithubHelp logo

Comments (12)

gotthardp avatar gotthardp commented on June 9, 2024

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.

atlasagencyca avatar atlasagencyca commented on June 9, 2024

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.

gotthardp avatar gotthardp commented on June 9, 2024

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.

rasidmusic avatar rasidmusic commented on June 9, 2024

@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))

#49

from python-mercuryapi.

gotthardp avatar gotthardp commented on June 9, 2024

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.

rasidmusic avatar rasidmusic commented on June 9, 2024

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.

jhuncamit avatar jhuncamit commented on June 9, 2024

Hi can you post a sample code for the start_reading and what response are you getting? Thanks!

from python-mercuryapi.

gotthardp avatar gotthardp commented on June 9, 2024

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.

jhuncamit avatar jhuncamit commented on June 9, 2024

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.

jhuncamit avatar jhuncamit commented on June 9, 2024

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.

gotthardp avatar gotthardp commented on June 9, 2024

You may need more antennas or multiple read attempts if there are many tags. But this is beyond this library.

from python-mercuryapi.

gotthardp avatar gotthardp commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.