A simple NFC tag reader/writer in Python.
Tested with the SONY RC-S380 NFC reader/writer.
You will need:
- SONY RC-S380 NFC reader/writer
- Python 2.7
- The nfc library
- The ndef library
Step one: There are two libraries you'll need to install using pip
.
pip install nfcpy
pip install ndeflib
Step Two: Then simply clone the repository.
git clone https://github.com/bill-feng/nfc-rw.git
python nfc-rw.py
- Plug in the RC-S380 into your usb port
- Run the script
- Place NFC tag on the RC-S380
- Choose action by typing a letter and pressing enter
- When you're done, eject the tag
- Remove tag from the RC-S380
Contorl + c
to end script or place another tag on the device to continue
key | name | action |
---|---|---|
d | Dump | Dumps the raw data stored in the tag to console without any formatting |
e | Eject | Lets the script know you want to remove the tag before doing so |
f | Format | Overwrites all the data stored in the tag with 0 s |
i | Identify | Logs the tag type and product name to console |
r | Read | Prints formatted records stored in the tag to console |
w | Write | Writes the text inside payload.txt as a text record to tag |