firewire-request is a utility to query and configure FireWire devices.
The device parameter specifies the device file (/dev/fw*) of the device that is to be accessed.
All numbers must be specified in hexadecimal notation. When specifying data blocks, you can separate
bytes or quadlets with spaces, but then you have to remember to quote them in the shell so that all bytes
are recognized as a single parameter.
In the following commands, address is either a 48-bit address or a register name.
The following commands are available:
firewire-requestdevicereadaddress [length]
Send a read request to the device, and print the value returned by the device, if successful.
If length is not specified, it is derived from address: for a named register, the register's
length is used; for a numerical address, a default length of one quadlet (4 bytes) is used.
firewire-requestdevicewrite|broadcastaddressdata
Send a write request to the device.
Broadcasts are allowed only for a device that corresponds to a local controller, and are sent to
all the other devices on the bus.
firewire-requestdevicelocktypeaddressdata [data2]
Execute a lock transaction (an atomic change) on the device.
locktype can be any of the following:
mask_swap
Change the bits set in data to the value in data2.
compare_swap
If the register has the same value as data, set it to data2.
add[_big]
Increase the register by data.
add_little
Increase the little-endian register by data.
bounded_add[_big]
If the register has not the the same value as data, increase it by data2.
wrap_add[_big]
If the register has not the the same value as data, increase it by data2, else set it to
data2.
All transaction types except add/add_big/add_little require two parameters.
firewire-request will print the value returned by the device, which is the old register value at
the beginning of the transaction.
firewire-requestdevicefcpdata
Send the message data to the device's FCP command register, and print the response returned by the
device to the local FCP response register.
firewire-requestdevicereset|long_reset
Issue a bus reset on the bus connected to device.