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.

System Message: ERROR/3 (/home/docs/checkouts/readthedocs.org/user_builds/ndeftool/checkouts/v0.1.0/docs/commands/typename.rst, line 45)

Command u”ndeftool typename ‘text/plain’ print” failed: [Errno 2] No such file or directory

Create a plain text record and add some payload.

System Message: ERROR/3 (/home/docs/checkouts/readthedocs.org/user_builds/ndeftool/checkouts/v0.1.0/docs/commands/typename.rst, line 49)

Command u”ndeftool typename ‘text/plain’ payload ‘Hello World’ print” failed: [Errno 2] No such file or directory

Create a record with a payload that does not match the record type.

System Message: ERROR/3 (/home/docs/checkouts/readthedocs.org/user_builds/ndeftool/checkouts/v0.1.0/docs/commands/typename.rst, line 53)

Command u”ndeftool payload ‘Hello World’ typename -x ‘urn:nfc:wkt:T’ print -l” failed: [Errno 2] No such file or directory