nfctool1
A nfc toolbox
Usage
nfctool [OPTIONS ...]
Overview
The nfctool application performs various operations on NFC devices, such as:
•
|
list connected devices |
|---|---|
•
|
put device in polling mode |
•
|
get and set parameters for the local LLC |
•
|
send service name lookup request to the remote LLC. |
•
|
dump LLCP link traffic |
Options
-
-h, --help -
Print nfctool's available options and exit.
-
-v, --version -
Print nfctool's version and exit.
-
-l, --list -
List attached NFC devices. It also prints information such as remote tags or devices, supported protocols, RF mode, and LLC link parameters.
-
-d, --device=NFCDEV -
Specify a nfc device (i.e. nfc0). This is mandatory for all operations except
-l.
-
-p, --poll[=MODE] -
Start poll on the device specified with
-d. MODE must be one ofInitiator,Target, orBothand it defaults toInitiatorwhen unspecified. Passing MODE asi,t, orbfor respectivelyInitiator,Target, orBothis also accepted.
-
-s, --set-param=PARAM=VAL[,PARAM=VAL[,...]] -
Set LLC link parameters. PARAM must be at least one of:
lto=0..255 - Link TimeOutSpecify the maximum time interval between the last received LLC PDU from the remote to the local LLC and the first subsequent LLC PDU transmission from the local to the remote LLC. The value is expressed in multiples of 10 milliseconds and is encoded as a 8-bit unsigned integer.
The LTO parameter must be set before the LLC Link is established.
rw=0..15 - Receive Window sizeSpecify the maximum number of I PDUs the local LLC will accept before acknowledging them. A RW size of zero indicates that the local LLC will not accept I PDUs on that data link connection. A RW size of one indicates that the local LLC will acknowledge every I PDU before accepting additional I PDUs. It is encoded as a 4-bit unsigned integer.
The RW parameter can be set after the LLC Link is established. The new value will apply for subsequent connections.
miux=0..2047 - Maximum Information Unit ExtensionSpecify the number of octets by which a LLC PDU information field may exceed the default maximum size of 128 octets. In other words, MIU = MIUX + 128. It is encoded as an 11-bit unsigned integer.
The MIUX parameter can be set after the LLC Link is established. The new value will apply for subsequent connections.
-
-k, --snl=URN -
Send a Service Name Lookup request for URN (i.e. urn:nfc:sn:snep) to the remote LLC. Obviously, the LLC link must be up before the request is sent.
The remote should reply by returning the service access point (SAP) number or zero if it doesn't support the requested service.
Note: If used with -p, nfctool will wait for the LLC link to be up before sending the SNL request.
-
-n, --sniff -
Start LLCP sniffing on the device specified with
-doption.SNIFFER SPECIFIC OPTIONS
The folowing options only apply with -n.
-a,--snapshot-len=SNAPLENCapture SNAPLEN bytes from each packet. Default snapshot length is 1024 bytes.
-y,--dump-symmDump SYMM packets to stdout. this will generate a LOT of output.
Note: The-yoption concerns console output only. SYMM packets are always dumped to the pcap file when specified by-f(See below).-t,--show-timestamp[=MODE]Show packet timestamps. Setting MODE as
deltameans the time since the first captured frame.absolutemeans elapsed time since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). MODE defaults todeltawhen unspecified.-f,--pcap-file=FILENAMESpecify a filename to save dumped traffic in pcap format. The generated file can be opened with Wireshark (http://www.wireshark.org/) using the wireshark-nfc plug-in available at http://code.google.com/p/wireshark-nfc/
Releases
Unchanged in 3 releases since Debian 8 (Jessie).