p2p: Add a user_data pointer to p2p struct
[platform/upstream/neard.git] / doc / nfctool.1
1 .\" nfctool(1) manual page
2 .\"
3 .\" Copyright (C) 2013 Intel Corporation
4 .\"
5 .TH NFCTOOL 1 "February 2013"
6
7 .SH NAME
8 .B nfctool
9 \- a NFC toolbox
10
11 .SH SYNOPSIS
12 .B nfctool [OPTIONS...]
13
14 .SH DESCRIPTION
15 .PP
16 The \fBnfctool\fR application performs various operations on NFC devices, such
17 as:
18 .IP \[bu] 2
19 list connected devices
20 .IP \[bu]
21 put device in polling mode
22 .IP \[bu]
23 get and set parameters for the local LLC
24 .IP \[bu]
25 send service name lookup request to the remote LLC.
26 .IP \[bu]
27 dump LLCP link traffic
28
29 .SH OPTIONS
30 .PP
31 \fB\-h\fR, \fB\-\-help\fR
32 .RS 4
33 Print nfctool's available options and exit.
34 .RE
35
36 .PP
37 \fB\-v\fR, \fB\-\-version\fR
38 .RS 4
39 Print nfctool's version and exit.
40 .RE
41
42 .PP
43 \fB\-l\fR, \fB\-\-list\fR
44 .RS 4
45 List attached NFC devices. It also prints information such as remote tags or
46 devices, supported protocols, RF mode, and LLC link parameters.
47 .RE
48
49 .PP
50 \fB\-d\fR, \fB\-\-device\fR=\fINFCDEV\fR
51 .RS 4
52 Specify a nfc device (i.e. nfc0). This is mandatory for all operations except \fB\-l\fR.
53 .RE
54
55 .PP
56 \fB\-p\fR, \fB\-\-poll\fR[=\fIMODE\fR]
57 .RS 4
58 Start poll on the device specified with \fB\-d\fR. \fIMODE\fR must be one of
59 \fBInitiator\fR, \fBTarget\fR, or \fBBoth\fR and it defaults to \fBInitiator\fR
60 when unspecified. Passing \fIMODE\fR as \fBi\fR, \fBt\fR, or \fBb\fR for
61 respectively \fBInitiator\fR, \fBTarget\fR, or \fBBoth\fR is also accepted.
62 .RE
63
64 .PP
65 \fB\-s\fR, \fB\-\-set\-param\fR=\fIPARAM=VAL\fR[,\fIPARAM=VAL\fR[,...]]
66 .RS 4
67 Set LLC link parameters. \fIPARAM\fR must be at least one of:
68 .PP
69 \fBlto\fR=0..255 \- Link TimeOut
70 .RS 4
71 Specify the maximum time interval between the last received LLC PDU from the
72 remote to the local LLC and the first subsequent LLC PDU transmission from the
73 local to the remote LLC. The value is expressed in multiples of 10 milliseconds
74 and is encoded as a 8-bit unsigned integer.
75 .PP
76 The LTO parameter must be set before the LLC Link is established.
77 .RE
78
79 .PP
80 \fBrw\fR=0..15 \- Receive Window size
81 .RS 4
82 Specify the maximum number of I PDUs the local LLC will accept before
83 acknowledging them. A RW size of zero indicates that the local LLC will not
84 accept I PDUs on that data link connection. A RW size of one indicates that the
85 local LLC will acknowledge every I PDU before accepting additional I PDUs. It is
86 encoded as a 4-bit unsigned integer.
87 .PP
88 The RW parameter can be set after the LLC Link is established. The new value
89 will apply for subsequent connections.
90 .RE
91 .PP
92 \fBmiux\fR=0..2047 \- Maximum Information Unit Extension
93 .RS 4
94 Specify the number of octets by which a LLC PDU information field
95 may exceed the default maximum size of 128 octets. In other words,
96 MIU = MIUX + 128. It is encoded as an 11-bit unsigned integer.
97 .PP
98 The MIUX parameter can be set after the LLC Link is established. The new value
99 will apply for subsequent connections.
100 .RE
101 .RE
102
103 .PP
104 \fB\-k\fR, \fB\-\-snl\fR=\fIURN\fR
105 .RS 4
106 Send a Service Name Lookup request for \fIURN\fR (i.e. urn:nfc:sn:snep) to the
107 remote LLC. Obviously, the LLC link must be up before the request is sent.
108 .PP
109 The remote should reply by returning the service access point (SAP) number or
110 zero if it doesn't support the requested service.
111 .PP
112 \fBNote\fR: If used with -p, nfctool will wait for the LLC link to be up before
113 sending the SNL request.
114 .RE
115
116 .PP
117 \fB\-n\fR, \fB\-\-sniff\fR
118 .RS 4
119 Start LLCP sniffing on the device specified with \fB-d\fR option.
120
121 .PP
122 \fBSNIFFER SPECIFIC OPTIONS\fR
123 .RS 4
124 The folowing options only apply with \fR-n\fB.
125
126 .PP
127 \fB\-a\fR, \fB\-\-snapshot\-len\fR=\fISNAPLEN\fR
128 .RS 4
129 Capture \fISNAPLEN\fR bytes from each packet. Default snapshot length is 1024
130 bytes.
131 .RE
132
133 .PP
134 \fB\-y\fR, \fB\-\-dump\-symm\fR
135 .RS 4
136 Dump SYMM packets to stdout. this will generate a \fBLOT\fR of output.
137 .PP
138 \fBNote\fR: The \fB-y\fR option concerns console output only. SYMM packets are
139 always dumped to the pcap file when specified by \fB-f\fR (See below).
140 .RE
141
142 .PP
143 \fB\-t\fR, \fB\-\-show\-timestamp\fR[=\fIMODE\fR]
144 .RS 4
145 Show packet timestamps. Setting \fIMODE\fR as \fBdelta\fR means the time since
146 the first captured frame. \fBabsolute\fR means elapsed time since the Epoch,
147 1970-01-01 00:00:00 +0000 (UTC). \fIMODE\fR defaults to \fBdelta\fR when
148 unspecified.
149 .RE
150
151 .PP
152 \fB\-f\fR, \fB\-\-pcap\-file\fR=\fIFILENAME\fR
153 .RS 4
154 Specify a filename to save dumped traffic in pcap format. The generated file can
155 be opened with Wireshark (http://www.wireshark.org/) using the wireshark-nfc
156 plug-in available at http://code.google.com/p/wireshark-nfc/
157 .RE
158
159 .RE
160 .RE
161
162 .SH SEE ALSO
163 .PP
164 neard (8)
165 .PP
166 neard.conf (5)
167 .PP
168 Linux NFC project page at https://01.org/linux-nfc/