xref: /freebsd/usr.sbin/fwcontrol/fwcontrol.8 (revision 390e8cc2974df1888369c06339ef8e0e92b312b6)
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 December 30, 2002
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 rt
36.Op Fl c Ar node
37.Op Fl d Ar node
38.Op Fl o Ar node
39.Op Fl s Ar node
40.Op Fl l Ar file
41.Op Fl g Ar gap_count
42.Op Fl b Ar pri_req
43.Op Fl R Ar filename
44.Op Fl S Ar filename
45.Sh DESCRIPTION
46The
47.Nm
48utility is designed to provide a way for users to access and control the
49.Fx
50FireWire subsystem.
51Without options,
52.Nm
53will output a list of devices that are/were connected to the bus.
54.Pp
55The following options are available:
56.Bl -tag -width indent
57.It Fl r
58Initiate bus reset.
59.It Fl t
60Show the topology map.
61.It Fl c Ar node
62Show the configuration ROM on the node.
63.It Fl d Ar node
64Hex dump of the configuration ROM.
65.It Fl o Ar node
66Send a link-on PHY packet to the node.
67.It Fl s Ar node
68Write to
69.Dv RESET_START
70register on the node.
71.It Fl l Ar file
72Load hex dump file of the configuration ROM and parse it.
73.It Fl g Ar gap_count
74Broadcast
75.Ar gap_count
76by phy_config packet.
77.It Fl i Ar pri_req
78Set
79.Dv PRIORITY_BUDGET
80register on all supported nodes.
81.It Fl R Ar filename
82Receive DV stream and dump it to a file.
83Use Ctrl-C to stop the receiving.
84Some DV cameras seem not to send the stream if a bus manager exits.
85If you cannot get the stream, try the following commands:
86.Bd -literal -offset indent
87sysctl hw.firewire.try_bmr=0
88fwcontrol -r
89.Ed
90.Pp
91The resulting file contains raw DV data excluding isochronus header
92and CIP header.
93It can be handled by
94.Nm libdv
95in the
96.Fx
97Ports Collection.
98.It Fl S Ar filename
99Send a DV file as isochronus stream.
100.El
101.Sh EXAMPLES
102Each DV frame has fixed size and it is easy to edit those frame order.
103.Pp
104.Dl "fwcontrol -R original.dv"
105.Pp
106Receive stream.
107.Pp
108.Dl "dd if=original.dv of=first.dv bs=120000 count=30"
109.Pp
110Get first 30 frames(NTSC).
111.Pp
112.Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30"
113.Pp
114Get second 30 frames(NTSC).
115.Pp
116.Dl "cat second.dv first.dv | fwcontrol -S /dev/stdin"
117.Pp
118Swap first and second 30 frames and send them to DV recorder.
119.Pp
120For PAL, replace
121.Dq Li bs=120000
122with
123.Dq Li bs=144000 .
124.Sh FILES
125.Bl -tag
126.It Pa /dev/fw0
127.El
128.Sh SEE ALSO
129.Xr firewire 4 ,
130.Xr fwe 4 ,
131.Xr fwohci 4 ,
132.Xr sbp 4
133.Sh HISTORY
134The
135.Nm
136utility first appeared in
137.Fx 5.0 .
138.Sh AUTHORS
139.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
140.Sh BUGS
141This utility is still under development and provided for debug purpose.
142