From ec38eb7945673e2381e5934b48ef76b37eb32642 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:14:52 -0500 Subject: [PATCH 01/22] Update website.yml --- .github/workflows/website.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index b30e9eb5f6..4d746fb6a6 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: cd /website - name: Setup Node uses: actions/setup-node@v4 - name: Install packages From c1c7e7cc8783a3f62ca8b4ef45dcc253925bc0fd Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:18:04 -0500 Subject: [PATCH 02/22] Update website.yml --- .github/workflows/website.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 4d746fb6a6..1bcbc015b2 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -13,13 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: cd /website - name: Setup Node uses: actions/setup-node@v4 - name: Install packages - run: npm ci + run: cd /website | npm ci - name: Build project - run: npm run build + run: cd /website | npm run build - uses: up9cloud/action-rsync@v1.4 env: HOST: ${{ secrets.WEBMASTER_SSH_HOST }} From 64b4203221bad811b33f1ba096592220090dca1a Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:20:06 -0500 Subject: [PATCH 03/22] Update website.yml --- .github/workflows/website.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 1bcbc015b2..7afa8aa952 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -17,8 +17,10 @@ jobs: uses: actions/setup-node@v4 - name: Install packages run: cd /website | npm ci + working-directory: /website - name: Build project - run: cd /website | npm run build + run: npm run build + working-directory: /website - uses: up9cloud/action-rsync@v1.4 env: HOST: ${{ secrets.WEBMASTER_SSH_HOST }} From 6a2e69eba1034503847d9bfc0875c1d4d383d995 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:20:45 -0500 Subject: [PATCH 04/22] Update website.yml --- .github/workflows/website.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 7afa8aa952..6ba538a24b 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -16,11 +16,11 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 - name: Install packages - run: cd /website | npm ci + run: cd website | npm ci working-directory: /website - name: Build project run: npm run build - working-directory: /website + working-directory: website - uses: up9cloud/action-rsync@v1.4 env: HOST: ${{ secrets.WEBMASTER_SSH_HOST }} From 14178a1cfad95398a97a65655edb02098f58649f Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:22:26 -0500 Subject: [PATCH 05/22] Update website.yml --- .github/workflows/website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 6ba538a24b..3164952a37 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -16,7 +16,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 - name: Install packages - run: cd website | npm ci + run: npm ci working-directory: /website - name: Build project run: npm run build From e675ca5b4b67e7a3124f5583cb993d173a21fab3 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:24:21 -0500 Subject: [PATCH 06/22] Update website.yml --- .github/workflows/website.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 3164952a37..9d55dc5646 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -15,6 +15,9 @@ jobs: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 + - name: List files in repo + run: ls -R + - name: Install packages run: npm ci working-directory: /website From 0ca0a343d3fdb2968ba28295443501307badead4 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:26:44 -0500 Subject: [PATCH 07/22] Update website.yml --- .github/workflows/website.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 9d55dc5646..b9cd1d2b7a 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -20,7 +20,7 @@ jobs: - name: Install packages run: npm ci - working-directory: /website + working-directory: website - name: Build project run: npm run build working-directory: website From e9237883ccb5b5c1961ad08e815aa7d9f1253fe8 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Thu, 10 Apr 2025 22:28:38 -0500 Subject: [PATCH 08/22] Update website.yml --- .github/workflows/website.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index b9cd1d2b7a..83008e5b1d 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -15,9 +15,6 @@ jobs: - uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v4 - - name: List files in repo - run: ls -R - - name: Install packages run: npm ci working-directory: website @@ -29,5 +26,5 @@ jobs: HOST: ${{ secrets.WEBMASTER_SSH_HOST }} USER: ${{ secrets.WEBMASTER_SSH_USERNAME }} KEY: ${{secrets.WEBMASTER_SSH_KEY}} - SOURCE: /website/dist/* + SOURCE: website/dist/* TARGET: /var/www/html/photonvision-website From 207f0978a0bb763dec0b34942d3b819ad3eb7270 Mon Sep 17 00:00:00 2001 From: Sam948-byte Date: Fri, 11 Apr 2025 22:43:46 -0500 Subject: [PATCH 09/22] add unix-troubleshooting to docs --- docs/source/docs/troubleshooting/index.md | 1 + .../docs/troubleshooting/unix-commands.md | 60 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 docs/source/docs/troubleshooting/unix-commands.md diff --git a/docs/source/docs/troubleshooting/index.md b/docs/source/docs/troubleshooting/index.md index 0b8f8384c8..00fe776352 100644 --- a/docs/source/docs/troubleshooting/index.md +++ b/docs/source/docs/troubleshooting/index.md @@ -7,4 +7,5 @@ common-errors logging camera-troubleshooting networking-troubleshooting +unix-commands ``` diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md new file mode 100644 index 0000000000..efcc666aa0 --- /dev/null +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -0,0 +1,60 @@ +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. + +.. 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: + +.. code-block:: bash + + ssh username@hostname + +ip +-- + +Run `ip address `_ 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. + +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 + +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 f86fdafc5b4e8b4b64900abc85d6c84b87444d57 Mon Sep 17 00:00:00 2001 From: Sam948-byte Date: Fri, 11 Apr 2025 22:51:51 -0500 Subject: [PATCH 10/22] update to test this is accurate --- docs/source/docs/troubleshooting/unix-commands.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index efcc666aa0..38647779b6 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -4,16 +4,17 @@ 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)](https://www.mankier.com/1/ssh) 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: -.. code-block:: bash - +:::{code-block} ssh username@hostname +::: ip -- From 84c7f24a0fcd224ecc18992993af2e96389626b7 Mon Sep 17 00:00:00 2001 From: Sam948-byte Date: Fri, 11 Apr 2025 22:58:53 -0500 Subject: [PATCH 11/22] updated format --- .../docs/troubleshooting/unix-commands.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 38647779b6..c4b354a4a6 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -7,55 +7,55 @@ SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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} - 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 `_. +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: :::{code-block} - ssh username@hostname +ssh username@hostname ::: ip -- -Run `ip address `_ with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. +Run [ip address](https://www.mankier.com/8/ip) 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)](https://www.mankier.com/1/scp) is used to securely transfer files between local and remote systems. Example: -.. code-block:: bash - - scp [file] username@hostname:/path/to/destination +:::{code-block} +scp [file] username@hostname:/path/to/destination +::: v4l2-ctl -------- -`v4l2-ctl `_ is a command-line tool for controlling video devices. +[v4l2-ctl](https://www.mankier.com/1/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 +:::{code-block} +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 +:::{code-block} +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:: +:::{code-block} +v4l2-ctl --list-ctrls --device path/to/video_device +::: - 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. +:::{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 6b4a0e5bf9d55dad9d85d39fbdcdefd54249a975 Mon Sep 17 00:00:00 2001 From: Sam948-byte Date: Fri, 11 Apr 2025 23:03:47 -0500 Subject: [PATCH 12/22] fix links --- docs/source/docs/troubleshooting/unix-commands.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index c4b354a4a6..4e4a8a6b97 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -7,7 +7,7 @@ SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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} -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 `_. +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](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) ::: Example: @@ -57,5 +57,5 @@ 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. +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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the v4l2-ctl --list-ctrls command. ::: From b447a81d876384e6343e3d2fb22cecba0d70fa48 Mon Sep 17 00:00:00 2001 From: Sam948-byte Date: Fri, 11 Apr 2025 23:10:35 -0500 Subject: [PATCH 13/22] add code formatting --- docs/source/docs/troubleshooting/unix-commands.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 4e4a8a6b97..43721ee95e 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -7,7 +7,7 @@ SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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} -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](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) +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](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) ::: Example: @@ -57,5 +57,5 @@ 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the v4l2-ctl --list-ctrls command. +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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. ::: From d044c778ce9d0f4554b428f19d0e38cfcb28aa64 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Sun, 13 Apr 2025 23:19:57 -0500 Subject: [PATCH 14/22] Update docs/source/docs/troubleshooting/unix-commands.md Co-authored-by: Matt Morley --- docs/source/docs/troubleshooting/unix-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 43721ee95e..34042dd867 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -7,7 +7,7 @@ SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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} -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](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) +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, and the fingerprint will change when your operating system is reinstalled or PhotonVision's coprocessor image is re-flashed. You can read more about it [here](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) ::: Example: From 57d33874dfc2f07c38c88372092a0406d826adbb Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 13:55:47 -0500 Subject: [PATCH 15/22] add sftp, systemctl, and journalctl --- .../docs/troubleshooting/unix-commands.md | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 34042dd867..4a288d1f8b 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -33,8 +33,13 @@ Example: scp [file] username@hostname:/path/to/destination ::: +SFTP +--- + +[SFTP (SSH File Transfer Protocol)](https://www.mankier.com/1/sftp#) is another option for transferring files between local and remote systems. + v4l2-ctl --------- +--- [v4l2-ctl](https://www.mankier.com/1/v4l2-ctl) is a command-line tool for controlling video devices. @@ -59,3 +64,43 @@ 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. ::: + +systemctl +--- + +[systemctl](https://www.mankier.com/1/systemctl) is a command that controls the `systemd` system and service manager. + +Start PhotonVision: + +:::{code-block} +systemctl start photonvision +::: + +Stop PhotonVision: + +:::{code-block} +systemctl stop photonvision +::: + +Restart PhotonVision: + +:::{code-block} +systemctl restart photonvision +::: + +journalctl +--- + +[journalctl](https://www.mankier.com/1/journalctl) is a command that queries the systemd journal, which is a logging system used by many Linux distributions. + +View the PhotonVision logs: + +:::{code-block} +journalctl -u photonvision +::: + +View the PhotonVision logs in real-time: + +:::{code-block} +journalctl -u photonvision -f +::: From fbc7c741065a1a05583b442664a0fd24d6b08233 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 13:55:47 -0500 Subject: [PATCH 16/22] add sftp, systemctl, and journalctl --- .../docs/troubleshooting/unix-commands.md | 49 ++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 34042dd867..c90ea2ce2c 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -17,7 +17,7 @@ ssh username@hostname ::: ip --- +--- Run [ip address](https://www.mankier.com/8/ip) with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. @@ -33,8 +33,13 @@ Example: scp [file] username@hostname:/path/to/destination ::: +SFTP +--- + +[SFTP (SSH File Transfer Protocol)](https://www.mankier.com/1/sftp#) is another option for transferring files between local and remote systems. + v4l2-ctl --------- +--- [v4l2-ctl](https://www.mankier.com/1/v4l2-ctl) is a command-line tool for controlling video devices. @@ -59,3 +64,43 @@ 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. ::: + +systemctl +--- + +[systemctl](https://www.mankier.com/1/systemctl) is a command that controls the `systemd` system and service manager. + +Start PhotonVision: + +:::{code-block} +systemctl start photonvision +::: + +Stop PhotonVision: + +:::{code-block} +systemctl stop photonvision +::: + +Restart PhotonVision: + +:::{code-block} +systemctl restart photonvision +::: + +journalctl +--- + +[journalctl](https://www.mankier.com/1/journalctl) is a command that queries the systemd journal, which is a logging system used by many Linux distributions. + +View the PhotonVision logs: + +:::{code-block} +journalctl -u photonvision +::: + +View the PhotonVision logs in real-time: + +:::{code-block} +journalctl -u photonvision -f +::: From 0efb823b2d3abf4d303f4dfcf679a415268c916a Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 15:02:03 -0500 Subject: [PATCH 17/22] update unix commands --- .../docs/troubleshooting/unix-commands.md | 53 ++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index c90ea2ce2c..87b402409b 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -1,45 +1,56 @@ -Useful Unix Commands -==================== +# Useful Unix Commands -SSH ---- +## SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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} -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, and the fingerprint will change when your operating system is reinstalled or PhotonVision's coprocessor image is re-flashed. You can read more about it [here](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) +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, and the fingerprint will change when your operating system is reinstalled or PhotonVision's coprocessor image is re-flashed. This can also occur if you have multiple coprocessors with the same hostname on your network. You can read more about it [here](https://superuser.com/questions/421997/what-is-a-ssh-key-fingerprint-and-how-is-it-generated) ::: Example: :::{code-block} -ssh username@hostname +ssh pi@hostname ::: -ip ---- +For PhotonVision, the username will be `pi` and the password will be `raspberry`. + +## ip Run [ip address](https://www.mankier.com/8/ip) with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. +Your output might look something like this: + +:::{code-block} +2: end1: mtu 1500 qdisc mq state UP group default qlen 1000 + link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff + inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 + valid_lft 27367sec preferred_lft 27367sec + +::: + +In this example, the numbers following `inet` (10.88.47.12) are your IP address. -SCP ---- +## SCP [SCP (Secure Copy)](https://www.mankier.com/1/scp) is used to securely transfer files between local and remote systems. Example: :::{code-block} -scp [file] username@hostname:/path/to/destination +scp [file] pi@hostname:/path/to/destination ::: -SFTP ---- +## SFTP [SFTP (SSH File Transfer Protocol)](https://www.mankier.com/1/sftp#) is another option for transferring files between local and remote systems. -v4l2-ctl ---- +## Filezilla + +[Filezilla](https://filezilla-project.org/) is a GUI alternative to SCP and SFTP. It is available for Windows, MacOS, and Linux. + +## v4l2-ctl [v4l2-ctl](https://www.mankier.com/1/v4l2-ctl) is a command-line tool for controlling video devices. @@ -65,8 +76,7 @@ v4l2-ctl --list-ctrls --device path/to/video_device 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. ::: -systemctl ---- +## systemctl [systemctl](https://www.mankier.com/1/systemctl) is a command that controls the `systemd` system and service manager. @@ -88,8 +98,13 @@ Restart PhotonVision: systemctl restart photonvision ::: -journalctl ---- +Check the status of PhotonVision: + +:::{code-block} +systemctl status photonvision +::: + +## journalctl [journalctl](https://www.mankier.com/1/journalctl) is a command that queries the systemd journal, which is a logging system used by many Linux distributions. From 5ee34974291f804f2ac1e0a438be5286531a9f78 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 15:06:12 -0500 Subject: [PATCH 18/22] add ping --- docs/source/docs/troubleshooting/unix-commands.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 87b402409b..5561b1aab1 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -24,14 +24,18 @@ Your output might look something like this: :::{code-block} 2: end1: mtu 1500 qdisc mq state UP group default qlen 1000 - link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff - inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 - valid_lft 27367sec preferred_lft 27367sec +link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff +inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 +valid_lft 27367sec preferred_lft 27367sec ::: In this example, the numbers following `inet` (10.88.47.12) are your IP address. +## ping + +[ping](https://www.mankier.com/8/ping) is a command-line utility used to test the reachability of a host on an IP network. It also measures the round-trip time for messages sent from the originating host to a destination computer. It can be used to determine if a network interface is available, which can be helpful when debugging. + ## SCP [SCP (Secure Copy)](https://www.mankier.com/1/scp) is used to securely transfer files between local and remote systems. From 704d34dae27f62caf734887fc9122bedae2c5620 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 15:11:55 -0500 Subject: [PATCH 19/22] formatting --- docs/source/docs/troubleshooting/unix-commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 5561b1aab1..2896adf012 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -24,9 +24,9 @@ Your output might look something like this: :::{code-block} 2: end1: mtu 1500 qdisc mq state UP group default qlen 1000 -link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff -inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 -valid_lft 27367sec preferred_lft 27367sec + link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff + inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 + valid_lft 27367sec preferred_lft 27367sec ::: From ee23027ea4b12ad1ffd28a1497ed4b9698dfb6b6 Mon Sep 17 00:00:00 2001 From: samfreund Date: Wed, 7 May 2025 15:17:17 -0500 Subject: [PATCH 20/22] native code blocks --- .../docs/troubleshooting/unix-commands.md | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 2896adf012..bedc7cc2eb 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -10,9 +10,9 @@ You may see a warning similar to `The authenticity of host 'xxx' can't be establ Example: -:::{code-block} +``` ssh pi@hostname -::: +``` For PhotonVision, the username will be `pi` and the password will be `raspberry`. @@ -22,13 +22,12 @@ Run [ip address](https://www.mankier.com/8/ip) with your coprocessor connected t Your output might look something like this: -:::{code-block} +``` 2: end1: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether de:9a:8f:7d:31:aa brd ff:ff:ff:ff:ff:ff inet 10.88.47.12/24 brd 10.88.47.255 scope global dynamic noprefixroute end1 valid_lft 27367sec preferred_lft 27367sec - -::: +``` In this example, the numbers following `inet` (10.88.47.12) are your IP address. @@ -42,9 +41,9 @@ In this example, the numbers following `inet` (10.88.47.12) are your IP address. Example: -:::{code-block} +``` scp [file] pi@hostname:/path/to/destination -::: +``` ## SFTP @@ -60,21 +59,21 @@ scp [file] pi@hostname:/path/to/destination List available video devices (used to verify the device recognized a connected camera): -:::{code-block} +``` v4l2-ctl --list-devices -::: +``` List supported formats and resolutions for a specific video device: -:::{code-block} +``` v4l2-ctl --list-formats-ext --device /path/to/video_device -::: +``` List all video device's controls and their values: -:::{code-block} +``` 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. @@ -86,27 +85,27 @@ This command is especially useful in helping to debug when certain camera contro Start PhotonVision: -:::{code-block} +``` systemctl start photonvision -::: +``` Stop PhotonVision: -:::{code-block} +``` systemctl stop photonvision -::: +``` Restart PhotonVision: -:::{code-block} +``` systemctl restart photonvision -::: +``` Check the status of PhotonVision: -:::{code-block} +``` systemctl status photonvision -::: +``` ## journalctl @@ -114,12 +113,12 @@ systemctl status photonvision View the PhotonVision logs: -:::{code-block} +``` journalctl -u photonvision -::: +``` View the PhotonVision logs in real-time: -:::{code-block} +``` journalctl -u photonvision -f -::: +``` From d6c3562226b684eb96ede10b8484cc8641a906f6 Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Wed, 7 May 2025 15:34:03 -0500 Subject: [PATCH 21/22] Update unix-commands.md --- .../docs/troubleshooting/unix-commands.md | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index bedc7cc2eb..92eb273a69 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -1,6 +1,8 @@ # Useful Unix Commands -## SSH +## Networking + +### SSH [SSH (Secure Shell)](https://www.mankier.com/1/ssh) 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. @@ -16,7 +18,7 @@ ssh pi@hostname For PhotonVision, the username will be `pi` and the password will be `raspberry`. -## ip +### ip Run [ip address](https://www.mankier.com/8/ip) with your coprocessor connected to a monitor in order to see its IP address and other network configuration information. @@ -31,11 +33,15 @@ Your output might look something like this: In this example, the numbers following `inet` (10.88.47.12) are your IP address. -## ping +### ping [ping](https://www.mankier.com/8/ping) is a command-line utility used to test the reachability of a host on an IP network. It also measures the round-trip time for messages sent from the originating host to a destination computer. It can be used to determine if a network interface is available, which can be helpful when debugging. -## SCP +## File Transfer + +All files under `/opt/photonvision` are owned by the root user. This means that if you want to modify them, the commands to do so must be ran as sudo. + +### SCP [SCP (Secure Copy)](https://www.mankier.com/1/scp) is used to securely transfer files between local and remote systems. @@ -45,15 +51,17 @@ Example: scp [file] pi@hostname:/path/to/destination ``` -## SFTP +### SFTP [SFTP (SSH File Transfer Protocol)](https://www.mankier.com/1/sftp#) is another option for transferring files between local and remote systems. -## Filezilla +### Filezilla [Filezilla](https://filezilla-project.org/) is a GUI alternative to SCP and SFTP. It is available for Windows, MacOS, and Linux. -## v4l2-ctl +## Miscellaneous + +### v4l2-ctl [v4l2-ctl](https://www.mankier.com/1/v4l2-ctl) is a command-line tool for controlling video devices. @@ -79,7 +87,7 @@ v4l2-ctl --list-ctrls --device path/to/video_device 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](https://github.com/PhotonVision/photonvision/issues) with the necessary logs and output of the `v4l2-ctl --list-ctrls` command. ::: -## systemctl +### systemctl [systemctl](https://www.mankier.com/1/systemctl) is a command that controls the `systemd` system and service manager. @@ -107,7 +115,7 @@ Check the status of PhotonVision: systemctl status photonvision ``` -## journalctl +### journalctl [journalctl](https://www.mankier.com/1/journalctl) is a command that queries the systemd journal, which is a logging system used by many Linux distributions. From bfd4f3e84aa03dc79479ee7fe8fcc43be6740aff Mon Sep 17 00:00:00 2001 From: Sam Freund Date: Wed, 7 May 2025 15:43:02 -0500 Subject: [PATCH 22/22] Update unix-commands.md --- docs/source/docs/troubleshooting/unix-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 92eb273a69..4f8e5e3fd5 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -39,7 +39,7 @@ In this example, the numbers following `inet` (10.88.47.12) are your IP address. ## File Transfer -All files under `/opt/photonvision` are owned by the root user. This means that if you want to modify them, the commands to do so must be ran as sudo. +All files under `/opt/photonvision` are owned by the root user. This means that if you want to modify them, the commands to do so must be ran as sudo. ### SCP