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