Read/Write NDEF message composed of multiple records with linux_nfc-nci

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Read/Write NDEF message composed of multiple records with linux_nfc-nci

ソリューションへジャンプ
2,146件の閲覧回数
ryano
Contributor I

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.

ラベル(1)
0 件の賞賛
返信
1 解決策
2,129件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,102件の閲覧回数
ryano
Contributor I

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.

0 件の賞賛
返信
2,130件の閲覧回数
Kan_Li
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

0 件の賞賛
返信