So, as far as I can see, almost completely separate from ATRs and APDUs is another standard for NFC called NDEF, and this is what Android seems to think of when you mention NFC. Having said that, now I am more familiar with the alphabet soup of NFC operations, I can see that in the section on Host Card Emulation it talks about ISO 7816 and "APDUs".
My instinct has been - and remains - that what I really want to do is to use NDEFs, and that means that I still need to figure out how to get my card reader to issue NDEF requests. Interestingly, Appendix A of the ACR 1552U reference guide which is on the very last page gives a sample "NDEF Message". Apart from being largely context-free, not to mention confusing by seeming to have two NDEF messages wrapped inside each other, it suggests that my reader does know something about NDEF.
Searching through the document for NDEF turns up Section 6.1.13.10 (I kid you not) which has the following to say for itself:
The command set is to trigger ACS website https://www.acs.com.hk by using ACR1552U to emulate as the NFC forum type 2 tag mode. The steps are showed below:
1. Enter the card emulation mode with below command:
E0 00 00 40 03 02 00 00
E0 00 00 60 1C 01 02 00 18 E1 10 F4 00 03 0F D1 01 0B 55 02 61 63 73 2E 63 6F 6D 2E 68 6B FE 00 00
For more detailed information and specifications related to the NDEF (NFC Data Exchange Format), I would recommend referring to the NDEF specification. It provides comprehensive guidelines and details about the structure and usage of NDEF records, which are commonly used in NFC data exchange. The NDEF specification will provide a deeper understanding of how to interpret and utilize the NDEF command and data in the context of the ACR1552U device.
if script == "" {where runScript does the following:
return runInteractive(card)
}
return runScript(card, script)
scanner := bufio.NewScanner(file)So, I created a new directory scripts and then put the following in the file scripts/launchWeb.apdu:
for scanner.Scan() {
fmt.Println("")
err := processCommand(card, scanner.Text(), true)
if err != nil {
fmt.Printf("error: %s\n", err)
continue
}
}
E0 00 00 40 03 02 00 00And then I can update my launch.json:
E0 00 00 60 1C 01 02 00 18 E1 10 F4 00 03 0F D1 01 0B 55 02 61 63 73 2E 63 6F 6D 2E 68 6B FE 00 00
>> E0 00 00 40 03 020000Oh, well. 6E00 means "class not supported". Not that I'm sure what that actually means in this context. It seems bizarre that it would complain when I believe the first command is just to ask the reader to go into emulation mode and that is what the documentation for my reader says should be supported.
<< 6E00
>> E0 00 00 60 1C 01020018E110F400030FD1010B55026163732E636F6D2E686BFE0000
<< 6E00
On the other hand, it's possible that this is coming indirectly from the phone. Let's try it with another card and see what happens:
>> E0 00 00 40 03 020000So, indeed, with my phone I have "class not supported" but with the room key I get "function not supported". So it must be making a round trip. So the next thing would be to understand what is meant by "class not supported". But I'm not really sure I'm getting anywhere here.
<< 6A81
>> E0 00 00 60 1C 01020018E110F400030FD1010B55026163732E636F6D2E686BFE0000
<< 6A81
No comments:
Post a Comment