I'm trying to build an application using the PN7120 chip and the recommended linux_nfc-nci library. It seems that the exposed API does not deal with NDEF records, only whole messages. I do see that the underlying nfc-nci stack has NDEF utilities for managing records, but I am not sure how to access this functionality in my application. Am I missing anything -- is there a way to read and/or write multiple records to/from an NFC tag with linux_nfc-nci?
Follow-up: Are there any suggested workarounds if this functionality isn't available? Reading/writing "raw" commands to the card would seem to work, but the need to do this (e.g. account for different commands for different cards) would dramatically decrease the usability of this library. I'd be surprised if this were the only solution. I appreciate the help.
Solved! Go to Solution.
Hi @ryano ,
Linux libnfc-nci library APIs nfcTag_readNdef and nfcTag_writeNdef handle NDEF message which can then be comprised of one or several NDEF records.
Hope that helps,
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Ah, I see. I was confused because ntag_readNdef returns the type of the first record and the ndef_createXYZ create single records with the ME and MB bits set.
It does seem the API could be friendlier for working with multiple records. For example, expose the ndef_getFriendlyType function so that the type subsequent records can be easily determined. And perhaps a function that could assemble multiple records, setting MB/ME bits properly could be exposed.
Hi @ryano ,
Linux libnfc-nci library APIs nfcTag_readNdef and nfcTag_writeNdef handle NDEF message which can then be comprised of one or several NDEF records.
Hope that helps,
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------