Pages:
Author

Topic: [BOUNTY 5 BTC] Clear instructions for cgminer's --scan-serial option - page 2. (Read 9026 times)

donator
Activity: 919
Merit: 1000
OK solution now Smiley
You need a bitforce enabled version of cgminer.
It's off by default.
So if you get it from github the compile steps are changed to:
Code:
./autogen.sh
CFLAGS="-O2 -Wall" ./configure --enable-bitforce
make
Edit: and it also does an auto scan if you don't use "--scan-serial" at all
(i.e. the '--scan-serial auto' isn't needed if you just run a cgminer with bitforce code enabled - it will run an 'auto' anyway)
I admit, this is the shortest and clearest version the instruction can get, so you deserve the bounty Wink

Fully missed that FPGA miners are not enabled with cgminer's default build options. With the current stampede to BFL devices I guess it is time to include FPGA support by default. But since e.g. scanning for an Icarus takes considerably long, it might be a good idea to require  the "--scan-serial auto" parameter explicitly set to initiate discovery. Sadly, I'll have to wait for another 3 weeks for my devices to arrive and to test all of this Sad
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
OK solution now Smiley
You need a bitforce enabled version of cgminer.
It's off by default.
So if you get it from github the compile steps are changed to:
Code:
./autogen.sh
CFLAGS="-O2 -Wall" ./configure --enable-bitforce
make
Edit: and it also does an auto scan if you don't use "--scan-serial" at all
(i.e. the '--scan-serial auto' isn't needed if you just run a cgminer with bitforce code enabled - it will run an 'auto' anyway)
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
I wouldn't bother giving it to Luke-jr as zefir suggested - just give it to zefir.
I asked Luke-jr to update the README and he wouldn't
So I updated it as follows:
Code:
--scan-serial|-S Serial port to probe for FPGA mining device

     With "-S auto", BitForce enabled and only on linux, cgminer will attempt
     to automatically find BitForce FPGA devices
     Note that the computer may take some time to recognise the USB device
     when it is first plugged in - especially if the system is slow or busy
     (e.g. already GPU mining)

     On linux is usually of the format /dev/ttyUSBn
     On windows is usually of the format COMn
       (where n = the correct device number for the FPGA device)

(aside Luke-jr has just got his BitForce device and is using it also)
vip
Activity: 1358
Merit: 1000
AKA: gigavps
If the auto thing was undocumented but works, zefir will get the bounty. He seems to have pointed me to the magic (undocumented) pill.

I will not be able to find out until this weekend when I can get the latest version of BAMT working on a rig.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
hero member
Activity: 518
Merit: 500
So who got the bounty Huh
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
I presume the problem is that didn't work on his machine
(hmm just noticed Luke-jr forgot to put "auto" in the docs - I'll tell him now Tongue)

though I'm not sure if it works on pre 3.0 kernels either ...
e.g. 11.04 xubuntu doesn't have it and it is pre 3.0

Edit: nope I'm wrong, 11.04 does have it and that may also explain if gigvaps already tried it:
As I mentioned above about waiting for the USB ports to appear ... the same is also true of course of the /dev/serial/ structure
... especially if you are already GPU mining Smiley
(that's what happened for me on my 11.04 miner - the /dev/serial/ didn't appear at first when I looked for it and I didn't think to wait)
So yeah "--scan-serial auto" should work but it's slow to appear and if you are already GPU mining - it's can be REALLY slow to appear.
So if you just plugged the BFL into the USB port, don't start cgminer with "--scan-serial auto" until "ls /dev/serial/by-id/" shows something other than an error and lists your BFL
donator
Activity: 919
Merit: 1000
Hello fellow bitcoiners!

I am willing to pay 5 BTC for clear, step-by-step instructions for using the latest cgminer build with the --scal-serial option ON LINUX.

Specifically, the instructions should include:

- How do detect what serial port each BFL unit is on.
- What exactly needs to be added to the --scan-serial option.
- Any other tidbits to make others life easier as more singles arrive.

The first one to post the instructions that I can follow with get the bounty.

Thanks,
gigavps
Hello gigavps,

you better should have asked what you want to achieve instead of how Wink

So I read you are going to get 10 BitForces and assume you need to know how to attach them to your PC. My BitForces will arrive hopefully soon, until then this is just what I get from reading Luke's implementation of the BFL support for cgminer. It seems that a auto-scan mode is available, i.e. you just set
Code:
--scan-serial auto

Thats it. The BFL module will loop through all BFL serial attached devices (prefixed with 'BitFORCE_SHA256') in "/dev/serial/by-id" and use all found ones for mining. This works for Linux only, but that's what you asked for. With the current implementation there is no plug-and-play support, i.e. devices are scanned only during startup of cgminer.


One different thing you might be very interesting in: user Xiangfu (who did the Icarus support for cgminer) integrated cgminer into OpenWRT, so you basically should be able to control your BitForce mining farm with your existing WLAN router. I am working on a stripped down cgminer version for FPGA devices only for OpenWRT to leave some resources for additional management software (like BAMT) to be run on the router.


Cheers, Zefir

PS: if thats good enough to get the bounty, please send it to Luke.
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
Code:
dmesg | tail
a few times until it does

should be able to use

Code:
dmesg | tail -f

to follow output until ctrl-c to break out of it.


marked
Yep - I was just trying to make it a simple - how to check ... to avoid "it stops and nothing happens" Cheesy
full member
Activity: 168
Merit: 100
Code:
dmesg | tail
a few times until it does

should be able to use

Code:
dmesg | tail -f

to follow output until ctrl-c to break out of it.


marked
legendary
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
When you don't have the device plugged in:
Code:
dmesg | tail
and notice the contents - (the last few lines - to spot next time)
Code:
ls -ort /dev/ttyUSB*
and notice the list of devices
(there will probably be none and you get an error)

Then plug in the device
Code:
dmesg | tail
and look for "now attached to ttyUSBx" you may get two e.g. ttyUSB0 and ttyUSB1
this may also take a minute to appear so you may need to repeat
Code:
dmesg | tail
a few times until it does

Next you can also repeat
Code:
ls -ort /dev/ttyUSB*
and notice the (new) list of devices - i.e. ignore the ones that were there before at the start if there were any
Here you should see the same devices as with dmesg

Now you know the ttyUSBx (assuming they are 0 and 1) try:
Code:
cgminer ... ... ... -S /dev/ttyUSB1
if that doesn't work then it will be:
Code:
cgminer ... ... ... -S /dev/ttyUSB0
(where ... ... ... are all the other options you usually use)

If you still can't get it to work post the output of
Code:
ls -ort /dev/ttyUSB*
and say the time you did it (v.s. the time it will show on the devices)
and also post the output of
Code:
dmesg
on it's own from when you first did "dmesg | tail"
i.e. "dmesg" on it's own will show you from a long time back, but you just what from the point where you plugged in the BFL
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Dunno anything about windows, but on linux...

Try this:

Code:
lsusb

then look for the device in the listing
Bus 002 Device 003: SOME KIND OF AWESOME MINING DEVICE NAME

Then based on the values of bus and device 2 and 3 above.

Code:
--scan-serial /dev/bus/usb/002/003


Just a guess since I didn't really do the bitforce code. Note it's meant to detect devices automatically though, but I have no experience with them...
vip
Activity: 1358
Merit: 1000
AKA: gigavps
See your "dmesg" and maybe "logread" to see when you plug and unplug the device to see the serial port.

It should be something like "/dev/ttyUSBx" with "x" being a number like 0 or 1 etc.

Then launch cgminer with the --scan-serial option like this :

./cgminer --scan-serial /dev/ttyUSB1

in case your device uses 1 etc.

Make sure to compile cgminer with the BFL support because it comes disabled by default ( or if you are using the binaries the same applies and you need to compile manually with BFL support on ).

https://github.com/ckolivas/cgminer how to compile.

Thank you and 1M1Eo8upubkEmCqmhnMvVMfEyQiYbCXxKS if I helped.

Hi Bulanula,

"maybe" is not something I am looking for here. Please provide step-by-step instructions to claim the bounty.

I have tried using dmesg and the output I get I am unable to comprehend.
hero member
Activity: 518
Merit: 500
See your "dmesg" and maybe "logread" to see when you plug and unplug the device to see the serial port.

It should be something like "/dev/ttyUSBx" with "x" being a number like 0 or 1 etc.

Then launch cgminer with the --scan-serial option like this :

./cgminer --scan-serial /dev/ttyUSB1

in case your device uses 1 etc.

Make sure to compile cgminer with the BFL support because it comes disabled by default ( or if you are using the binaries the same applies and you need to compile manually with BFL support on ).

https://github.com/ckolivas/cgminer how to compile.

Thank you and 1M1Eo8upubkEmCqmhnMvVMfEyQiYbCXxKS if I helped.
vip
Activity: 1358
Merit: 1000
AKA: gigavps
Hello fellow bitcoiners!

I am willing to pay 5 BTC for clear, step-by-step instructions for using the latest cgminer build with the --scal-serial option ON LINUX.

Specifically, the instructions should include:

- How do detect what serial port each BFL unit is on.
- What exactly needs to be added to the --scan-serial option.
- Any other tidbits to make others life easier as more singles arrive.

The first one to post the instructions that I can follow with get the bounty.

Thanks,
gigavps
Pages:
Jump to: