| s2pexec(1) | General Commands Manual | s2pexec(1) |
s2pexec - SCSI2Pi SCSI/SASI command executor
s2pexec [--binary-input-file/-f FILE] [--binary-output-file/-F FILE] [--board-id/-B BOARD_ID] [--buffer-size/-b BUFFER_SIZE] [--cdb/-c CDB[:CDB:...]] [--data/-d DATA] [--help/-H] [--hex-only/-x] [--hex-output-file/-T FILE] [--log-level/-L LEVEL] [--log-limit/-l LIMIT] [--request-sense/-R] [--reset-bus/-r] [--sasi-target/-h ID[:LUN]] [--scsi-target/-i ID[:LUN]] [--scsi-generic/-g DEVICE_FILE] [--timeout/-t TIMEOUT] [--version/-v]
s2pexec sends SCSI or SASI commands to a device and displays the results.
When launched without arguments, s2pexec enters interactive mode, where you can enter commands on the command line. Like with the bash shell, "!!" repeats the last command. In interactive mode, the target, initiator and log level settings are preserved between command invocations. When using devices managed by the Linux SG 3 driver, s2pexec can be used on any Linux system, not just on a Pi.
s2pexec helps with advanced testing. The board on which s2pexec is running must be a FULLSPEC board, because s2pexec requires SCSI initiator support.
0: No error. -1: There was a general error and the command could not be sent. Any other value means the command could be sent but the target device reported an error. In this case, the return status contains the additional sense code (ASC).
s2pexec -i 0 -c 12:00:00:00:20:00
Send an INQUIRY command to the device with SCSI ID 0 and display the
results.
s2pexec -i 5 -c 15:11:00:04:0c:00 -d @data.dat
Send a MODE SELECT command to the device with SCSI ID 5, with the
hexadecimally coded data in data.dat as parameters.
s2pexec -i 5:1 -c 15:11:00:04:0c:00 -d
00:00:00:08:00:00:00:00:00:00:02:00
Send a MODE SELECT command to the device with SCSI ID 5 and LUN 1, with
explicit parameter data.
s2p(1), s2pctl(1), s2pdump(1), s2pformat(1), s2pproto(1), s2psimh(1), s2ptool(1)
Also see <https://www.scsi2pi.net> and <https://github.com/uweseimet/scsi2pi>.