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 prt 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 on. 60.It Fl r 61Initiate bus reset. 62.It Fl t 63Show the topology map. 64.It Fl p 65Dump PHY registers. 66.It Fl c Ar node 67Show the configuration ROM on the node. 68.It Fl d Ar node 69Hex dump of the configuration ROM. 70.It Fl o Ar node 71Send a link-on PHY packet to the node. 72.It Fl s Ar node 73Write to the 74.Dv RESET_START 75register on the node. 76.It Fl l Ar file 77Load hex dump file of the configuration ROM and parse it. 78.It Fl g Ar gap_count 79Broadcast 80.Ar gap_count 81by phy_config packet. 82.It Fl i Ar pri_req 83Set the 84.Dv PRIORITY_BUDGET 85register on all supported nodes. 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.firewire.try_bmr=0 93fwcontrol -r 94.Ed 95.Pp 96The resulting file contains raw DV data excluding isochronous header 97and CIP header. 98It can be handled by 99.Nm libdv 100in the 101.Fx 102Ports Collection. 103.It Fl S Ar filename 104Send a DV file as isochronous stream. 105.El 106.Sh EXAMPLES 107Each DV frame has a fixed size and it is easy to edit the frame order. 108.Pp 109.Dl "fwcontrol -R original.dv" 110.Pp 111Receive stream. 112.Pp 113.Dl "dd if=original.dv of=first.dv bs=120000 count=30" 114.Pp 115Get first 30 frames(NTSC). 116.Pp 117.Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30" 118.Pp 119Get second 30 frames(NTSC). 120.Pp 121.Dl "cat second.dv first.dv | fwcontrol -S /dev/stdin" 122.Pp 123Swap first and second 30 frames and send them to DV recorder. 124.Pp 125For PAL, replace 126.Dq Li bs=120000 127with 128.Dq Li bs=144000 . 129.Sh FILES 130.Bl -tag 131.It Pa /dev/fw0.0 132.El 133.Sh SEE ALSO 134.Xr firewire 4 , 135.Xr fwe 4 , 136.Xr fwohci 4 , 137.Xr sbp 4 138.Sh HISTORY 139The 140.Nm 141utility first appeared in 142.Fx 5.0 . 143.Sh AUTHORS 144.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org 145.Sh BUGS 146This utility is still under development and provided for debugging purposes. 147