Skip to content

Add ISO 15693 cmds#14

Merged
bofh69 merged 2 commits intomainfrom
add-better-iso15639-support
Jan 5, 2026
Merged

Add ISO 15693 cmds#14
bofh69 merged 2 commits intomainfrom
add-better-iso15639-support

Conversation

@bofh69
Copy link
Owner

@bofh69 bofh69 commented Jan 5, 2026

Adds commands to read and write to ISO 15639 cards' memory.

@bofh69 bofh69 requested a review from Copilot January 5, 2026 20:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds ISO 15693 card communication capabilities to the PN5180-tagomatic library. The changes enable reading and writing memory on ISO 15693 RFID cards by implementing new commands and a card interface class.

Key Changes:

  • Added ISO15693Card class with methods for reading/writing memory and retrieving system information
  • Implemented ISO 15693 request/response helpers (send_15693_request, send_and_receive_15693)
  • Added connect_iso15693 method to establish card sessions

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/pn5180_tagomatic/iso15693.py New file implementing ISO15693Card class with memory read/write operations
src/pn5180_tagomatic/proxy.py Added ISO 15693 protocol helpers and pylint disable comments
src/pn5180_tagomatic/session.py Added connect_iso15693 method and refactored inventory to use new helpers
src/pn5180_tagomatic/constants.py Added ISO 15693 command constants
src/pn5180_tagomatic/init.py Exported ISO15693Card class
examples/iso_15693-update-memory.py Example demonstrating ISO 15693 memory operations
src/pn5180_tagomatic/pn5180.py Updated copyright year only

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bofh69 bofh69 force-pushed the add-better-iso15639-support branch 2 times, most recently from d941f95 to ecad165 Compare January 5, 2026 20:12
@bofh69 bofh69 requested a review from Copilot January 5, 2026 20:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bofh69 bofh69 force-pushed the add-better-iso15639-support branch 2 times, most recently from 22a0836 to 95464ac Compare January 5, 2026 20:16
@bofh69 bofh69 requested a review from Copilot January 5, 2026 20:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bofh69 bofh69 force-pushed the add-better-iso15639-support branch 2 times, most recently from c8baab2 to f932f5d Compare January 5, 2026 20:27
Copy link
Contributor

Copilot AI commented Jan 5, 2026

@bofh69 I've opened a new pull request, #15, to work on those changes. Once the pull request is ready, I'll request review from you.

@bofh69 bofh69 force-pushed the add-better-iso15639-support branch from 187300f to c2e90cf Compare January 5, 2026 20:38
@bofh69 bofh69 requested a review from Copilot January 5, 2026 20:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +140 to +150
GET_SYSTEM_INFORMATION = 0x2B
GET_MULTIPLE_BLOCK_SECURITY_STATUS = 0x2C
INVENTORY = 0x01
LOCK_BLOCK = 0x22
READ_SINGLE_BLOCK = 0x20
READ_MULTIPLE_BLOCKS = 0x23
RESET_TO_READY = 0x26
SELECT = 0x25
STAY_QUIET = 0x02
WRITE_SINGLE_BLOCK = 0x21
WRITE_MULTIPLE_BLOCKS = 0x24
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum members should be sorted consistently. Consider sorting alphabetically or by command value for better maintainability and readability.

Suggested change
GET_SYSTEM_INFORMATION = 0x2B
GET_MULTIPLE_BLOCK_SECURITY_STATUS = 0x2C
INVENTORY = 0x01
LOCK_BLOCK = 0x22
READ_SINGLE_BLOCK = 0x20
READ_MULTIPLE_BLOCKS = 0x23
RESET_TO_READY = 0x26
SELECT = 0x25
STAY_QUIET = 0x02
WRITE_SINGLE_BLOCK = 0x21
WRITE_MULTIPLE_BLOCKS = 0x24
INVENTORY = 0x01
STAY_QUIET = 0x02
READ_SINGLE_BLOCK = 0x20
WRITE_SINGLE_BLOCK = 0x21
LOCK_BLOCK = 0x22
READ_MULTIPLE_BLOCKS = 0x23
WRITE_MULTIPLE_BLOCKS = 0x24
SELECT = 0x25
RESET_TO_READY = 0x26
GET_SYSTEM_INFORMATION = 0x2B
GET_MULTIPLE_BLOCK_SECURITY_STATUS = 0x2C

Copilot uses AI. Check for mistakes.
frame += uid[::-1]
frame += parameters

# print(f"Sending frame {frame.hex(' ')}")
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out debug print statement should be removed or converted to proper logging for production code.

Copilot uses AI. Check for mistakes.
@bofh69 bofh69 merged commit e8aadba into main Jan 5, 2026
21 checks passed
@bofh69 bofh69 deleted the add-better-iso15639-support branch January 6, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants