Skip to content

Commit 93b51b3

Browse files
committed
r1.4.4
1 parent 9fb4411 commit 93b51b3

9 files changed

Lines changed: 43 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Release Notes
22
#############
33

4+
1.4.4
5+
=====
6+
7+
:Release Date: 2026-01-29
8+
9+
* Fixed error when detecting legacy readers using the ‘detect_reader’ method
10+
411
1.4.3
512
=====
613

@@ -193,4 +200,4 @@ Supports following Metratec rfid readers:
193200

194201
* PulsarMX
195202

196-
* PulsarLR
203+
* PulsarLR

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ cd rfid-sdk-python
4646
Preferably check out a release version (see [Github tags](https://github.com/metratec/rfid-sdk-python/tags)), for example:
4747

4848
```
49-
git checkout r1.4.3
49+
git checkout r1.4.4
5050
```
5151

5252
Install the *metratec_rfid* library:
@@ -58,7 +58,7 @@ python -m pip install .
5858
Alternatively, install a specific version from Github directly:
5959

6060
```
61-
python -m pip install git+https://github.com/metratec/rfid-sdk-python@r1.4.3
61+
python -m pip install git+https://github.com/metratec/rfid-sdk-python@r1.4.4
6262
```
6363

6464
## Usage

docs/source/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
Release Notes
44
#############
55

6+
1.4.4
7+
=====
8+
9+
:Release Date: 2026-01-29
10+
11+
* Fixed error when detecting legacy readers using the ‘detect_reader’ method
12+
613
1.4.3
714
=====
815

metratec_rfid/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# from .connection.serial_connection import SerialConnection
99
# from .connection.socket_connection import SocketConnection
1010

11-
__version__ = "1.4.3"
11+
__version__ = "1.4.4"
1212
__email__ = "neumann@metratec.com"
1313
__license__ = "MIT License"
1414
__author__ = "Matthias Neumann"

metratec_rfid/reader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,10 @@ async def _config_device(self) -> None:
539539
self.get_logger().warning(msg)
540540
self._update_status(self.ERROR, msg)
541541
# try reconfigure after 5 seconds
542-
await asyncio.sleep(5)
542+
try:
543+
await asyncio.sleep(5)
544+
except asyncio.CancelledError:
545+
return
543546
self._task_config = asyncio.ensure_future(self._config_device())
544547

545548
def _send_not_connected(self, data: str) -> None:

metratec_rfid/reader_ascii.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,22 @@ def _data_received_config(self, data: str, timestamp: float) -> None:
420420
return
421421
self._add_data_to_receive_buffer(data)
422422

423+
# @override
424+
# default implementation...
425+
def _data_received(self, data: str, timestamp: float):
426+
# disable 'Too many return statements' warning - pylint: disable=R0911
427+
self.get_logger().debug("data received %s", data.replace(
428+
"\r", "<CR>").replace("\n", "<LF>"))
429+
data = data[:-1]
430+
if data[0] == 'H' and data[2] == 'T': # HBT
431+
return
432+
if len(data) >= 10 and data[-6:-3] == 'IVF':
433+
self._parse_inventory(data)
434+
if self._custom_command:
435+
self._add_data_to_receive_buffer(data)
436+
return
437+
self._add_data_to_receive_buffer(data)
438+
423439
async def _prepare_reader_communication(self) -> None:
424440
"""Override for prepare the reader for the communication"""
425441
# disable Too many branches warning - pylint: disable=R0912
@@ -486,8 +502,8 @@ async def _send_recv_command(self, command: str, *parameters) -> str:
486502
try:
487503
return await self._recv()
488504
except TimeoutError as err:
489-
raise TimeoutError("no reader response for command " + command + " " +
490-
" ".join(str(x) for x in parameters)) from err
505+
raise RfidReaderException("no reader response for command " + command + " " +
506+
" ".join(str(x) for x in parameters)) from err
491507
finally:
492508
self._communication_lock.release()
493509

metratec_rfid/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ async def detect_readers(port_re="USB", verbose=False, legacy=False):
8585
try:
8686
await reader.connect(timeout=3.0)
8787
info = await reader.get_reader_info()
88-
await reader.disconnect()
8988
break
9089
except RfidReaderException as e:
9190
# connection failed or unexpected reader info
9291
print(e) if verbose else lambda: None
92+
finally:
93+
await reader.disconnect()
9394

9495
# create reader object from firmware name
9596
if info is None:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# This call to setup() does all the work
1717
setup(
1818
name="metratec_rfid",
19-
version="1.4.3",
19+
version="1.4.4",
2020
description="Metratec RFID SDK",
2121
long_description=long_description,
2222
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)