From f10cbbe43cf9b6006d4af0be27d2238c5b24785b Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 21 Jul 2022 14:54:25 +0200 Subject: [PATCH 1/2] Rename Ledger Test to Nano S Plus --- 20-hw1.rules | 4 ++-- add_udev_rules.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/20-hw1.rules b/20-hw1.rules index 5928fd4..cba158d 100644 --- a/20-hw1.rules +++ b/20-hw1.rules @@ -10,5 +10,5 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0002|2000|2001|20 SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0003|3000|3001|3002|3003|3004|3005|3006|3007|3008|3009|300a|300b|300c|300d|300e|300f|3010|3011|3012|3013|3014|3015|3016|3017|3018|3019|301a|301b|301c|301d|301e|301f", TAG+="uaccess", TAG+="udev-acl" # Nano X SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl" -# Ledger Test -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005|5000|5001|5002|5003|5004|5005|5006|5007|5008|5009|500a|500b|500c|500d|500e|500f|5010|5011|5012|5013|5014|5015|5016|5017|5018|5019|501a|501b|501c|501d|501e|501f", TAG+="uaccess", TAG+="udev-acl" \ No newline at end of file +# Nano S Plus +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005|5000|5001|5002|5003|5004|5005|5006|5007|5008|5009|500a|500b|500c|500d|500e|500f|5010|5011|5012|5013|5014|5015|5016|5017|5018|5019|501a|501b|501c|501d|501e|501f", TAG+="uaccess", TAG+="udev-acl" diff --git a/add_udev_rules.sh b/add_udev_rules.sh index db5fae1..3e1dc7c 100755 --- a/add_udev_rules.sh +++ b/add_udev_rules.sh @@ -12,7 +12,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0002|2000|2001|20 SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0003|3000|3001|3002|3003|3004|3005|3006|3007|3008|3009|300a|300b|300c|300d|300e|300f|3010|3011|3012|3013|3014|3015|3016|3017|3018|3019|301a|301b|301c|301d|301e|301f", TAG+="uaccess", TAG+="udev-acl" # Nano X SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl" -# Ledger Test +# Nano S Plus SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0005|5000|5001|5002|5003|5004|5005|5006|5007|5008|5009|500a|500b|500c|500d|500e|500f|5010|5011|5012|5013|5014|5015|5016|5017|5018|5019|501a|501b|501c|501d|501e|501f", TAG+="uaccess", TAG+="udev-acl" EOF From 6c4c8c606fd3c4b294577339173f8d824a235649 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 21 Jul 2022 14:55:39 +0200 Subject: [PATCH 2/2] Add explanations in header --- 20-hw1.rules | 11 +++++++++++ add_udev_rules.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/20-hw1.rules b/20-hw1.rules index cba158d..dd3ac59 100644 --- a/20-hw1.rules +++ b/20-hw1.rules @@ -1,3 +1,14 @@ +# Ledger device udev rules +# +# You may need to place this file in /etc/udev/rules.d/ and then run +# `udevadm control --reload` to enable non-root access to Ledger USB devices. +# +# Product identifiers are built using a 1-byte prefix corresponding to the device +# then 3-bytes to identify which USB interface are activated by current device +# application. For example "5011" corresponds to Nano S Plus with only WebUSB +# activated. +# Legacy product identifiers are "000[1-5]". + # HW.1 / Nano SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl" # Blue diff --git a/add_udev_rules.sh b/add_udev_rules.sh index 3e1dc7c..6da0174 100755 --- a/add_udev_rules.sh +++ b/add_udev_rules.sh @@ -1,5 +1,16 @@ #!/bin/bash cat < /etc/udev/rules.d/20-hw1.rules +# Ledger device udev rules +# +# You may need to place this file in /etc/udev/rules.d/ and then run +# `udevadm control --reload` to enable non-root access to Ledger USB devices. +# +# Product identifiers are built using a 1-byte prefix corresponding to the device +# then 3-bytes to identify which USB interface are activated by current device +# application. For example "5011" corresponds to Nano S Plus with only WebUSB +# activated. +# Legacy product identifiers are "000[1-5]". + # HW.1 / Nano SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl" # Blue