2010-08-16 01:52:30 +04:00
|
|
|
.\" $NetBSD: fwctl.8,v 1.11 2010/08/15 21:52:30 cegger Exp $
|
2005-07-12 07:23:06 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2005 KIYOHARA Takashi
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
2007-11-06 20:02:15 +03:00
|
|
|
.\" $FreeBSD: src/usr.sbin/fwcontrol/fwcontrol.8,v 1.21 2007/10/31 05:59:17 brueffer Exp $
|
2005-07-12 07:23:06 +04:00
|
|
|
.\"
|
2009-05-18 15:57:30 +04:00
|
|
|
.Dd May 18, 2009
|
2005-07-12 07:23:06 +04:00
|
|
|
.Dt FWCTL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fwctl
|
|
|
|
.Nd IEEE1394 control utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl prt
|
2005-07-12 12:59:00 +04:00
|
|
|
.Op Fl b Ar pri_req
|
2005-07-12 07:23:06 +04:00
|
|
|
.Op Fl c Ar node
|
|
|
|
.Op Fl d Ar node
|
2005-07-12 12:59:00 +04:00
|
|
|
.Op Fl g Ar gap_count
|
2005-07-12 07:23:06 +04:00
|
|
|
.Op Fl l Ar file
|
2007-11-06 20:02:15 +03:00
|
|
|
.Op Fl M Ar mode
|
2005-07-12 12:59:00 +04:00
|
|
|
.Op Fl m Ar EUI64 | hostname
|
2005-07-12 13:03:10 +04:00
|
|
|
.Op Fl o Ar node
|
2005-07-12 07:23:06 +04:00
|
|
|
.Op Fl R Ar filename
|
|
|
|
.Op Fl S Ar filename
|
2005-07-12 12:59:00 +04:00
|
|
|
.Op Fl s Ar node
|
|
|
|
.Op Fl u Ar bus_num
|
2005-07-12 07:23:06 +04:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2005-07-12 12:59:00 +04:00
|
|
|
utility is designed to provide a way for users to access and control
|
|
|
|
the
|
2007-03-05 07:56:48 +03:00
|
|
|
.Nx
|
2005-07-12 07:23:06 +04:00
|
|
|
IEEE1394 subsystem.
|
|
|
|
Without options,
|
|
|
|
.Nm
|
|
|
|
will output a list of devices that are/were connected to the bus.
|
|
|
|
.Pp
|
|
|
|
The following options are available:
|
2005-07-12 12:59:00 +04:00
|
|
|
.Bl -tag -width XmXEUI64XhostnameXX -offset indent
|
2005-07-12 13:05:35 +04:00
|
|
|
.It Fl b Ar pri_req
|
|
|
|
Set the
|
|
|
|
.Dv PRIORITY_BUDGET
|
|
|
|
register on all supported nodes.
|
2005-07-12 07:23:06 +04:00
|
|
|
.It Fl c Ar node
|
|
|
|
Show the configuration ROM on the node.
|
|
|
|
.It Fl d Ar node
|
|
|
|
Hex dump of the configuration ROM.
|
|
|
|
.It Fl g Ar gap_count
|
2010-08-16 01:52:30 +04:00
|
|
|
Broadcast new
|
2005-07-12 07:23:06 +04:00
|
|
|
.Ar gap_count
|
|
|
|
by phy_config packet.
|
2010-08-16 01:52:30 +04:00
|
|
|
By default this value is 63 on all nodes.
|
|
|
|
Valid values are 0 - 63.
|
2005-07-12 12:59:00 +04:00
|
|
|
.It Fl l Ar file
|
|
|
|
Load hex dump file of the configuration ROM and parse it.
|
2010-08-14 20:32:26 +04:00
|
|
|
.It Fl M Ar mode
|
|
|
|
Explicitly specify either
|
2007-11-06 20:02:15 +03:00
|
|
|
.Ar dv
|
|
|
|
or
|
|
|
|
.Ar mpeg
|
|
|
|
mode for the incoming stream.
|
|
|
|
Only meaningful in case of and must precede the
|
|
|
|
.Fl R
|
2009-05-18 15:57:30 +04:00
|
|
|
option.
|
|
|
|
If not specified, the program will try to guess.
|
2010-08-16 01:52:30 +04:00
|
|
|
In case of
|
|
|
|
.Dq format 0x20
|
|
|
|
error, try to force the
|
2009-05-18 15:57:30 +04:00
|
|
|
.Ar mpeg
|
|
|
|
mode.
|
2005-07-12 12:59:00 +04:00
|
|
|
.It Fl m Ar EUI64 | hostname
|
|
|
|
Set default fwmem target.
|
|
|
|
Hostname will be converted to EUI64.
|
|
|
|
.It Fl o Ar node
|
|
|
|
Send a link-on PHY packet to the node.
|
|
|
|
.It Fl p
|
|
|
|
Dump PHY registers.
|
2005-07-12 07:23:06 +04:00
|
|
|
.It Fl R Ar filename
|
2010-08-16 01:52:30 +04:00
|
|
|
Recieve DV or MPEG TS stream and dump it to a file.
|
|
|
|
Use Ctrl-C to stop recieving.
|
2005-07-12 07:23:06 +04:00
|
|
|
Some DV cameras seem not to send the stream if a bus manager exits.
|
|
|
|
If you cannot get the stream, try the following commands:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
sysctl hw.ieee1394if.try_bmr=0
|
|
|
|
fwctl -r
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The resulting file contains raw DV data excluding isochronous header
|
|
|
|
and CIP header.
|
2005-07-12 12:59:00 +04:00
|
|
|
It can be handled by the
|
|
|
|
.Pa pkgsrc/multimedia/libdv
|
|
|
|
package.
|
2009-05-18 15:57:30 +04:00
|
|
|
The resulting MPEG TS stream can be played and sent over a network using
|
|
|
|
the VideoLAN tool
|
|
|
|
.Pa ( pkgsrc/multimedia/vlc ) .
|
|
|
|
The stream can be piped directly to
|
|
|
|
.Nm vlc ,
|
|
|
|
see
|
|
|
|
.Sx EXAMPLES .
|
2005-07-12 12:59:00 +04:00
|
|
|
.It Fl r
|
|
|
|
Initiate bus reset.
|
2005-07-12 07:23:06 +04:00
|
|
|
.It Fl S Ar filename
|
|
|
|
Send a DV file as isochronous stream.
|
2005-07-12 12:59:00 +04:00
|
|
|
.It Fl s Ar node
|
|
|
|
Write to the
|
|
|
|
.Dv RESET_START
|
|
|
|
register on the node.
|
|
|
|
.It Fl t
|
|
|
|
Show the topology map.
|
|
|
|
.It Fl u Ar bus_num
|
|
|
|
Specify the IEEE1394 bus number to be operated on.
|
2010-08-16 01:52:30 +04:00
|
|
|
The default is bus 0.
|
2005-07-12 07:23:06 +04:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag
|
|
|
|
.It Pa /dev/fw0.0
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
Each DV frame has a fixed size and it is easy to edit the frame order.
|
|
|
|
.Pp
|
|
|
|
.Dl "fwctl -R original.dv"
|
|
|
|
.Pp
|
2007-11-06 20:02:15 +03:00
|
|
|
Receive a DV stream with DV camera attached.
|
2005-07-12 07:23:06 +04:00
|
|
|
.Pp
|
|
|
|
.Dl "dd if=original.dv of=first.dv bs=120000 count=30"
|
|
|
|
.Pp
|
2005-07-12 12:59:00 +04:00
|
|
|
Get first 30 frames (NTSC).
|
2005-07-12 07:23:06 +04:00
|
|
|
.Pp
|
|
|
|
.Dl "dd if=original.dv of=second.dv bs=120000 skip=30 count=30"
|
|
|
|
.Pp
|
2005-07-12 12:59:00 +04:00
|
|
|
Get second 30 frames (NTSC).
|
2005-07-12 07:23:06 +04:00
|
|
|
.Pp
|
|
|
|
.Dl "cat second.dv first.dv | fwctl -S /dev/stdin"
|
|
|
|
.Pp
|
|
|
|
Swap first and second 30 frames and send them to DV recorder.
|
|
|
|
.Pp
|
|
|
|
For PAL, replace
|
|
|
|
.Dq Li bs=120000
|
|
|
|
with
|
|
|
|
.Dq Li bs=144000 .
|
2007-11-06 20:02:15 +03:00
|
|
|
.Pp
|
2010-08-14 20:23:49 +04:00
|
|
|
.Dl "fwctl -R file.m2t"
|
2007-11-06 20:02:15 +03:00
|
|
|
.Pp
|
2009-05-18 15:57:30 +04: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.
|
2007-11-06 20:02:15 +03:00
|
|
|
.Pp
|
|
|
|
To send the stream from the camera over the network using TCP (which
|
|
|
|
supprisingly works better with vlc), you can use
|
2010-08-14 20:23:49 +04:00
|
|
|
.Dl "fwctl -R - | nc 192.168.10.11 9000"
|
2007-11-06 20:02:15 +03:00
|
|
|
with
|
2009-05-18 15:57:30 +04:00
|
|
|
.Pa pkgsrc/net/netcat
|
|
|
|
and to receive the stream, use
|
2007-11-06 20:02:15 +03:00
|
|
|
.Dl nc -l -p 9000 | vlc -
|
|
|
|
.Pp
|
|
|
|
To netcast via UDP, you need to use
|
2009-05-18 15:57:30 +04:00
|
|
|
.Pa pkgsrc/misc/buffer ,
|
|
|
|
since vlc is not fast enough to read UDP packets from
|
|
|
|
buffers and thus it experiences dropouts when run directly.
|
|
|
|
The sending side can use
|
2010-08-14 20:23:49 +04:00
|
|
|
.Dl "fwctl -R - | nc 192.168.10.11 9000"
|
2007-11-06 20:02:15 +03: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
|
2009-05-18 15:57:30 +04:00
|
|
|
see its documentation.
|
2005-07-12 07:23:06 +04:00
|
|
|
.Sh SEE ALSO
|
2007-11-06 20:02:15 +03:00
|
|
|
.Xr mplayer 1 ,
|
|
|
|
.Xr vlc 1 ,
|
2005-07-12 07:23:06 +04:00
|
|
|
.Xr fwip 4 ,
|
|
|
|
.Xr fwohci 4 ,
|
2005-07-12 12:59:00 +04:00
|
|
|
.Xr ieee1394if 4 ,
|
2005-07-12 07:23:06 +04:00
|
|
|
.Xr sbp 4
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command first appeared in
|
|
|
|
.Fx 5.0 ,
|
|
|
|
as
|
|
|
|
.Ic fwcontrol .
|
|
|
|
It was added to
|
|
|
|
.Nx 4.0
|
|
|
|
under its present name.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org
|
2007-11-06 20:02:15 +03:00
|
|
|
.An Petr Holub Aq hopet@ics.muni.cz
|
|
|
|
- MPEG TS mode.
|
2005-07-12 07:23:06 +04:00
|
|
|
.An KIYOHARA Takashi Aq kiyohara@NetBSD.org
|
|
|
|
.Sh BUGS
|
2005-07-12 12:59:00 +04:00
|
|
|
This utility is still under development and provided for debugging
|
|
|
|
purposes.
|
2007-11-06 20:02:15 +03:00
|
|
|
Especially MPEG TS reception support is very rudimental and supports only
|
|
|
|
high-bandwidth MPEG-2 streams (fn field in CIP header equals 3).
|