You are not logged in.

#1 2017-08-27 10:21:48

orrin5250
Member
Registered: 2016-10-12
Posts: 39

How to get Arch to recognize Ledger Nano S hardware wallet

I did not find anything specific in the wiki or forums regarding getting Arch configured to recognize my new hardware wallet.

I reviewed the wiki page for udev but there was nothing specific to this device.

Googling I found the following links:

https://steemit.com/bitcoin/@extol/ledg … arch-linux

sudo chown [username] /etc/udev/rules.d

cd /etc/udev/rules.d

nano 20-hw1.rules

Paste [shift+ctrl+v]

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", GROUP="users"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", GROUP="users"

Exit [ctrl+v] & Y to save & enter to confirm file name.

And...
http://support.ledgerwallet.com/knowled … d-on-linux

For Arch Linux, here are the following rules to use:

/etc/udev/rules.d/20-hw1.rules

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl"

If this still doesn't work you may need to add these rules:

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2c97"

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2581"

Do either of these look safe?  I am puzzled by the chown command in the first link (seems like bad system administration to me).  I am leaning towards the one from the ledger wallet support page.  I just wanted to check before screwing with the nuts and bolts of my system which is humming along nicely.  I figured it was best to ask because these are not official arch sources.  smile

Offline

#2 2017-08-27 16:06:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to get Arch to recognize Ledger Nano S hardware wallet

The chown command seems ill-advised.

Read the udev page on the wiki, it describes how to query udev and write rules for specific devices, rather than just pasting random ones.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-08-28 09:18:02

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: How to get Arch to recognize Ledger Nano S hardware wallet

I would definitely use official support documentation over some random website that makes you chown core system folders to your user...
The first set of lines seems perfectly fine to me. I'd just give those a shot. I would not include the lines under "If this still doesn't work..." until you've tested the specific ones first. These last lines are very much a 'catchall' style solution.

Offline

#4 2017-08-29 12:46:22

RogerS
Member
From: Sydney, NSW
Registered: 2012-02-16
Posts: 43
Website

Re: How to get Arch to recognize Ledger Nano S hardware wallet

I use a Nano S, with the 20-hw1.rules provided by ledgerwallet without issue.

Offline

#5 2017-10-30 19:01:48

dafero
Member
From: /home/dafero
Registered: 2014-03-22
Posts: 30

Re: How to get Arch to recognize Ledger Nano S hardware wallet

Official docs: https://ledger.groovehq.com/knowledge_b … d-on-linux

For Arch Linux, here are the following rules to use:

Add the followinf content to /etc/udev/rules.d/20-hw1.rules

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2c97"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev", ATTRS{idVendor}=="2581"

And then execute:

udevadm trigger
sudo udevadm control --reload-rules

It worked fine for me.

Last edited by dafero (2017-10-30 19:11:27)

Offline

#6 2017-12-05 14:58:14

lknix
Member
Registered: 2008-10-20
Posts: 19

Re: How to get Arch to recognize Ledger Nano S hardware wallet

Hey,

I'm still struggling with this. If I want to access the Ledger via one of the Chrome apps (e.g. Ledger Wallet Bitcoin) it opens and says "To begin, connect and unlock your Ledger Wallet". And it stays like this. I've tried all stupid simple things (reloading udev rules, restarting, rebooting, changing the order of plugging in Ledger and launching Chrome app).

System info:
- Arch Linux: Linux arch 4.14.3-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux
- Chromium: Version 62.0.3202.94 (Developer Build) (64-bit) OR Chrome Version 62.0.3202.94 (Official Build) (64-bit) - Tried both.
- systemd version 235.38-2

$ cat /etc/udev/rules.d/20-hw1.rules 
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="2b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="3b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="4b7c", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1807", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1808", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001", MODE="0660", TAG+="uaccess", TAG+="udev-acl", OWNER="foo"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", OWNER="foo", ATTRS{idVendor}=="2c97"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", OWNER="foo", ATTRS{idVendor}=="2581"

$ lsusb
...
Bus 002 Device 009: ID 2c97:0001 <-- Ledger Nano S
...

# Permissions look OK:
ls -al /dev/bus/usb/002/009 
crw-rw----+ 1 foo root 189, 136 Dec 5 14:57 /dev/bus/usb/002/009

Any ideas? Thanks!

Offline

#7 2017-12-08 16:03:19

lknix
Member
Registered: 2008-10-20
Posts: 19

Re: How to get Arch to recognize Ledger Nano S hardware wallet

OK, figured it out. After adding the udev rules you have to do this (order matters!):
1. Install Ledger Manger App (Chrome app).
2. Open Ledger Manager App and it should recognize your Ledger. Then install desired additional Ledger apps (if any).
3. Install Bitcoin/Eth Wallet (Chrome App).
4. Start using wallet app. It should just work.

Not sure why order matters, but for me it started working after I uninstalled all Chrome wallet apps and installed Manager App first. Also, if you enabled "Browser support" in Ledger apps, disable it. It didn't connect for me while that setting was set to "Yes".

Last edited by lknix (2017-12-08 16:04:22)

Offline

#8 2017-12-20 19:02:05

becko
Member
Registered: 2017-12-20
Posts: 1

Re: How to get Arch to recognize Ledger Nano S hardware wallet

Hurray, packages in the repository

udev rules: btchip-udev
that should be enough for the chromium app

to use with electrum: python-btchip

Offline

#9 2018-01-16 18:21:28

extol
Member
Registered: 2018-01-16
Posts: 1

Re: How to get Arch to recognize Ledger Nano S hardware wallet

I wrote the guide on Steemit. The guide works perfectly, but for some reason some usb cables do not work. If you enter the above rules correctly and it still fails to recognize the Ledger, simple try a different usb cable.

Offline

#10 2018-01-17 11:54:33

B1omman
Member
Registered: 2016-02-16
Posts: 36

Re: How to get Arch to recognize Ledger Nano S hardware wallet

extol wrote:

I wrote the guide on Steemit. The guide works perfectly, but for some reason some usb cables do not work. If you enter the above rules correctly and it still fails to recognize the Ledger, simple try a different usb cable.

The guide will most likely work for the outcome you seek, yes, but that is not the problem previous posters discuss. Changing owner of the udev rules directory to the current user opens up for any process running under that user to create new rules without the users knowledge. Since udev automatically loads new or reloads changed rules, can be used to run arbitrary programs and is run as root, it is possible for an attacker to gain complete control of the system from something like a browser extension.

Now, as becko stated, there are now packages in the AUR that I would suggest looking into instead.

Offline

#11 2018-01-17 14:05:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to get Arch to recognize Ledger Nano S hardware wallet

The chown is very ill advised. The rules in general most probably work but they seem a bit off to me. The udev-acl tag is an ubuntu thing, I suspect it does nothing in Arch. With Arch I believe you should use TAG+="uaccess". If you use the uaccess tag you don't need to change the mode.

I usually also see a match for ACTION=="add|change" and very rarely I see matches for subsystem, the idVendor and idProduct combo should be enough to match on a specific device.

An example of the rules would be:

ACTION=="add|change", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", TAG+="uaccess"

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2019-04-06 02:42:04

jamesp9
Member
Registered: 2017-11-05
Posts: 2

Re: How to get Arch to recognize Ledger Nano S hardware wallet

I know this thread is now over a year old. However I'd only just come across it when I got stuck at verify device is genuine section and would like to confirm that the entry posted by ROOKIE works fine with the Nano S.

Just change the idVendor and idProduct to suit your device which can be found by watching the journal log when plugging the device in.

/etc/udev/rules.d/20-hw1.rules

ACTION=="add|change", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c", TAG+="uaccess"

Offline

#13 2019-08-10 13:01:43

quin
Member
Registered: 2019-08-10
Posts: 4

Re: How to get Arch to recognize Ledger Nano S hardware wallet

becko wrote:

udev rules: btchip-udev
that should be enough for the chromium app

This solved the problem for me too.

Last edited by quin (2019-08-10 13:03:32)

Offline

#14 2019-08-10 13:05:11

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: How to get Arch to recognize Ledger Nano S hardware wallet

Closing this old thread.

Offline

Board footer

Powered by FluxBB