Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reader beep after card successfully read #1

Open
robinsmidsrod opened this issue Oct 14, 2021 · 1 comment
Open

Make reader beep after card successfully read #1

robinsmidsrod opened this issue Oct 14, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@robinsmidsrod
Copy link
Member

Implement the codes mentioned in this gist to indicate that card UID has been read successfully:

https://gist.github.com/nixme/2717287

@robinsmidsrod robinsmidsrod self-assigned this Oct 14, 2021
@robinsmidsrod robinsmidsrod added the enhancement New feature or request label Oct 14, 2021
@robinsmidsrod
Copy link
Member Author

The relevant parts are these:

# Disable the standard buzzer when a tag is detected (Section 6.7). It sounds
# immediately after placing a tag resulting in people lifting the tag off before
# we've had a chance to read the ID.
card.transmit "\xFF\x00\x52\x00\x00"

# Ask card for UID in APDU format (Section 5.1)
response = card.transmit("\xFF\xCA\x00\x00\x04").unpack('C*')

# Beep and change LED to orange to signal user we've read the tag.
# (Section 6.2)
card.transmit "\xFF\x00\x40\xCF\x04\x03\x00\x01\x01" rescue nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant