gotthardp / python-mercuryapi

Python wrapper for the ThingMagic Mercury API
MIT License
124 stars 63 forks source link

Way of getting more readings per second #154

Open maddy81 opened 1 month ago

maddy81 commented 1 month ago

I have the following python script to get number of readings per second on m6e devkit. I am getting maximum of 25 readings per second. How can I increase the number of readings? How to tune it to get more readings?

My script:

import mercury import numpy as np

reader = mercury.Reader("tmr:///dev/ttyUSB0") reader.set_region("EU3") #EU3

reader.set_read_plan([1], "GEN2", read_power=1900)

freqs = np.linspace(902, 928, num=27) tagToDetect = b'000000000000000000000000' #First one

tagToDetect = b'AAAAAAAAAAAAAAAAAAAA0312' #Big one

tagToDetect = b'3039606243727D80001BA292' #Decathlon one

for x in range(10): for f in freqs: reader.set_read_plan([1], "GEN2", epc_target = tagToDetect, read_power=1000) #Max valeur 33 dBm donc 3300 cmdBm

tags = reader.read(timeout=1000) #To read during 1s

epcs = map(lambda t: t.epc, tags)
print(list(epcs))
read_counts = map(lambda t: t.read_count, tags)
print(list(read_counts))