scard icon indicating copy to clipboard operation
scard copied to clipboard

read NDEF URI attribute

Open andrewarrow opened this issue 6 years ago • 2 comments

Thanks for this repo, I got example running:

Found 1 readers:
[0] ACS ACR122U PICC Interface
Waiting for a Card
Connecting to card in  ACS ACR122U PICC Interface
Card status:
	reader: ACS ACR122U PICC Interface
	state: 54
	active protocol: 2
	atr: 3b 80 80 01 01
Transmit:
	c-apdu: 00 a4 00 0c 02 3f 00
	r-apdu: 6a 82

But wondering, how do I read the NDEF URI tag my device is sending. Is that a call to transmit with some payload or a simpler way?

andrewarrow avatar Sep 04 '19 23:09 andrewarrow

There is no explicit support for the NDEF messages/records. While you can communicate with the tag through Card.Transmit, you would have to implement the spec yourself. This is a non-trivial amount of work though. libnfc might be the easier choice. I seem to remember there was a go wrapper for it, but i can't find it right now.

ebfe avatar Sep 05 '19 00:09 ebfe

ah thank you, I think I'm close with https://github.com/hsanjuan/go-nfctype4/blob/master/device_test.go#L137 just need to make a device and call their Read.

andrewarrow avatar Sep 05 '19 01:09 andrewarrow