From f63d8f7196e3e263adf3d6636bd1a9a484191a3c Mon Sep 17 00:00:00 2001 From: jlpoole Date: Thu, 19 Feb 2026 08:59:12 -0800 Subject: [PATCH] Add USB_Naming --- USB_Naming.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 USB_Naming.md diff --git a/USB_Naming.md b/USB_Naming.md new file mode 100644 index 0000000..7dd47fd --- /dev/null +++ b/USB_Naming.md @@ -0,0 +1,16 @@ +Give your **devices permanent and meaningful names** so your commands are self-documenting which device you are working with. I decided to have names of /dev/tty + t (for T-Beam) + Device Name in all caps, e.g. /dev/ttytAMY. This is accomplished in Gentoo running Open RC with a rules page which is uploaded to this project. With my rules: + +``` +rnsenv) jlpoole@jp /usr/local/src/microreticulum/microReticulumTbeam/exercises/12_FiveTalk $ ls -l /dev/ttyt* +lrwxrwxrwx 1 root root 7 Feb 19 08:43 /dev/ttytAMY -> ttyACM0 +lrwxrwxrwx 1 root root 7 Feb 19 08:43 /dev/ttytBOB -> ttyACM1 +lrwxrwxrwx 1 root root 7 Feb 19 08:44 /dev/ttytCY -> ttyACM2 +lrwxrwxrwx 1 root root 7 Feb 19 08:44 /dev/ttytDAN -> ttyACM3 +lrwxrwxrwx 1 root root 7 Feb 19 08:44 /dev/ttytED -> ttyACM4 +(rnsenv) jlpoole@jp /usr/local/src/microreticulum/microReticulumTbeam/exercises/12_FiveTalk $ +``` +It no longer matters when and in what order I activate/deactivate devices, I can always relay on udev to assign the correct name to the device I intend. That makes loading up the code self-evident with: + +`pio run -e amy -t upload --upload-port /dev/ttytAMY` + +At age 69 with devices having acronyms assigned by the kernel in numerical order, i.e. `/dev/ttyACM0`, it's like herding cats and makes for ambiguous documentation thereafter: how do I know AMY was at `/dev/ttyACM0` when I ran the upload script? Answer: I don't. Now I do using its soft-linked name: `/dev/ttytAMY` \ No newline at end of file