2002-12-30 10:13:16 +00:00
|
|
|
.\" Copyright (c) 2002 Hidetoshi Shimokawa
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
|
|
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2008-09-11 22:11:41 +00:00
|
|
|
.Dd September 12, 2008
|
2002-12-30 10:13:16 +00:00
|
|
|
.Dt FWCONTROL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fwcontrol
|
|
|
|
.Nd FireWire control utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2003-08-05 03:26:14 +00:00
|
|
|
.Op Fl u Ar bus_num
|
2003-09-25 09:33:16 +00:00
|
|
|
.Op Fl prt
|
2002-12-30 10:13:16 +00:00
|
|
|
.Op Fl c Ar node
|
|
|
|
.Op Fl d Ar node
|
2003-05-01 06:33:13 +00:00
|
|
|
.Op Fl o Ar node
|
|
|
|
.Op Fl s Ar node
|
2002-12-30 10:13:16 +00:00
|
|
|
.Op Fl l Ar file
|
2008-03-05 01:30:48 +00:00
|
|
|
.Op Fl f Ar node
|
2002-12-30 10:13:16 +00:00
|
|
|
.Op Fl g Ar gap_count
|
|
|
|
.Op Fl b Ar pri_req
|
2006-10-26 22:33:38 +00:00
|
|
|
.Op Fl M Ar mode
|
2003-01-23 16:10:12 +00:00
|
|
|
.Op Fl R Ar filename
|
|
|
|
.Op Fl S Ar filename
|
2004-10-23 23:28:08 +00:00
|
|
|
.Op Fl m Ar EUI64 | hostname
|
2002-12-30 10:13:16 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is designed to provide a way for users to access and control the
|
|
|
|
.Fx
|
|
|
|
FireWire subsystem.
|
2003-02-09 07:26:48 +00:00
|
|
|
Without options,
|
|
|
|
.Nm
|
2003-06-02 11:19:24 +00:00
|
|
|
will output a list of devices that are/were connected to the bus.
|
2002-12-30 10:13:16 +00:00
|
|
|
.Pp
|
2003-06-02 11:19:24 +00:00
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width indent
|
2003-08-05 03:26:14 +00:00
|
|
|
.It Fl u Ar bus_num
|
2008-09-11 22:11:41 +00:00
|
|
|
Specify the FireWire bus number to be operated on.
|
|
|
|
The default is bus 0.
|
2002-12-30 10:13:16 +00:00
|
|
|
.It Fl r
|
|
|
|
Initiate bus reset.
|
|
|
|
.It Fl t
|
|
|
|
Show the topology map.
|
2003-09-25 09:33:16 +00:00
|
|
|
.It Fl p
|
2004-06-04 19:23:39 +00:00
|
|
|
Dump PHY registers.
|
2002-12-30 10:13:16 +00:00
|
|
|
.It Fl c Ar node
|
|
|
|
Show the configuration ROM on the node.
|
|
|
|
.It Fl d Ar node
|
|
|
|
Hex dump of the configuration ROM.
|
2003-05-01 06:33:13 +00:00
|
|
|
.It Fl o Ar node
|
2003-05-22 11:54:53 +00:00
|
|
|
Send a link-on PHY packet to the node.
|
2003-05-01 06:33:13 +00:00
|
|
|
.It Fl s Ar node
|
2003-12-17 10:14:11 +00:00
|
|
|
Write to the
|
2003-06-02 11:19:24 +00:00
|
|
|
.Dv RESET_START
|
|
|
|
register on the node.
|
2002-12-30 10:13:16 +00:00
|
|
|
.It Fl l Ar file
|
|
|
|
Load hex dump file of the configuration ROM and parse it.
|
2008-03-05 01:30:48 +00:00
|
|
|
.It Fl f Ar node
|
|
|
|
Force specified
|
|
|
|
.Ar node
|
2008-09-10 18:09:52 +00:00
|
|
|
to be the root node on the next bus reset by sending a PHY config packet.
|
|
|
|
Valid values are 0 - 63.
|
2002-12-30 10:13:16 +00:00
|
|
|
.It Fl g Ar gap_count
|
2008-09-10 18:09:52 +00:00
|
|
|
Broadcast new
|
2003-06-02 11:19:24 +00:00
|
|
|
.Ar gap_count
|
2008-09-10 18:09:52 +00:00
|
|
|
by sending a PHY_config packet.
|
|
|
|
By default this value is 63 on all nodes.
|
|
|
|
Valid values are 0 - 63.
|
2002-12-30 10:13:16 +00:00
|
|
|
.It Fl i Ar pri_req
|
2003-12-17 10:14:11 +00:00
|
|
|
Set the
|
2003-06-02 11:19:24 +00:00
|
|
|
.Dv PRIORITY_BUDGET
|
|
|
|
register on all supported nodes.
|
2006-10-26 22:33:38 +00:00
|
|
|
.It Fl M Ar mode
|
|
|
|
Explicitly specify either
|
|
|
|
.Ar dv
|
|
|
|
or
|
|
|
|
.Ar mpeg
|
|
|
|
mode for the incoming stream.
|
2006-12-29 13:08:46 +00:00
|
|
|
Only meaningful in case of and must precede the
|
2006-10-26 22:33:38 +00:00
|
|
|
.Fl R
|
2008-09-11 22:11:41 +00:00
|
|
|
option.
|
|
|
|
If not specified, the program will try to guess.
|
|
|
|
In case of
|
|
|
|
.Dq format 0x20
|
|
|
|
error, try to force the
|
|
|
|
.Dq mpeg
|
|
|
|
mode.
|
2003-01-23 16:10:12 +00:00
|
|
|
.It Fl R Ar filename
|
2006-10-26 22:33:38 +00:00
|
|
|
Receive DV or MPEG TS stream and dump it to a file.
|
2008-09-11 22:11:41 +00:00
|
|
|
Use ^C to stop the receiving.
|
2008-03-05 01:30:48 +00:00
|
|
|
Some DV cameras seem not to send the stream if a bus manager exists.
|
2008-09-11 22:11:41 +00:00
|
|
|
If it is impossible to get the stream, try the following commands:
|
2003-01-23 16:10:12 +00:00
|
|
|
.Bd -literal -offset indent
|
2003-06-02 11:19:24 +00:00
|
|
|
sysctl hw.firewire.try_bmr=0
|
|
|
|
fwcontrol -r
|
2003-01-23 16:10:12 +00:00
|
|
|
.Ed
|
2003-01-28 17:00:23 +00:00
|
|
|
.Pp
|
2003-12-17 10:14:11 +00:00
|
|
|
The resulting file contains raw DV data excluding isochronous header
|
2003-06-02 11:19:24 +00:00
|
|
|
and CIP header.
|
|
|
|
It can be handled by
|
|
|
|
.Nm libdv
|
|
|
|
in the
|
|
|
|
.Fx
|
2008-09-11 22:11:41 +00:00
|
|
|
Ports Collection.
|
|
|
|
Resulting MPEG TS stream can be played and sent over a
|
2006-10-26 22:33:38 +00:00
|
|
|
network using the VideoLAN
|
|
|
|
.Nm vlc
|
2007-10-30 16:08:06 +00:00
|
|
|
tool in the
|
2006-10-26 22:33:38 +00:00
|
|
|
.Fx
|
2008-09-11 22:11:41 +00:00
|
|
|
Ports Collection.
|
|
|
|
The stream can be piped directly to
|
2006-10-26 22:33:38 +00:00
|
|
|
.Nm vlc,
|
2008-09-11 22:11:41 +00:00
|
|
|
see
|
|
|
|
.Sx EXAMPLES .
|
2003-01-23 16:10:12 +00:00
|
|
|
.It Fl S Ar filename
|
2003-12-17 10:14:11 +00:00
|
|
|
Send a DV file as isochronous stream.
|
2004-10-23 23:28:08 +00:00
|
|
|
.It Fl m Ar EUI64 | hostname
|
2005-01-11 11:47:22 +00:00
|
|
|
Set default fwmem target.
|
|
|
|
Hostname will be converted to EUI64 using
|
2004-10-23 23:28:08 +00:00
|
|
|
.Xr eui64 5 .
|
2002-12-30 10:13:16 +00:00
|
|
|
.El
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh FILES
|
2012-06-03 06:57:47 +00:00
|
|
|
.Bl -tag -width "Pa /dev/fw0.0"
|
2005-01-18 20:02:45 +00:00
|
|
|
.It Pa /dev/fw0.0
|
|
|
|
.El
|
2003-01-23 16:10:12 +00:00
|
|
|
.Sh EXAMPLES
|
2003-12-17 10:14:11 +00:00
|
|
|
Each DV frame has a fixed size and it is easy to edit the frame order.
|
2003-06-02 11:19:24 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "fwcontrol -R original.dv"
|
2003-01-23 16:10:12 +00:00
|
|
|
.Pp
|
2006-10-26 22:33:38 +00:00
|
|
|
Receive a DV stream with DV camera attached.
|
2003-06-02 11:19:24 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "dd if=original.dv of=first.dv bs=120000 count=30"
|
2003-01-23 16:10:12 +00:00
|
|
|
.Pp
|
|
|
|
Get first 30 frames(NTSC).
|
2003-06-02 11:19:24 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30"
|
2003-01-23 16:10:12 +00:00
|
|
|
.Pp
|
|
|
|
Get second 30 frames(NTSC).
|
|
|
|
.Pp
|
2003-06-02 11:19:24 +00:00
|
|
|
.Dl "cat second.dv first.dv | fwcontrol -S /dev/stdin"
|
2003-01-28 17:00:23 +00:00
|
|
|
.Pp
|
2003-06-02 11:19:24 +00:00
|
|
|
Swap first and second 30 frames and send them to DV recorder.
|
2003-01-28 17:00:23 +00:00
|
|
|
.Pp
|
2003-06-02 11:19:24 +00:00
|
|
|
For PAL, replace
|
|
|
|
.Dq Li bs=120000
|
|
|
|
with
|
|
|
|
.Dq Li bs=144000 .
|
2006-10-26 22:33:38 +00:00
|
|
|
.Pp
|
2012-03-26 15:18:14 +00:00
|
|
|
.Dl "fwcontrol -R file.m2t"
|
2006-10-26 22:33:38 +00:00
|
|
|
.Pp
|
2008-09-11 22:11:41 +00:00
|
|
|
Receive an MPEG TS stream from a camera producing MPEG transport stream.
|
|
|
|
This has been tested with SONY HDR-FX1E camera that produces HD MPEG-2
|
|
|
|
stream at 25 Mbps bandwidth.
|
2006-10-26 22:33:38 +00:00
|
|
|
.Pp
|
2008-09-11 22:11:41 +00:00
|
|
|
To send the stream from the camera over the network using TCP (which
|
2010-08-01 09:37:36 +00:00
|
|
|
surprisingly works better with vlc), you can use
|
2012-03-26 15:18:14 +00:00
|
|
|
.Dl "fwcontrol -R - | nc 192.168.10.11 9000"
|
2006-10-26 22:33:38 +00:00
|
|
|
with
|
|
|
|
.Nm netcat
|
|
|
|
from ports and to receive the stream, use
|
|
|
|
.Dl nc -l -p 9000 | vlc -
|
|
|
|
.Pp
|
2007-10-30 16:08:06 +00:00
|
|
|
To netcast via UDP, you need to use
|
|
|
|
.Nm buffer
|
2006-10-26 22:33:38 +00:00
|
|
|
program from ports, since vlc is not fast enough to read UDP packets from
|
2008-09-11 22:11:41 +00:00
|
|
|
buffers and thus it experiences dropouts when run directly.
|
|
|
|
The sending side can use
|
2012-03-26 15:18:14 +00:00
|
|
|
.Dl "fwcontrol -R - | nc 192.168.10.11 9000"
|
2006-10-26 22:33:38 +00:00
|
|
|
and to receive the stream, use
|
|
|
|
.Dl nc -l -u -p 9000 | buffer -s 10k -b 1000 -m 20m -p 5 | vlc -
|
|
|
|
.Pp
|
|
|
|
For more information on how to work with
|
|
|
|
.Nm vlc
|
|
|
|
see its docs.
|
2002-12-30 10:13:16 +00:00
|
|
|
.Sh SEE ALSO
|
2007-10-31 05:59:17 +00:00
|
|
|
.Xr mplayer 1 ,
|
|
|
|
.Xr vlc 1 ,
|
2002-12-30 10:13:16 +00:00
|
|
|
.Xr firewire 4 ,
|
2003-06-02 11:19:24 +00:00
|
|
|
.Xr fwe 4 ,
|
2004-12-14 20:44:37 +00:00
|
|
|
.Xr fwip 4 ,
|
2002-12-30 10:13:16 +00:00
|
|
|
.Xr fwohci 4 ,
|
2007-10-31 05:59:17 +00:00
|
|
|
.Xr sbp 4
|
2002-12-30 10:13:16 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility first appeared in
|
|
|
|
.Fx 5.0 .
|
|
|
|
.Sh AUTHORS
|
2014-06-20 09:57:27 +00:00
|
|
|
.An Hidetoshi Shimokawa Aq Mt simokawa@FreeBSD.org
|
|
|
|
.An Petr Holub Aq Mt hopet@ics.muni.cz
|
|
|
|
(MPEG TS mode)
|
2002-12-30 10:13:16 +00:00
|
|
|
.Sh BUGS
|
2003-12-17 10:14:11 +00:00
|
|
|
This utility is still under development and provided for debugging purposes.
|
2006-10-26 22:33:38 +00:00
|
|
|
Especially MPEG TS reception support is very rudimental and supports only
|
|
|
|
high-bandwidth MPEG-2 streams (fn field in CIP header equals 3).
|