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