From 8ea24a9a15454046b7463f505845ae361974370d Mon Sep 17 00:00:00 2001 From: ykyohei <38639108+ykyohei@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:41:14 -0500 Subject: [PATCH 1/3] add documentation of udev rules for hwp-pcu --- docs/agents/hwp_pcu.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/agents/hwp_pcu.rst b/docs/agents/hwp_pcu.rst index 7b9169508..1e8dc3e2b 100644 --- a/docs/agents/hwp_pcu.rst +++ b/docs/agents/hwp_pcu.rst @@ -18,6 +18,15 @@ motors the same. :func: make_parser :prog: python3 agent.py +Dependencies +------------ + +The PCU device shows up on the system as /dev/ttyACMx where x is not guaranteed to be consistent. To solve this issue we should create a udev rule for the PCU device. The Lakeshore240's have solved the same issue by making udev rules in simonsobs/ls240-drivers repository. We can make the udev rule for PCU in the same way. The example is as follows:: + +$ SUBSYSTEM == "tty", ATTRS{idVendor} == "2a19", ATTRS{idProduct} == "0c02", MODE = "0666", SYMLINK = "PCU" + +If your devices were plugged in already you will need to unplug and replug them for the udev rules to properly recognize the devices and set the path and permissions appropriately. Once you complete this step they will be recongized on reboots, and the udev rules will not need to be reinstalled unless you add a new device. + Configuration File Examples --------------------------- From dca145dd208b43e842a173522568901facfcb413 Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Thu, 25 Jan 2024 14:24:56 -0500 Subject: [PATCH 2/3] Wrap text to 80 characters --- docs/agents/hwp_pcu.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/agents/hwp_pcu.rst b/docs/agents/hwp_pcu.rst index 1e8dc3e2b..813f8b682 100644 --- a/docs/agents/hwp_pcu.rst +++ b/docs/agents/hwp_pcu.rst @@ -21,11 +21,19 @@ motors the same. Dependencies ------------ -The PCU device shows up on the system as /dev/ttyACMx where x is not guaranteed to be consistent. To solve this issue we should create a udev rule for the PCU device. The Lakeshore240's have solved the same issue by making udev rules in simonsobs/ls240-drivers repository. We can make the udev rule for PCU in the same way. The example is as follows:: +The PCU device shows up on the system as /dev/ttyACMx where x is not guaranteed +to be consistent. To solve this issue we should create a udev rule for the PCU +device. The Lakeshore240's have solved the same issue by making udev rules in +simonsobs/ls240-drivers repository. We can make the udev rule for PCU in the +same way. The example is as follows:: $ SUBSYSTEM == "tty", ATTRS{idVendor} == "2a19", ATTRS{idProduct} == "0c02", MODE = "0666", SYMLINK = "PCU" -If your devices were plugged in already you will need to unplug and replug them for the udev rules to properly recognize the devices and set the path and permissions appropriately. Once you complete this step they will be recongized on reboots, and the udev rules will not need to be reinstalled unless you add a new device. +If your devices were plugged in already you will need to unplug and replug them +for the udev rules to properly recognize the devices and set the path and +permissions appropriately. Once you complete this step they will be recongized +on reboots, and the udev rules will not need to be reinstalled unless you add a +new device. Configuration File Examples --------------------------- From 7683c2c1b8d0c5b602d379c8f1d57d521432a500 Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Thu, 25 Jan 2024 14:35:06 -0500 Subject: [PATCH 3/3] Edit udev rule description * Fix syntax in udev rule example * Remove mention of lakeshore240 * Specify location for rules to be installed * Define where PCU symlink ends up * Format some paths * Add note about serial number definition in rules if needed --- docs/agents/hwp_pcu.rst | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/docs/agents/hwp_pcu.rst b/docs/agents/hwp_pcu.rst index 813f8b682..8aa02acce 100644 --- a/docs/agents/hwp_pcu.rst +++ b/docs/agents/hwp_pcu.rst @@ -21,19 +21,24 @@ motors the same. Dependencies ------------ -The PCU device shows up on the system as /dev/ttyACMx where x is not guaranteed -to be consistent. To solve this issue we should create a udev rule for the PCU -device. The Lakeshore240's have solved the same issue by making udev rules in -simonsobs/ls240-drivers repository. We can make the udev rule for PCU in the -same way. The example is as follows:: - -$ SUBSYSTEM == "tty", ATTRS{idVendor} == "2a19", ATTRS{idProduct} == "0c02", MODE = "0666", SYMLINK = "PCU" - -If your devices were plugged in already you will need to unplug and replug them -for the udev rules to properly recognize the devices and set the path and -permissions appropriately. Once you complete this step they will be recongized -on reboots, and the udev rules will not need to be reinstalled unless you add a -new device. +The PCU device shows up on the system as ``/dev/ttyACMx`` where ``x`` is not +guaranteed to be consistent. To solve this issue we should create a udev rule +for the PCU device. Establish the udev rule by creating a file in +``/etc/udev/rules.d/`` with the following contents:: + + SUBSYSTEM=="tty", ATTRS{idVendor}=="2a19", ATTRS{idProduct}=="0c02", MODE="0666", SYMLINK="PCU" + +.. note:: + If multiple PCU devices are connected to the same computer you will want to + include the serial number in the rules, which you can add with + ``ATTRS{serial}==""``. + +If the PCU was connected to the computer already you will need to unplug and +replug it for the udev rule to properly recognize the device, create the +symlink, and set the permissions appropriately. Once you complete this step the +device will be recongized on reboot, and the udev rules will not need to be +reinstalled unless you add a new device. The PCU should now be available at +``/dev/PCU``. Configuration File Examples ---------------------------