Bitcoin Forum

Bitcoin => Mining support => Topic started by: hydragroup on March 25, 2014, 03:41:31 AM



Title: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on March 25, 2014, 03:41:31 AM
Related:

 - http://bitcoin.stackexchange.com/questions/23944/bfgminer-cant-find-my-nanofury-on-linux

I see the miners with these commands
Code:
    lsusb -t
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
        |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M
            |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M
            |__ Port 3: Dev 4, If 0, Class=hub, Driver=hub/4p, 480M
                |__ Port 4: Dev 5, If 0, Class=hub, Driver=hub/4p, 480M
                    |__ Port 1: Dev 6, If 0, Class=HID, Driver=usbhid, 12M
                    |__ Port 4: Dev 7, If 0, Class=HID, Driver=usbhid, 12M
and
Code:
    lsusb
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 006: ID 04d8:00de Microchip Technology, Inc. <-- USB Miner
    Bus 001 Device 007: ID 04d8:00de Microchip Technology, Inc. <-- USB Miner
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
    Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
    Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
but they do not show up when running bfgminer 3.10.0

Running Raspbian and have compiled everything from source.

Is there a missing driver I need for these?

command line
Code:
    ./bfgminer -o stratum+tcp://stratum.d7.lt:3333 -u username -p password -S nanofury:all --set-device NFY:osc6_bits=33
output
Code:
    NO DEVICES FOUND: Press 'M' and '+' to add
I've seen this configured on other systems, do I need o configure this as well?
Code:
    # NF2
    ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00de", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="root"

debug output

Code:
2014-03-25 04:01:06] hid_devinfo_scan: Found "NanoFury NF2 v0.5 by MLM" serial "0000100001"
 [2014-03-25 04:01:06] hid_devinfo_scan: Found "NanoFury NF2 v0.5 by MLM" serial "0000100002"
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:005 (path=(null), vid=1a40, pid=0101, manuf=(null), prod=USB 2.0 Hub, serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:004 (path=(null), vid=1a40, pid=0101, manuf=(null), prod=USB 2.0 Hub, serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:003 (path=(null), vid=0424, pid=ec00, manuf=(null), prod=(null), serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:007 (path=(null), vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:006 (path=(null), vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:001 (path=(null), vid=1d6b, pid=0002, manuf=Linux 3.10.25+ dwc_otg_hcd, prod=DWC OTG Controller, serial=bcm2708_usb)
 [2014-03-25 04:01:06] lowlevel_scan: Found usb device at usb:001:002 (path=(null), vid=0424, pid=9512, manuf=(null), prod=(null), serial=(null))
 [2014-03-25 04:01:06] lowlevel_scan: Found hid device at hid:/dev/hidraw1 (path=/dev/hidraw1, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found hid device at hid:/dev/hidraw0 (path=/dev/hidraw0, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] lowlevel_scan: Found mcp2210 device at hid:/dev/hidraw0 (path=/dev/hidraw0, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100001)
 [2014-03-25 04:01:06] lowlevel_scan: Found mcp2210 device at hid:/dev/hidraw1 (path=/dev/hidraw1, vid=04d8, pid=00de, manuf=Microchip Technology Inc., prod=NanoFury NF2 v0.5 by MLM, serial=0000100002)
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000100001", but failed to detect nanofury
 [2014-03-25 04:01:06] mcp2210_set_cfg_gpio: Failed to set current GPIO config
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] mcp2210_get_gpio_input: Failed to get current GPIO input values
 [2014-03-25 04:01:06] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000100002", but failed to detect nanofury
 [2014-03-25 04:01:06] INFO: bitfury_detect
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:06] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] Unable to open SPI device: No such file or directory
 [2014-03-25 04:01:07] No Bitfury chips detected!
 [2014-03-25 04:01:07] ManageTUI: (none): No new devices found

UPDATE

Looks like I missed a package I needed to install:

 - https://bitcointalk.org/index.php?topic=291456.msg3924680#msg3924680

But now Im getting this error

Code:
 [2014-03-26 01:43:29] mcp2210_get_configs: Failed to get current SPI config
Select processor to manage using up/down arrow keys
 [2014-03-26 01:43:29] NFY 0: Failed to open mcp2210 device
 NFY 0 : Initializing... [2014-03-26 01:43:29] NFY 0 failure, exitingSegmentation fault
root@raspberrypi:/usr/bfgminer/bfgminer-3.10.0#

at least it's progress


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: nybbler905 on March 25, 2014, 03:53:46 AM
I've got issues with BFGMiner seeing some erupters with just that kind of command... only workaround ( using Ubuntu ) was to ' sudo ./bfgminer ...'or log in as root to get them seen.  Hope that it's that simple for you too to get the nano's working.


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on March 25, 2014, 04:06:08 AM
Thanks, still no luck. I did add some debug log


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: nybbler905 on March 25, 2014, 05:28:46 PM
I went over what you had in the first post.... I'm thinking RMA at this point.  It looks there, but ' not there ' so it may be a bad flash to the controller IC ( not likely, but possible ) and I for one would not want to influence someone to accidentaly brick a nanofury trying to re-program the 1 IC that gets it to talk to mining programs.  With how these USB devices are produced, it is not likely that one ( or more ) connections to the ASIC are a reflow soldering issue, it just looks like one from what's in that long list at the beginning.

Good luck, you may need it.


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on March 26, 2014, 01:46:44 AM
updated with a little more progress but still not working


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: vs3 on March 26, 2014, 04:45:03 AM
Instructions for running it on Raspberry Pi:

Hello,

could anyone sent me a kind of tutorial how to get the nanofury working on rasberry pi? I dont know much about linux.

Raspian ist still installed, and networkspeed ist reduced like in your messages. But which bfgminer version should I install (link?). What do you mean with "after comiling"

are there any other settings do do? ... I tryed lots of versions but nothing works... A small tutorial would save my next 5 evenings :D

Greetings from Germany

First you need to install needed library
Code:
1. sudo aptitude update
2. sudo aptitude install libudev-dev libusb-1.0-0-dev libfox-1.6-dev autotools-dev autoconf automake libtool libncurses-dev yasm curl libcurl4-openssl-dev libjansson-dev pkg-config uthash-dev make pkg-config yasm

Second download HIDAPI from git
Code:
1. git clone git://github.com/signal11/hidapi.git hidapi
2. cd hidapi
3. ./bootstrap
4. ./configure --prefix=/usr
5. make
6. sudo make install

Third download bfgminer to some directory(in this example is "miner")
Code:
1. mkdir miner
2. cd miner
3. wget http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.8.1/bfgminer-3.8.1.tbz2
4. tar xvf bfgminer-3.8.1.tbz2
5. cd bfgminer-3.8.1
6. ./configure
7. make

You can enable or disable some miner while run ./configure bfgminer with this options
Example: ./configure --enable-bfsb --disable-bitforce

Code:
	--disable-avalon        Compile support for Avalon (default enabled)
--enable-cpumining      Build with cpu mining support(default disabled)
--enable-opencl         Compile support for OpenCL (default disabled)
--disable-adl           Build without ADL monitoring (default enabled)
--disable-bitfury       Compile support for Bitfury (default enabled)
--enable-bfsb           Compile support for BFSB (default disabled)
--disable-bigpic        Compile support for Big Picture Mining USB (default enabled)
--disable-littlefury    Compile support for LittleFury (default enabled)
--disable-nanofury      Compile support for NanoFury (default enabled)
--disable-hashbuster    Compile support for HashBuster Nano (default enabled)
--disable-hashbuster2   Compile support for HashBuster Micro (default if libusb)
--enable-metabank       Compile support for Metabank (default disabled)
--disable-bitforce      Compile support for BitForce (default enabled)
--disable-icarus        Compile support for Icarus (default enabled)
--disable-klondike      Compile support for Klondike (default enabled)
--enable-knc            Compile support for KnC (default disabled)
--disable-modminer      Compile support for ModMiner (default enabled)
--disable-x6500         Compile support for X6500 (default enabled)
--disable-ztex          Compile support for ZTEX (default if libusb)
--enable-scrypt         Compile support for scrypt mining (default disabled)
--with-system-libblkmaker  Use system libblkmaker rather than bundled one (default disabled)
--without-sensors       Build with libsensors monitoring (default enabled)
--without-curses        Compile support for curses TUI (default enabled)
--without-libmicrohttpd Compile support for libmicrohttpd getwork server (default enabled)
--without-libevent      Compile support for libevent stratum server (default enabled)
--without-libusb        Compile using libusb (default enabled)
--without-libudev       Autodetect FPGAs using libudev (default enabled)

Then change usb speed to usb 1 with text editor nano
Code:
1. sudo nano /boot/cmdline.txt
then add dwc_otg.speed=1 at the end of line

To run bfgminer just go to the directory
Code:
1. cd miner
2. cd bfgminer-3.8.1
3. sudo ./bfgminer

That was the summary i colected from other thread since i am also linux noob  ;D


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on April 02, 2014, 03:14:03 AM
Thanks guys, still troubleshooting this

some additional output since I've updated the RPi firmware

Code:
 [2014-04-02 03:08:21] nanofury_lowl_probe: Matched "NanoFury NF2 v0.5 by MLM" serial "0000142845", but mcp2210 lowlevel driver failed to open it
 [2014-04-02 03:08:22] Probing for an alive pool
 [2014-04-02 03:08:22] Network difficulty changed to 96.8M (693.1Th/s)
 [2014-04-02 03:08:22] Stratum from pool 0 detected new block
 [2014-04-02 03:08:22] Pool 0 is hiding block contents from us
 [2014-04-02 03:08:23] mcp2210_spi_transfer: Failed to continue SPI transfer (1 bytes remaining)
 [2014-04-02 03:08:23] mcp2210_set_cfg_spi: Error setting current SPI config (248)
 [2014-04-02 03:08:23] NFY 0 failure, attempting to reinitialize
 [2014-04-02 03:08:23] mcp2210_spi_transfer: Failed to continue SPI transfer (1 bytes remaining)
 [2014-04-02 03:08:23] mcp2210_set_cfg_spi: Error setting current SPI config (248)

I've also posted here: http://www.lvr.com/forum/index.php?topic=1318.0


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: fractalbc on April 02, 2014, 05:56:17 AM
Are you running as root?

I had a heck of a time getting nano fury's to work with bfgminer without being root.

I had to create

pi@pi2 /etc/udev/rules.d $ cat 77-hidraw.rules
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="00de", SUBSYSTEM=="hidraw", ACTION=="add", MODE="0666", GROUP="plugdev"

To let my miner user get at the device.


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on April 03, 2014, 02:01:31 AM
Where does the naming convention come from?

77-hidraw.rules

I've seen some variations, Thanks


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: fractalbc on April 03, 2014, 04:37:34 AM
According to the man page, the rules are loaded in sort order.  01 is loaded before 99.  Other than that, anything goes.  I picked 77 because ... well ... just because.  I looked at the other files in the folder and guessed a number.


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: nybbler905 on April 03, 2014, 05:36:03 PM
with ' no joy ' at this point I'd swap over to a PC and rebuild a fresh download of BFG and include KNC, disable OpenCL enable CPU.  The last 2 are just to make sure you have the full pack downloaded and all dependencies.  once built, only 1 in a USB port ( part of troubble shooting is try 1 device at a time due to power restrictions ) DIRECTLY on the PC.  A front pannel connector directly to the motherboard is a wonderful thing!  IF it does work ( ' sudo BFG etc, etc ' ) remove it while it's running and swap to the same USB port the 2nd Nano.  BFG should try and re-enable ( done this with ANTMiners and Erupters to find dead/underpowerered USB ports ).  Assuming this works, it's a matter of doing it all again on the Pi ( with out the CPU enabled ) and trying there.  I've had to open USB hubs and bypass Zeners, regulators and a few other ' power tricks ' that would limit the 5V line to 500 mA per port.  I don't have your hub so no clue what/if it does for voltage regulation that can also cause this issue. 

One ' trick ' I have in my list of things to do with powered hubs is find the 5V line from the pc ( or Pi in your case ) and cut it to prevent power issues and to ensure the powered hub IS getting power from the brick.  I can never say this enough, share the ground plane, separate power for the miners so power isn't getting used for more than the miners and you can tell what bricks overheat.

May the force be with you.


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: hydragroup on April 04, 2014, 05:54:10 PM
Well I've had some luck with CGMiner HEXu, I don't have the latest update yet but it sees the devices and runs then at 1/2 speed.

I think HIDAPI is the problem, thanks for all the help and will continue to post if anything changes


Title: Re: BFGminer can't find my NanoFury on Linux
Post by: vs3 on April 05, 2014, 02:02:18 AM
Well I've had some luck with CGMiner HEXu, I don't have the latest update yet but it sees the devices and runs then at 1/2 speed.

the 1/2 speed is because cgminer (and older versions of bfgminer) do not support multi-chip miners and see only the first chip.