luke-jr / bfgminer

Modular ASIC/FPGA miner written in C, featuring overclocking, monitoring, fan speed control and remote interface capabilities.
http://luke.dashjr.org/programs/bitcoin/files/bfgminer/
Other
1.84k stars 812 forks source link

Issues setting up bfgminer on OpenWRT backfire (brcm-2.4) #326

Closed Vaudtje closed 10 years ago

Vaudtje commented 10 years ago

I have installed bfgminer on my Asus WL-500g deluxe, hoping to have a low-power host for my Jalapeno. The BFL runs fine on a PC with bfgminer. I've installed usb2 and ftdi drivers, and using "insmod /lib/modules/uname -r/ftdi_sio.o vendor=0x403 product=0x6014" the device is recognized and gets address /dev/usb/tts/0. Bfgminer was compiled for backfire using the jansson lib from 12.09. The other libs are from backfire. When I start bfgminer, it runs and finds a BFL device (and reports temperature), but is not able to actually mine.

I get the following error messages, in random order:

 [2013-11-23 03:49:14] hex2bin: invalid character 0x2c
 [2013-11-23 03:49:14] BFL 0: Failed to find work for queue results:  [...]
 [2013-11-23 03:49:14] BFL 0: Gibberish within queue results: [...]

Is this a bfgminer issue? Are my ftdi drivers outdated (e.g. see https://bitcointalk.org/index.php?topic=76685.35;wap2)? Can I try anything else?

some more info that may help: cat /proc/bus/usb/devices:

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0403 ProdID=6014 Rev= 9.00
S:  Manufacturer=FTDI
S:  Product=BitFORCE SHA256 SC
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=serial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

lsusb:

Bus 001 Device 006: ID 0403:6014 Future Technology Devices International, Ltd
luke-jr commented 10 years ago

I have never seen a /dev/usb path before, so that might be related. Usually they show up as /dev/ttyUSB0 or /dev/serial/...

Vaudtje commented 10 years ago

below is the relevant output from dmesg. It seems that /dev/usb/tts/0 is from devfs vs udev.

usbserial.c: USB Serial support registered for FTDI 8U232AM Compatible
usbserial.c: USB Serial support registered for FTDI FT232BM Compatible
usbserial.c: USB Serial support registered for USB-UIRT Infrared Tranceiver
usbserial.c: USB Serial support registered for Home-Electronics TIRA-1 IR Transceiver
usbserial.c: USB Serial support registered for FTDI SIO compatible
ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver
hub.c: new USB device 01:02.2-1, assigned address 2
usbserial.c: FTDI SIO compatible converter detected
usbserial.c: FTDI SIO compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

should I try to create dev/ttyUSB0 myself with mknod (http://linux.math.tifr.res.in/HOWTO/Serial-HOWTO-11.html)? Should it set to be character or block (see man mknod)?

luke-jr commented 10 years ago

Wow, devfs is ancient (and dead). I'm not sure supporting backfire is practical... it's also dead. :/

Vaudtje commented 10 years ago

Ok, thanks for the response :+1: I'll try to get a small enough 12.09 image that I can flash to the device. Otherwise I'll have to look for a different router :)