gotthardp / python-mercuryapi

Python wrapper for the ThingMagic Mercury API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"RuntimeError: Invalid argument" when i try to set the bank

IbrahimBond opened this issue · comments

OS: ubuntu 18.04
python 3.6
reader model: Izar

here is my code :

` 
#!/usr/bin/env python3
from __future__ import print_function
import time
from datetime import datetime
import mercury

rfid_reader = mercury.Reader("tmr://192.168.1.37", protocol="GEN2")

print(rfid_reader.get_model())
print(rfid_reader.get_supported_regions())


rfid_reader.set_read_plan([1,2,3,4], "GEN2", bank = ["tid"])


while True:
    tag_list=rfid_reader.read(200)    
    for tag in tag_list:
        print (tag,tag.tid_mem_data)
`

error:

Traceback (most recent call last):
 File "reader.py", line 17, in <module>
   tag_list=rfid_reader.read(200)    
RuntimeError: Invalid argument

when i try to connect without setting the bank, it connects fine and i get following results:

b'000000000150786100000000' None
b'33161FABC6020C0000014517' None
b'33161FABC6020C00000BD37F' None
b'33161FABC60208000004E419' None
b'33161FABC602080000144167' None
b'000000000000000000004406' None