Updating documentation with new commmands and fixing typos

This commit is contained in:
FlUxIuS 2024-06-28 15:00:16 +02:00
parent e9b812c744
commit c93c9bd68a
No known key found for this signature in database
GPG Key ID: E8B96449EE4FA72F
10 changed files with 160 additions and 23 deletions

View File

@ -0,0 +1,25 @@
.. _delete_command:
delete
======
The command ``delete`` has some options:
.. code-block:: bash
rfswift delete --help
[...]
Usage:
rfswift delete [flags]
Flags:
-h, --help help for delete
-i, --image string image ID or tag
To remove an image, you can issue the command ``delete`` documented using `-i` argument to precise the image ID or tag.
.. code-block:: bash
rfswift delete -i super:tag

View File

@ -3,7 +3,7 @@
exec
===
To command ``exec`` has some options:
The command ``exec`` has some options:
.. code-block:: bash

View File

@ -0,0 +1,24 @@
.. _images_command:
images
=====
The command ``images`` allows to list all images build for rfswift.
We can get the list with as follows:
.. code-block:: bash
rfswift images
[...]
ID: sha256:943b7fb287994fa7bda64d5c71fce9a2c0bd128dda75dd89f6b8eb8802925fa5
RepoTags: [penthertz/rfswift:telecom]
Labels: map[org.container.author:Sébastien Dudek (FlUxIuS) org.container.project:rfswift org.opencontainers.image.ref.name:ubuntu org.opencontainers.image.version:22.04]
ID: sha256:19a62c26128f7ae4649763ca658e083217d4a00de5d664cce00f681e0de49c8a
RepoTags: [penthertz/rfswift:sdr_light_rtlsdrv4]
Labels: map[org.container.author:Sébastien Dudek (FlUxIuS) org.container.project:rfswift org.opencontainers.image.ref.name:ubuntu org.opencontainers.image.version:22.04]
ID: sha256:95dc13c4a859a0d5416053a8dcdaddaf64bfc5024af93da588fbe3205d7b0d70
[...]

View File

@ -0,0 +1,33 @@
.. _exec_command:
exec
===
To command ``exec`` has some options:
.. code-block:: bash
rfswift exec --help
[...]
Usage:
rfswift exec [flags]
Flags:
-e, --command string command to exec (required!)
-c, --container string container to run
-h, --help help for exec
-i, --install string install from function script (e.g: 'sdrpp_soft_install')
To get the container ID of a previous session, you can issue the command ``last`` documented :ref:`here<last_containers>`.
Once you have the desired container ID, you can execute a command inside a running or paused container as follows:
.. code-block:: bash
rfswift exec -c 83471263e5e5f9951d83ec27dec37ff5273f92411830b3a08d4053c05b773fe7 -e urh
.. warning::
This command will likely fail if you issue it against a Docker container associated to a build process.

View File

@ -3,7 +3,7 @@
run
===
To command ``run`` has some options:
The command ``run`` has some options:
.. code-block:: bash
@ -14,11 +14,14 @@ To command ``run`` has some options:
rfswift run [flags]
Flags:
-b, --bind string extra bindings (separate them with commas)
-e, --command string command to exec (default: '/bin/bash')
-d, --display string set X Display (default: 'DISPLAY=:0')
-h, --help help for run
-i, --image string image (default: 'myrfswift:latest')
-b, --bind string extra bindings (separate them with commas)
-e, --command string command to exec (by default: '/bin/bash')
-d, --display string set X Display (by default: 'DISPLAY=:0', and separate them with commas)
-x, --extrahosts string set extra hosts (default: 'pluto.local:192.168.1.2', and separate them with commas)
-h, --help help for run
-i, --image string image (default: 'myrfswift:latest')
-p, --pulseserver string PULSE SERVER TCP address (by default: tcp:localhost:34567) (default "tcp:localhost:34567")
Binding a directory

View File

@ -0,0 +1,45 @@
.. _winusb_commands:
winusb for Windows
===================
.. warning::
This command requires to be launch as an Administrator.
`winusb` is a set of sub command that allow to directly attach USB device to the container with `usbipd.exe`.
Here are the supported options:
.. code-block:: bash
Manage WinUSB devices
Usage:
rfswift winusb [command]
Available Commands:
attach Attach a bus ID
detach Detach a bus ID
list List bus IDs
To list USB device on the hosts you can issue `list` as follows:
.. code-block:: bash
rfswift winusb list
Which will give a list of devices and the status.
To attach the desired device to a container, you need to use `attach` command as follows:
.. code-block:: bash
rfswift winusb attach <usb ID like: 1-4>
You can also detach the device with the `detach` command.

View File

@ -69,7 +69,7 @@ By default, you can directly use the ``run`` command with the tag name of your c
Docker Desktop doesn't require administrator privileges.
To attach a USB device, you'll need to install and use `usbipd <https://learn.microsoft.com/en-us/windows/wsl/connect-usb>`_ tool as follows by first listing devices plugged in the computer:
To attach a USB device, you can our documented :ref:`winusb<winusb_commands>` to simplify USB device attachment on the container. Or you can also manually use `usbipd <https://learn.microsoft.com/en-us/windows/wsl/connect-usb>`_ tool as follows by first listing devices plugged in the computer:
.. code-block:: bash
@ -82,14 +82,6 @@ By default, you can directly use the ``run`` command with the tag name of your c
usbipd bind --busid <busid>
usbipd attach --wsl --busid <busid>
Demo:
.. raw:: html
<video width="320" height="240" controls>
<source src="/.assets/331809901-bb2ccd96-b688-4106-8fba-d82f84ff1ea4.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
To run a specific command when starting a new container, you can use ``-e`` argument as follows if you want to run the ``sdrpp`` (SDR++) application:
@ -104,14 +96,16 @@ Getting the sound
Some applications may require ``pulseaudio`` to be running.
To avoid any specific configuration for each plateform (Windows, macOS, Linux), we recommended to use ``pulseaudio`` in TCP with a defined port.
After we can use the ``PULSE_SERVER`` environment variable to tell to our program we are launching such as ``gqrx`` for example:
This is done by default when running a container, but you experience issue, look on the container if the ``PULSE_SERVER`` environment variable is set as follows:
.. code-block:: bash
PULSE_SERVER=tcp:<host IP address>:34567 gqrx
.. tip::
And also look if pulseaudi is well installed in your computer.
This step is manual but will be automated in next version of the ``rfswift`` tool.
For Windows users, you will have to `install pulseaudio for Windows and set <https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/>`_ ``$INSTALL_DIR/etc/pulse/default.pa`` as follows:
.. code-block:: bash
load-module module-native-protocol-tcp auth-ip-acl=$HOST_IP

View File

@ -4,3 +4,4 @@ Cantact tools,✅ ,✅
caringcaribou,✅ ,✅
savvycan,✅ ,✅
gallia,✅ ,✅
V2G Injector,✅ ,✅
1 Tool(s) amd64 aarch64
4 caringcaribou
5 savvycan
6 gallia
7 V2G Injector

View File

@ -80,4 +80,13 @@ reversing
.. csv-table:: Installed tools for reversing tag
:file: tools_for_reversing.csv
:header-rows: 1
:class: longtable
:class: longtable
telecom
---------
.. csv-table:: Installed tools for telecom tag
:file: tools_for_telecom.csv
:header-rows: 1
:class: longtable

View File

@ -96,4 +96,7 @@ You feel inspired and want to share you cakes, or you have an issues to report o
commands/hot_install.rst
commands/commit_change.rst
commands/renaming_images.rst
commands/removing_containers.rst
commands/removing_containers.rst
commands/delete_command.rst
commands/images_command.rst
commands/winusb_commands.rst