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