python-mercuryapi
python-mercuryapi copied to clipboard
Question : Targetting several tags
Hello,
Is it possible to target more than one tag with the function set_read_plan ?
Thank you,
Pierre
Hello. It is not possible at this moment, unfortunately.
Ok, thank you very much !
I will keep this issue open until it is fixed. (No date promised.)
Question: Does somebody need this, or it it just a nice to have feature?
It could be nice to have the feature because targetting a tag is much more efficient and faster than reading all tags and searching for the good ones !
Hello again. I finally understood and implemented the multi-filters, but it's a bit complicated, so I am not sure if I got the API right. Have a look and let me know what you think.
Thank you very much for your work and sorry to answer lately. I achieved to create a filter and to apply it with the function set_read_plan() but after that, the function reader.read() does not work anymore (with the error "Unsupported operation"). Do you know where this error comes from ? Shall I use asynchronous reading ?
Hello. This used to be a problem of one of the previous commits. Please get the very latest code (comited few secs ago), build it and don't forget to install it. The error shall disappear.
Re, I reinstall twice the wrapper but I still have the same issue. I may make a mistake, here my two-lign code :
epc_targets = [{'epc':b'1', 'bit':32}, {'epc':b'2', 'bit':32}]
reader.set_read_plan([1], 'GEN2',epc_targets, bank = ['epc'], read_power = 2900 )
reader.read()
Thank you !
This b'1'
and b'2'
is what you really use?
No no it was just an example in order to make my code clearer
My code is
reader.set_read_plan(reader.get_antennas(), "GEN2", bank=["epc"], epc_target=[{'epc':b'000000000000221612000631'}, {'epc':b'000000000000228510000023'}])
or even
reader.set_read_plan(reader.get_antennas(), "GEN2", bank=["epc"], epc_target=[b'000000000000221612000631',b'000000000000228510000023'])
Hello ! Sorry, I forgot to answer you but thanks a lot, it is now working for me ! But, when I try to select more than 3 tags, I get the same error as before. Here is my code :
reader.set_read_plan([1],'GEN2', bank=['epc'], epc_target = [b'201909180000000000000006', b'201909180000000000000008', b'201909180000000000000002', b'201909180000000000000010']) reader.read()
And I get the error : RuntimeError : Unsupported operation
Thank you in advance