-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
The documentation has an example here of how to install the tiny app variant using param data:
user@host:~$ java -jar gp.jar \
-applet D2760000850101 \
-params 100BD101075402656E54657374 \
-install build/javacard/javacard-ndef-tiny.cap
(Install tiny variant with static text "Test")
What is the leading byte of the param data here? Is the param itself a TLV?
| Type | Length | Value | ... | ... | ... | ... | ... | ... |
|---|---|---|---|---|---|---|---|---|
| TNF: Type Name Format | Type Length | Payload Length | Type | |||||
| 0x10 | 0x0B | 0xD1 | 0x01 | 0x07 | 0x54 | 0x02 | 0x65 0x6E | 0x54657374 |
| 11 bytes | 0b11010001 | 1 byte | 7 bytes | T | en | Test |
When I use this python code to generate an NDEF, I only get the payload:
import ndef
record1 = ndef.TextRecord("Test")
encoder = ndef.message_encoder()
encoder.send(None)
encoder.send(record1)
encoder.send(None)
message = [record1]
print(b''.join((ndef.message_encoder(message))).hex())
>>> d101075402656e54657374It also mentions in the docs for the tiny applet:
You should not prepend the dataset with a length prefix as in the stored form.
So maybe I've missed some other detail. What's the initial byte 0x10 in the tiny applet param? Thanks for any help in advance!
Metadata
Metadata
Assignees
Labels
No labels