typename¶
Change the type name of the last record.
Synopsis¶
ndeftool typename [OPTIONS] TYPE
ndeftool tn [OPTIONS] TYPE
Description¶
The typename command either changes the current last record’s type (NDEF
Record TNF and TYPE) or, if the current message does not have any records,
creates a record with the given record type. The changed record is verified to
successfully encode and decode unless disabled with -x
.
Options¶
-
-x
,
--no-check
¶
Do not check decoding after type name change.
-
--help
¶
Show this message and exit.
Examples¶
Create a record with text/plain
mime type and no payload.
$ ndeftool typename 'text/plain' print
NDEF Record TYPE 'text/plain' ID '' PAYLOAD 0 byte
Create a plain text record and add some payload.
$ ndeftool typename 'text/plain' payload 'Hello World' print
NDEF Record TYPE 'text/plain' ID '' PAYLOAD 11 byte '48656c6c6f20576f726c' ... 1 more
Create a record with a payload that does not match the record type.
$ ndeftool payload 'Hello World' typename -x 'urn:nfc:wkt:T' print -l
Record [record #1]
type urn:nfc:wkt:T
name
data Hello World