-
Notifications
You must be signed in to change notification settings - Fork 7
Update .gitignore, fix import paths in deriveKeys.py, enhance ReadTags.md with Flipper Zero instructions, add decodeValues.py for block decoding, and create requirements.txt for dependencies #5
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
base: main
Are you sure you want to change the base?
Conversation
…s.md with Flipper Zero instructions, add decodeValues.py for block decoding, and create requirements.txt for dependencies
There was a problem hiding this 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 enhances the project's Python tooling and documentation for working with Bambu Lab RFID tags. The changes standardize import paths for cryptographic dependencies, add comprehensive instructions for Flipper Zero users, introduce a new decoder utility for parsing tag data, and establish proper Python project conventions.
Key Changes:
- Fixed import paths in
deriveKeys.pyto use the standardCryptomodule naming convention - Added detailed Flipper Zero workflow documentation in
ReadTags.md - Created
decodeValues.pyscript for decoding and interpreting RFID tag block data
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements.txt | New file specifying pycryptodome as project dependency |
| docs/ReadTags.md | Added comprehensive Flipper Zero usage instructions with step-by-step workflow |
| deriveKeys.py | Updated imports from Cryptodome to Crypto namespace with inline installation comment |
| decodeValues.py | New utility for decoding NFC dump files with typed field parsing for documented blocks |
| .gitignore | Added entries for .nfc files and pycache directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import sys | ||
| from Cryptodome.Protocol.KDF import HKDF | ||
| from Cryptodome.Hash import SHA256 | ||
| from Crypto.Protocol.KDF import HKDF # pip install pycryptodome |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inline comment 'pip install pycryptodome' is redundant since requirements.txt now documents this dependency. Consider removing the inline comment to avoid duplication.
| from Crypto.Protocol.KDF import HKDF # pip install pycryptodome | |
| from Crypto.Protocol.KDF import HKDF |
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| import sys |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sys module is imported twice: once at line 2 and again at line 337. Remove the duplicate import at line 337.
| import sys |
| # Color RGBA (0..3), weight uint16 LE at 4, diameter float LE at 8 | ||
| rgba = ''.join(f"{(b or 0):02X}" for b in bytes_list[0:4]) | ||
| weight = get_uint16_le(bytes_list, 4) | ||
| diameter = get_float32_le(bytes_list, 8) |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The slicing operation [:-2] removes the alpha channel without explanation. Add a comment explaining why the alpha channel is being excluded from the displayed color value.
| diameter = get_float32_le(bytes_list, 8) | |
| diameter = get_float32_le(bytes_list, 8) | |
| # The tag stores RGBA, but the alpha channel is always opaque / not meaningful for users, | |
| # so we display only the RGB portion for readability by dropping the last byte. |
| ... | ||
| ``` | ||
|
|
||
| - **Install keys on the Flipper:** two options |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent capitalization in list items. Change 'two options' to 'Two options' to match the capitalization style of other list items in this section.
| - **Install keys on the Flipper:** two options | |
| - **Install keys on the Flipper:** Two options |
|
This PR seems to have a lot of changes which would be better to review individually. Could you please split this PR into smaller chunks? |
No description provided.