HW wallet with Ledger Nano-S

Hi!
I tried to use Ledger Nano-S. First time it was OK, but when I tried again, the wallet device number didn’t match the account:

Blockquote
goal wallet list -d /var/lib/algorand
##################################################
Wallet: (serial )
ID: 0001:0005:00
##################################################
Wallet: (serial )
ID: 0001:0005:01
##################################################

Blockquote
goal account list -d /var/lib/algorand
Wallet with ID ‘0001:0004:00’ not found. Was the default wallet deleted?

Blockquote
dmesg
[ 165.282841] usb 1-2: New USB device found, idVendor=2c97, idProduct=0001
[ 165.282842] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 165.283029] usb 1-2: no configuration chosen from 0 choices
[ 283.746077] usb 1-2: USB disconnect, device number 3
[ 304.559876] usb 1-2: new full-speed USB device number 4 using ohci-pci
[ 305.095618] usb 1-2: New USB device found, idVendor=2c97, idProduct=0001
[ 305.095625] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 305.095629] usb 1-2: Product: Nano S
[ 305.095633] usb 1-2: Manufacturer: Ledger
[ 305.095637] usb 1-2: SerialNumber: 0001
[ 305.134423] hid-generic 0003:2C97:0001.0002: hiddev0,hidraw1: USB HID v1.11 Device [Ledger Nano S] on usb-0000:00:06.0-2/input0
[ 305.159321] hid-generic 0003:2C97:0001.0003: hiddev1,hidraw2: USB HID v1.11 Device [Ledger Nano S] on usb-0000:00:06.0-2/input1
[ 399.223122] usb 1-2: USB disconnect, device number 4
[ 424.268077] usb 1-2: new full-speed USB device number 5 using ohci-pci
[ 424.796674] usb 1-2: New USB device found, idVendor=2c97, idProduct=0001
[ 424.796679] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 424.796682] usb 1-2: Product: Nano S
[ 424.796685] usb 1-2: Manufacturer: Ledger
[ 424.796688] usb 1-2: SerialNumber: 0001
[ 424.832151] hid-generic 0003:2C97:0001.0004: hiddev0,hidraw1: USB HID v1.11 Device [Ledger Nano S] on usb-0000:00:06.0-2/input0
[ 424.857789] hid-generic 0003:2C97:0001.0005: hiddev1,hidraw2: USB HID v1.11 Device [Ledger Nano S] on usb-0000:00:06.0-2/input1

Also, HID device numbers increase, when I unplug and plug the Nano-S.
So the HW wallet is practically unusable now.
How can HID device numbers be allocated?
Or how can

Blockquote
goal account list…

modified to accept the new device numbers?

References:


Solution

First, list the HW wallet name:

goal wallet list -d /var/lib/algorand

##################################################
Wallet: Ledger Nano S (serial 0001) (default)
ID: 0001:0009:00
##################################################

Then specify the HW wallet name in goal clerk send, and also set note to empty string:

goal clerk send -a (amount) -f (HW_wallet_addres) -t (destination_address) -w "Ledger Nano S (serial 0001)" -n "" -d /var/lib/algorand

Before sending the command, check that the Nano-S is active (i.e. not in screensaver mode “Wires in numeris”).

After sending the command, check the tx details. These are displayed on the Nano-S. Push the right button to go on (sometimes it must be pressed twice to go on.)

If everything is correct, sign the tx on the Nano-S.