redrcp
Python driver for Phychips RED-RCP UHF RFID readers
Table of Contents
Installation
pip install redrcp
Usage
Connect to the reader
# Create driver
reader = RedRcp()
# Connect
reader.connect(connection_string='COM3') # windows
#reader.connect(connection_string='/dev/ttyUSB0') # linux
#reader.connect(connection_string='/dev/tty.usbserial-001') # macos
... use the reader ...
# Disconnect reader
reader.disconnect()
Get basic information about the reader
manufacturer = reader.get_info_manufacturer()
fw_version = reader.get_info_fw_version()
model = reader.get_info_model()
details = reader.get_info_detail()
Sample response values:
manufacturer = 'PHYCHIPS'
fw_version = 'RED4S_v2.2.1_K'
model = 'R4S5U1DK-E'
details = ArgumentsReaderInformationDetail(region=<Region.Europe: 49>, channel=13, read_time=380, idle_time=100, cw_sense_time=5, lbt_rf_level=-74.0, current_tx_power=27.0, min_tx_power=13.0, max_tx_power=27.0, BLF=250, modulation=<ParamModulation.MILLER_4: 2>, DR=<ParamDR.DR_64_DIV_3: 1>)
Configure the reader
# Set TX power level
logging.info('Setting max TX power')
reader.set_tx_power(details.max_tx_power)
tx_power: float = reader.get_tx_power()
Perform continuous asynchronous inventory
# Define callback
def notification_callback(tag: NotificationTpeCuiii):
logging.info(tag)
# Configure the callback
reader.set_notification_callback(notification_callback=notification_callback)
# Start inventory stream
reader.start()
# Do other stuff
time.sleep(.5)
# Stop inventory stream
reader.stop()
Sample report:
NotificationTpeCuiii(pc=bytearray(b'0\x00'), epc=bytearray(b'0\x083\xb2\xdd\xd9\x01@\x00\x00\x00\x00'))
Execute Read/Write operations
reader.write(epc='010203040506070809101112', # or bytearray
target_memory=ParamMemory.USER,
word_pointer=0,
data='1234') # or bytearray
data: bytearray = reader.read(epc='010203040506070809101112', # or bytearray
target_memory=ParamMemory.USER,
word_pointer=0,
word_count=1)
License
redrcp is distributed under the terms of the MIT license.
Metadata
Release files for redrcp 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| redrcp-1.2.0.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redrcp-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / redrcp-1.2.0.tar.gz
| Download URL | redrcp-1.2.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78997ce9bbdf112f6247dc9376402c979a6d2a47b1f78c40bb79de7a3cf4f5b9
|
|
BLAKE2b-256 checksum How to use checksums |
7afe3ce247d26e8747ea64fb85501ede769320f50a9faeb258e563f37c959510
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / redrcp-1.2.0-py3-none-any.whl
| Download URL | redrcp-1.2.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85b3ac7d20e4ba18a2c7a2b9705db0e6bf02bc245f9ccfacc6f5d6ae19da59d2
|
|
BLAKE2b-256 checksum How to use checksums |
8b7d8530278000e6bc59ffce2c10b5b023c1082e04876891e0aa1af89d41eb5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|