How do I write an NDEF message that has two or more records?
I would like to write to my NFC tag an NDEF message that contains two ore more records. For example, I would like to write a WiFi and a Text records to my tag. Of course I'll be limited by the amount of available space on the NFC tag.
I have successfully able to write one record with the following code:
import nfc
from time import sleep
import time
clf = nfc.Contactless
print(clf)
def connected(tag): print tag
""" Wait for NFC tag """
timeOut = lambda: time.time() - started > (10)
started = time.time()
myNfcTag = clf.connect(
myMsg = nfc.ndef.
myMsg.text = "This is a test..."
print(myMsg.
myNfcTag.
clf.close()
Unfortunately I haven't found a way to write multiple records.
Please help!!!
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- nfcpy Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Juan Trujillo for more information if necessary.