Skip to main content

Python driver for Phychips RED-RCP UHF RFID readers

Project description

redrcp

PyPI - Version PyPI - Python Version OS


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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redrcp-1.2.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

redrcp-1.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file redrcp-1.2.0.tar.gz.

File metadata

  • Download URL: redrcp-1.2.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for redrcp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 78997ce9bbdf112f6247dc9376402c979a6d2a47b1f78c40bb79de7a3cf4f5b9
MD5 f1c6d89a8baed0ce6d1e436d6936b996
BLAKE2b-256 7afe3ce247d26e8747ea64fb85501ede769320f50a9faeb258e563f37c959510

See more details on using hashes here.

File details

Details for the file redrcp-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: redrcp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for redrcp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85b3ac7d20e4ba18a2c7a2b9705db0e6bf02bc245f9ccfacc6f5d6ae19da59d2
MD5 dc2b84a5e156e8f8157844a44e03c195
BLAKE2b-256 8b7d8530278000e6bc59ffce2c10b5b023c1082e04876891e0aa1af89d41eb5d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page