mirror of
https://github.com/m2049r/xmrwallet
synced 2024-11-24 14:37:14 +01:00
accept Nano X over USB
This commit is contained in:
parent
cf5018be33
commit
fa811a39a2
@ -46,8 +46,12 @@ public class BTChipTransportAndroidHID implements BTChipTransport {
|
||||
HashMap<String, UsbDevice> deviceList = manager.getDeviceList();
|
||||
for (UsbDevice device : deviceList.values()) {
|
||||
Timber.d("%04X:%04X %s, %s", device.getVendorId(), device.getProductId(), device.getManufacturerName(), device.getProductName());
|
||||
if ((device.getVendorId() == VID) && (device.getProductId() == PID_HID)) {
|
||||
return device;
|
||||
if (device.getVendorId() == VID) {
|
||||
final int deviceProductId = device.getProductId();
|
||||
for (int pid : PID_HIDS) {
|
||||
if (deviceProductId == pid)
|
||||
return device;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -74,7 +78,7 @@ public class BTChipTransportAndroidHID implements BTChipTransport {
|
||||
}
|
||||
|
||||
private static final int VID = 0x2C97;
|
||||
private static final int PID_HID = 0x0001;
|
||||
private static final int[] PID_HIDS = {0x0001, 0x0004};
|
||||
|
||||
private UsbDeviceConnection connection;
|
||||
private UsbInterface dongleInterface;
|
||||
|
@ -6,4 +6,9 @@
|
||||
product-id="1"
|
||||
vendor-id="11415" />
|
||||
|
||||
<!-- Ledger Nano X HID: VID=0x2C97 PID=0x0004 -->
|
||||
<usb-device
|
||||
product-id="4"
|
||||
vendor-id="11415" />
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user