From 4700e7aa6b9f4228aa3a449a084baeb43e32743b Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Fri, 31 May 2024 20:52:02 -0400 Subject: [PATCH 1/6] added useful linux commands page --- source/docs/troubleshooting/index.rst | 1 + source/docs/troubleshooting/unix-commands.rst | 51 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 source/docs/troubleshooting/unix-commands.rst diff --git a/source/docs/troubleshooting/index.rst b/source/docs/troubleshooting/index.rst index 22d50f14..7cd01f13 100644 --- a/source/docs/troubleshooting/index.rst +++ b/source/docs/troubleshooting/index.rst @@ -8,3 +8,4 @@ Troubleshooting logging camera-troubleshooting networking-troubleshooting + unix-commands \ No newline at end of file diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst new file mode 100644 index 00000000..07353447 --- /dev/null +++ b/source/docs/troubleshooting/unix-commands.rst @@ -0,0 +1,51 @@ +Useful Unix Commands +==================== + +This document provides a list of useful Unix commands for troubleshooting. + +SSH +--- + +SSH (Secure Shell) is used to securely connect to remote systems. In our case we want to SSH from the host machine (device on the same network as your coprocessor) to your coprocessor / remote device. + +.. note:: Unlike the others on this page, this command is not Unix specific and can be done on Windows and MacOS from their respective terminals. + +Example: + +.. code-block:: bash + + ssh username@hostname + +ifconfig +-------- + +Run ``ifconfig`` with your coprocessor connected to a monitor / keyboard in order to see its IP address and other network configuration information. + + +SCP +--- + +SCP (Secure Copy) is used to securely transfer files between local and remote systems. + +Example: + +.. code-block:: bash + + scp [file] username@hostname:/path/to/destination + +v4l2-ctl +-------- + +v4l2-ctl is a command-line tool for controlling video devices. + +List available video devices (used to verify the device recognized a connected camera): + +.. code-block:: bash + + v4l2-ctl --list-devices + +List supported formats and resolutions for a specific video device: + +.. code-block:: bash + + v4l2-ctl --list-formats-ext --device /path/to/video_device From 3c2662068a1c905cfc0170a5ab09831ef73586d8 Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Fri, 31 May 2024 20:54:10 -0400 Subject: [PATCH 2/6] cleanup language --- source/docs/troubleshooting/unix-commands.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst index 07353447..58433afb 100644 --- a/source/docs/troubleshooting/unix-commands.rst +++ b/source/docs/troubleshooting/unix-commands.rst @@ -1,14 +1,12 @@ Useful Unix Commands ==================== -This document provides a list of useful Unix commands for troubleshooting. - SSH --- -SSH (Secure Shell) is used to securely connect to remote systems. In our case we want to SSH from the host machine (device on the same network as your coprocessor) to your coprocessor / remote device. +SSH (Secure Shell) is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). -.. note:: Unlike the others on this page, this command is not Unix specific and can be done on Windows and MacOS from their respective terminals. +.. note:: Unlike the other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. Example: @@ -19,7 +17,7 @@ Example: ifconfig -------- -Run ``ifconfig`` with your coprocessor connected to a monitor / keyboard in order to see its IP address and other network configuration information. +Run ``ifconfig`` with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. SCP From 7d492a9f1f32b5c8222a4dcfd74990be4b395fbc Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Fri, 31 May 2024 20:57:05 -0400 Subject: [PATCH 3/6] added manpage links --- source/docs/troubleshooting/unix-commands.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst index 58433afb..87e05200 100644 --- a/source/docs/troubleshooting/unix-commands.rst +++ b/source/docs/troubleshooting/unix-commands.rst @@ -4,7 +4,7 @@ Useful Unix Commands SSH --- -SSH (Secure Shell) is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). +`SSH (Secure Shell) `_ is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). .. note:: Unlike the other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. @@ -17,13 +17,13 @@ Example: ifconfig -------- -Run ``ifconfig`` with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. +Run `ifconfig `_ with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. SCP --- -SCP (Secure Copy) is used to securely transfer files between local and remote systems. +`SCP (Secure Copy) `_ is used to securely transfer files between local and remote systems. Example: @@ -34,7 +34,7 @@ Example: v4l2-ctl -------- -v4l2-ctl is a command-line tool for controlling video devices. +`v4l2-ctl `_ is a command-line tool for controlling video devices. List available video devices (used to verify the device recognized a connected camera): From e04afc33f6c2d57b61d399f06831d0d1a87abfd6 Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Fri, 31 May 2024 20:58:51 -0400 Subject: [PATCH 4/6] lint --- source/docs/troubleshooting/index.rst | 2 +- source/docs/troubleshooting/unix-commands.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/docs/troubleshooting/index.rst b/source/docs/troubleshooting/index.rst index 7cd01f13..d6f1795b 100644 --- a/source/docs/troubleshooting/index.rst +++ b/source/docs/troubleshooting/index.rst @@ -8,4 +8,4 @@ Troubleshooting logging camera-troubleshooting networking-troubleshooting - unix-commands \ No newline at end of file + unix-commands diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst index 87e05200..2db11cd7 100644 --- a/source/docs/troubleshooting/unix-commands.rst +++ b/source/docs/troubleshooting/unix-commands.rst @@ -28,7 +28,7 @@ SCP Example: .. code-block:: bash - + scp [file] username@hostname:/path/to/destination v4l2-ctl @@ -39,11 +39,11 @@ v4l2-ctl List available video devices (used to verify the device recognized a connected camera): .. code-block:: bash - + v4l2-ctl --list-devices List supported formats and resolutions for a specific video device: .. code-block:: bash - + v4l2-ctl --list-formats-ext --device /path/to/video_device From 441dee4ee3e10f97cb14373398b2183e3d40a1a6 Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Sat, 1 Jun 2024 19:18:07 -0400 Subject: [PATCH 5/6] address review --- source/docs/troubleshooting/unix-commands.rst | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst index 2db11cd7..f95c2524 100644 --- a/source/docs/troubleshooting/unix-commands.rst +++ b/source/docs/troubleshooting/unix-commands.rst @@ -4,9 +4,10 @@ Useful Unix Commands SSH --- -`SSH (Secure Shell) `_ is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). +`SSH (Secure Shell) `_ is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). Unlike other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. -.. note:: Unlike the other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. +.. note:: + You may see a warning similar to "The authenticity of host 'xxx' can't be established..." or "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!", in most cases this can be safely ignored if you have confirmed that you are connecting to the correct host over a secure connection. You can read more about it `here `_. Example: @@ -14,10 +15,10 @@ Example: ssh username@hostname -ifconfig --------- +ip +-- -Run `ifconfig `_ with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. +Run `ip address `_ with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. SCP @@ -47,3 +48,14 @@ List supported formats and resolutions for a specific video device: .. code-block:: bash v4l2-ctl --list-formats-ext --device /path/to/video_device + +List all video device's controls and their values: + +.. code-block:: bash + + v4l2-ctl --list-ctrls --device path/to/video_device + +.. note:: + + This command is especially useful in helping to debug when certain camera controls, like exposure, aren't behaving as expected. If you see an error in the logs similar to "WARNING 30: failed to set property [property name] (UsbCameraImpl.cpp:646)", that means that PhotonVision is trying to use a control that doesn't exist or has a different name on your hardware. If you encounter this issue, please `file an issue `_ with the necessary logs and output of the v4l2-ctl --list-ctrls command. + From 26a00520fff74429d2e7bb4d9c3901757d0f1e1e Mon Sep 17 00:00:00 2001 From: Mohammad Durrani Date: Sat, 1 Jun 2024 19:22:23 -0400 Subject: [PATCH 6/6] lint --- source/docs/troubleshooting/unix-commands.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/docs/troubleshooting/unix-commands.rst b/source/docs/troubleshooting/unix-commands.rst index f95c2524..fdb6de70 100644 --- a/source/docs/troubleshooting/unix-commands.rst +++ b/source/docs/troubleshooting/unix-commands.rst @@ -4,9 +4,9 @@ Useful Unix Commands SSH --- -`SSH (Secure Shell) `_ is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). Unlike other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. +`SSH (Secure Shell) `_ is used to securely connect from a local to a remote system (ex. from a laptop to a coprocessor). Unlike other commands on this page, ssh is not Unix specific and can be done on Windows and MacOS from their respective terminals. -.. note:: +.. note:: You may see a warning similar to "The authenticity of host 'xxx' can't be established..." or "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!", in most cases this can be safely ignored if you have confirmed that you are connecting to the correct host over a secure connection. You can read more about it `here `_. Example: @@ -56,6 +56,6 @@ List all video device's controls and their values: v4l2-ctl --list-ctrls --device path/to/video_device .. note:: - + This command is especially useful in helping to debug when certain camera controls, like exposure, aren't behaving as expected. If you see an error in the logs similar to "WARNING 30: failed to set property [property name] (UsbCameraImpl.cpp:646)", that means that PhotonVision is trying to use a control that doesn't exist or has a different name on your hardware. If you encounter this issue, please `file an issue `_ with the necessary logs and output of the v4l2-ctl --list-ctrls command.