python-mercuryapi: reader.Read() invalid argument if bank is set
I’ve gotten to the point where I’m able to read the tags using the reader.Read method.
I create a reader using mercury.Reader("tmr:///COM6")
I set the region to “EU3”
I set the readplan:
rfid_reader.set_read_plan(rfid_reader.get_antennas(), "GEN2")
This works fine, I’m able to get some information from the API for example:
b'303A5E59000000000000DB96'
However, I’d like to get more of the information, so I tried adding the bank parameter to the set_read_plan
function like so:
rfid_reader.set_read_plan(rfid_reader.get_antennas(), "GEN2", "tid")
I’ve also tried adding a list of 1 and a list of multiple bank parameters like so:
rfid_reader.set_read_plan(rfid_reader.get_antennas(), "GEN2", ["tid"])
and
rfid_reader.set_read_plan(rfid_reader.get_antennas(), "GEN2", ["tid", "reserved"])
However, as soon as I set a bank parameter, I get the following error:
Traceback (most recent call last):
File "C:\ti-software\RFID\rfid\app.py", line 38, in start_action
self.read_timer.timeout.connect(self.update_list())
File "C:\ti-software\RFID\rfid\app.py", line 45, in update_list
tags = utils.rfid_read(self)
File "C:\ti-software\RFID\rfid\utils.py", line 42, in rfid_read
temp = mainWindow.rfid_reader.read()
RuntimeError: Invalid argument
just in case it matters, the reader is kept as a property of mainWindow.
I’m using the latest 32 bit release for python 3.6.
Any idea what is going on? Or what I should change to get more data back ?
thanks!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Issue #37: Fix problems caused by an uninitialized memory — committed to gotthardp/python-mercuryapi by gotthardp 6 years ago
I am glad it works.