]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/fwcontrol/fwcontrol.8
This commit was generated by cvs2svn to compensate for changes in r172314,
[FreeBSD/FreeBSD.git] / usr.sbin / fwcontrol / fwcontrol.8
1 .\" Copyright (c) 2002 Hidetoshi Shimokawa
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 .\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
17 .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
22 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 .\" POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd October 24, 2006
28 .Dt FWCONTROL 8
29 .Os
30 .Sh NAME
31 .Nm fwcontrol
32 .Nd FireWire control utility
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl u Ar bus_num
36 .Op Fl prt
37 .Op Fl c Ar node
38 .Op Fl d Ar node
39 .Op Fl o Ar node
40 .Op Fl s Ar node
41 .Op Fl l Ar file
42 .Op Fl g Ar gap_count
43 .Op Fl b Ar pri_req
44 .Op Fl M Ar mode
45 .Op Fl R Ar filename
46 .Op Fl S Ar filename
47 .Op Fl m Ar EUI64 | hostname
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility is designed to provide a way for users to access and control the
52 .Fx
53 FireWire subsystem.
54 Without options,
55 .Nm
56 will output a list of devices that are/were connected to the bus.
57 .Pp
58 The following options are available:
59 .Bl -tag -width indent
60 .It Fl u Ar bus_num
61 Specify the FireWire bus number to be operated on.
62 .It Fl r
63 Initiate bus reset.
64 .It Fl t
65 Show the topology map.
66 .It Fl p
67 Dump PHY registers.
68 .It Fl c Ar node
69 Show the configuration ROM on the node.
70 .It Fl d Ar node
71 Hex dump of the configuration ROM.
72 .It Fl o Ar node
73 Send a link-on PHY packet to the node.
74 .It Fl s Ar node
75 Write to the
76 .Dv RESET_START
77 register on the node.
78 .It Fl l Ar file
79 Load hex dump file of the configuration ROM and parse it.
80 .It Fl g Ar gap_count
81 Broadcast
82 .Ar gap_count
83 by phy_config packet.
84 .It Fl i Ar pri_req
85 Set the
86 .Dv PRIORITY_BUDGET
87 register on all supported nodes.
88 .It Fl M Ar mode
89 Explicitly specify either
90 .Ar dv
91 or
92 .Ar mpeg
93 mode for the incoming stream.
94 Only meaningful in case of and must precede the
95 .Fl R
96 option. If not specified, the program will try to guess. If you get
97 an error complaining about "format 0x20", try to force the "mpeg" mode.
98 .It Fl R Ar filename
99 Receive DV or MPEG TS stream and dump it to a file.
100 Use Ctrl-C to stop the receiving.
101 Some DV cameras seem not to send the stream if a bus manager exits.
102 If you cannot get the stream, try the following commands:
103 .Bd -literal -offset indent
104 sysctl hw.firewire.try_bmr=0
105 fwcontrol -r
106 .Ed
107 .Pp
108 The resulting file contains raw DV data excluding isochronous header
109 and CIP header.
110 It can be handled by
111 .Nm libdv
112 in the
113 .Fx
114 Ports Collection. Resulting MPEG TS stream can be played and sent over a
115 network using the VideoLAN
116 .Nm vlc
117 tool in the 
118 .Fx
119 Ports Collection. The stream can be piped directly to
120 .Nm vlc,
121 see EXAMPLES.
122 .It Fl S Ar filename
123 Send a DV file as isochronous stream.
124 .It Fl m Ar EUI64 | hostname
125 Set default fwmem target.
126 Hostname will be converted to EUI64 using
127 .Xr eui64 5 .
128 .El
129 .Sh FILES
130 .Bl -tag
131 .It Pa /dev/fw0.0
132 .El
133 .Sh EXAMPLES
134 Each DV frame has a fixed size and it is easy to edit the frame order.
135 .Pp
136 .Dl "fwcontrol -R original.dv"
137 .Pp
138 Receive a DV stream with DV camera attached.
139 .Pp
140 .Dl "dd if=original.dv of=first.dv bs=120000 count=30"
141 .Pp
142 Get first 30 frames(NTSC).
143 .Pp
144 .Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30"
145 .Pp
146 Get second 30 frames(NTSC).
147 .Pp
148 .Dl "cat second.dv first.dv | fwcontrol -S /dev/stdin"
149 .Pp
150 Swap first and second 30 frames and send them to DV recorder.
151 .Pp
152 For PAL, replace
153 .Dq Li bs=120000
154 with
155 .Dq Li bs=144000 .
156 .Pp
157 .Dl "fwcontrol -R file.m2t
158 .Pp
159 Receive an MPEG TS stream from a camera producing MPEG transport stream.  This
160 has been tested with SONY HDR-FX1E camera that produces HD MPEG-2 stream at
161 25 Mbps bandwidth.
162 .Pp
163 To send the stream from the camera over the network using TCP (which supprisingly works better with vlc), you can use
164 .Dl "fwcontrol -R - | nc 192.168.10.11 9000
165 with
166 .Nm netcat
167 from ports and to receive the stream, use
168 .Dl nc -l -p 9000 | vlc -
169 .Pp
170 To netcast via UDP, you need to use 
171 .Nm buffer 
172 program from ports, since vlc is not fast enough to read UDP packets from
173 buffers and thus it experiences dropouts when run directly. The sending side
174 can use
175 .Dl "fwcontrol -R - | nc 192.168.10.11 9000
176 and to receive the stream, use
177 .Dl nc -l -u -p 9000 | buffer -s 10k -b 1000 -m 20m -p 5 | vlc -
178 .Pp
179
180 .Pp
181 For more information on how to work with
182 .Nm vlc
183 see its docs.
184 .Sh SEE ALSO
185 .Xr firewire 4 ,
186 .Xr fwe 4 ,
187 .Xr fwip 4 ,
188 .Xr fwohci 4 ,
189 .Xr sbp 4 ,
190 .Xr mplayer 1 ,
191 .Xr vlc 1
192 .Sh HISTORY
193 The
194 .Nm
195 utility first appeared in
196 .Fx 5.0 .
197 .Sh AUTHORS
198 .An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
199 .An Petr Holub Aq hopet@ics.muni.cz
200 - MPEG TS mode.
201 .Sh BUGS
202 This utility is still under development and provided for debugging purposes.
203 Especially MPEG TS reception support is very rudimental and supports only
204 high-bandwidth MPEG-2 streams (fn field in CIP header equals 3).