Skip to content

Commit

Permalink
Internal improvements
Browse files Browse the repository at this point in the history
* place `51-coinkite.rules` into `coldcard-cli` crate root
  • Loading branch information
alfred-hodler committed Jan 31, 2024
1 parent ed2d99c commit 3ce7aad
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions coldcard-cli/51-coinkite.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Linux udev support file.
#
# This is a example udev file for HIDAPI devices which changes the permissions
# to 0666 (world readable/writable) for a specific device on Linux systems.
#
# - Copy this file into /etc/udev/rules.d and unplug and re-plug your Coldcard.
# - Udev does not have to be restarted.
#

# probably not needed:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="d13e", ATTRS{idProduct}=="cc10", GROUP="plugdev", MODE="0666"

# required:
# from <https://github.com/signal11/hidapi/blob/master/udev/99-hid.rules>
KERNEL=="hidraw*", ATTRS{idVendor}=="d13e", ATTRS{idProduct}=="cc10", GROUP="plugdev", MODE="0666"

2 changes: 1 addition & 1 deletion coldcard-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ fn handle(cli: Cli) -> Result<(), Error> {
} else {
match std::fs::File::create(UDEV_FILE) {
Ok(mut file) => {
file.write_all(include_bytes!("../../51-coinkite.rules"))?;
file.write_all(include_bytes!("../51-coinkite.rules"))?;
eprintln!("udev rules installed");
}
Err(err) if err.kind() == std::io::ErrorKind::PermissionDenied => {
Expand Down

0 comments on commit 3ce7aad

Please sign in to comment.