Add basic device detection and updated udev rules for nanofury devices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
diff --git a/01-cgminer.rules b/01-cgminer.rules
index 733a774..e9a0bf1 100644
--- a/01-cgminer.rules
+++ b/01-cgminer.rules
@@ -1,35 +1,38 @@
# Butterfly Labs FPGA and ASIC devices
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# ModMinerQuad
-ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0003", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0003", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# Lancelot and Avalon
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# Icarus
-ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# AsicminerUSB
-ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# Cairnsmore1
-ATTRS{idVendor}=="067b", ATTRS{idProduct}=="0230", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="067b", ATTRS{idProduct}=="0230", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# Cairnsmore1-2
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8350", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8350", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# Ztex
-ATTRS{idVendor}=="221a", ATTRS{idProduct}=="0100", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="221a", ATTRS{idProduct}=="0100", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
# BF1
-ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204b", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204b", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
-#Klondike
-ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f60a", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+# Klondike
+ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f60a", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
-#HashFast
-ATTRS{idVendor}=="297c", ATTRS{idProduct}=="0001", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"
+# HashFast
+ATTRS{idVendor}=="297c", ATTRS{idProduct}=="0001", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"
# BXF
-ATTRS{idVendor}=="198c", ATTRS{idProduct}=="b1f1", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+ATTRS{idVendor}=="198c", ATTRS{idProduct}=="b1f1", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
+
+# NF1
+ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00de", SUBSYSTEM=="usb", ACTION=="add", MODE="0666", GROUP="plugdev"
diff --git a/usbutils.c b/usbutils.c
index 3556ed9..4879c21 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -153,6 +153,15 @@ static struct usb_intinfo bxf_ints[] = {
USB_EPS(1, bxf1_epinfos),
USB_EPS(0, bxf0_epinfos)
};
+
+static struct usb_epinfo nf1_epinfos[] = {
+ { LIBUSB_TRANSFER_TYPE_INTERRUPT, 64, EPO(1), 0, 0 },
+ { LIBUSB_TRANSFER_TYPE_INTERRUPT, 64, EPI(1), 0, 0 },
+};
+
+static struct usb_intinfo nf1_ints[] = {
+ USB_EPS(0, nf1_epinfos)
+};
#endif
#ifdef USE_DRILLBIT
@@ -368,6 +377,17 @@ static struct usb_find_devices find_dev[] = {
.iProduct = "bi?fury",
INTINFO(bxf_ints)
},
+ {
+ .drv = DRIVER_bitfury,
+ .name = "NF1",
+ .ident = IDENT_NF1,
+ .idVendor = 0x04d8,
+ .idProduct = 0x00de,
+ .config = 1,
+ .timeout = BITFURY_TIMEOUT_MS,
+ .latency = LATENCY_UNUSED,
+ INTINFO(nf1_ints)
+ },
#endif
#ifdef USE_DRILLBIT
{
diff --git a/usbutils.h b/usbutils.h
index 91d15ee..84ae2c2 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -148,12 +148,13 @@ enum sub_ident {
IDENT_BXF,
IDENT_CMR1,
IDENT_CMR2,
+ IDENT_DRB,
IDENT_HFA,
IDENT_ICA,
IDENT_KLN,
IDENT_LLT,
IDENT_MMQ,
- IDENT_DRB
+ IDENT_NF1
};
struct usb_find_devices {