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