need to fetch unique identifier for ledger nano s device using hid library

467 Views Asked by At

Trying to find some unique identifier for ledger nano s device .

I tried to enumerate the device with System.HIDAPI library in haskell but all ledger nano s devices i have, are giving same serial number as "0001" . i am not sure if ledger nano s devices have some unique identifier or not

  d <- liftIO $ openDeviceInfo deviceInfo
  let serialNum = serialNumber deviceInfo
  --let sno = eliminate serialNum
  sno <- getSerialNumberString d
1

There are 1 best solutions below

1
On

No, they do not have a unique identifier exposed in HID API. If you want a unique device id, you will have to make an app and generate/store a random number yourself.