xref: /netbsd-src/usr.sbin/fwctl/fwctl.8 (revision 8a5e2a50be13e77dd4df5daf258ddceeeeb47ce6)
1.\"	$NetBSD: fwctl.8,v 1.4 2005/07/12 09:05:35 wiz Exp $
2.\"
3.\" Copyright (c) 2005 KIYOHARA Takashi
4.\" All rights reserved.
5.\"
6.\" Copyright (c) 2002 Hidetoshi Shimokawa
7.\" All rights reserved.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
22.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
27.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.\" $FreeBSD: /repoman/r/ncvs/src/usr.sbin/fwcontrol/fwcontrol.8,v 1.16 2005/01/18 20:02:34 ru Exp $
31.\"
32.Dd June 18, 2005
33.Dt FWCTL 8
34.Os
35.Sh NAME
36.Nm fwctl
37.Nd IEEE1394 control utility
38.Sh SYNOPSIS
39.Nm
40.Op Fl prt
41.Op Fl b Ar pri_req
42.Op Fl c Ar node
43.Op Fl d Ar node
44.Op Fl g Ar gap_count
45.Op Fl l Ar file
46.Op Fl m Ar EUI64 | hostname
47.Op Fl o Ar node
48.Op Fl R Ar filename
49.Op Fl S Ar filename
50.Op Fl s Ar node
51.Op Fl u Ar bus_num
52.Sh DESCRIPTION
53The
54.Nm
55utility is designed to provide a way for users to access and control
56the
57.Fx
58IEEE1394 subsystem.
59Without options,
60.Nm
61will output a list of devices that are/were connected to the bus.
62.Pp
63The following options are available:
64.Bl -tag -width XmXEUI64XhostnameXX -offset indent
65.It Fl b Ar pri_req
66Set the
67.Dv PRIORITY_BUDGET
68register on all supported nodes.
69.It Fl c Ar node
70Show the configuration ROM on the node.
71.It Fl d Ar node
72Hex dump of the configuration ROM.
73.It Fl g Ar gap_count
74Broadcast
75.Ar gap_count
76by phy_config packet.
77.It Fl l Ar file
78Load hex dump file of the configuration ROM and parse it.
79.It Fl m Ar EUI64 | hostname
80Set default fwmem target.
81Hostname will be converted to EUI64.
82.It Fl o Ar node
83Send a link-on PHY packet to the node.
84.It Fl p
85Dump PHY registers.
86.It Fl R Ar filename
87Receive DV stream and dump it to a file.
88Use Ctrl-C to stop the receiving.
89Some DV cameras seem not to send the stream if a bus manager exits.
90If you cannot get the stream, try the following commands:
91.Bd -literal -offset indent
92sysctl hw.ieee1394if.try_bmr=0
93fwctl -r
94.Ed
95.Pp
96The resulting file contains raw DV data excluding isochronous header
97and CIP header.
98It can be handled by the
99.Pa pkgsrc/multimedia/libdv
100package.
101.It Fl r
102Initiate bus reset.
103.It Fl S Ar filename
104Send a DV file as isochronous stream.
105.It Fl s Ar node
106Write to the
107.Dv RESET_START
108register on the node.
109.It Fl t
110Show the topology map.
111.It Fl u Ar bus_num
112Specify the IEEE1394 bus number to be operated on.
113.El
114.Sh FILES
115.Bl -tag
116.It Pa /dev/fw0.0
117.El
118.Sh EXAMPLES
119Each DV frame has a fixed size and it is easy to edit the frame order.
120.Pp
121.Dl "fwctl -R original.dv"
122.Pp
123Receive stream.
124.Pp
125.Dl "dd if=original.dv of=first.dv bs=120000 count=30"
126.Pp
127Get first 30 frames (NTSC).
128.Pp
129.Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30"
130.Pp
131Get second 30 frames (NTSC).
132.Pp
133.Dl "cat second.dv first.dv | fwctl -S /dev/stdin"
134.Pp
135Swap first and second 30 frames and send them to DV recorder.
136.Pp
137For PAL, replace
138.Dq Li bs=120000
139with
140.Dq Li bs=144000 .
141.Sh SEE ALSO
142.Xr fwip 4 ,
143.Xr fwohci 4 ,
144.Xr ieee1394if 4 ,
145.Xr sbp 4
146.Sh HISTORY
147The
148.Nm
149command first appeared in
150.Fx 5.0 ,
151as
152.Ic fwcontrol .
153It was added to
154.Nx 4.0
155under its present name.
156.Sh AUTHORS
157.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
158.An KIYOHARA Takashi Aq kiyohara@NetBSD.org
159.Sh BUGS
160This utility is still under development and provided for debugging
161purposes.
162