Bitcoin Forum
April 21, 2014, 12:14:22 AM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2  All
  Print  
Author Topic: [BOUNTY 5 BTC] Clear instructions for cgminer's --scan-serial option  (Read 5866 times)
gigavps
VIP
Hero Member
*
Offline Offline

Activity: 1022



View Profile

Ignore
February 23, 2012, 01:03:47 PM
 #1

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
1398039262
Hero Member
*
Offline Offline

Posts: 1398039262

View Profile Personal Message (Offline)

Ignore
1398039262
Reply with quote  #2

1398039262
Report to moderator
1398039262
Hero Member
*
Offline Offline

Posts: 1398039262

View Profile Personal Message (Offline)

Ignore
1398039262
Reply with quote  #2

1398039262
Report to moderator
1398039262
Hero Member
*
Offline Offline

Posts: 1398039262

View Profile Personal Message (Offline)

Ignore
1398039262
Reply with quote  #2

1398039262
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1398039262
Hero Member
*
Offline Offline

Posts: 1398039262

View Profile Personal Message (Offline)

Ignore
1398039262
Reply with quote  #2

1398039262
Report to moderator
1398039262
Hero Member
*
Offline Offline

Posts: 1398039262

View Profile Personal Message (Offline)

Ignore
1398039262
Reply with quote  #2

1398039262
Report to moderator
bulanula
Hero Member
*****
Offline Offline

Activity: 518



View Profile

Ignore
February 23, 2012, 01:36:40 PM
 #2

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.
gigavps
VIP
Hero Member
*
Offline Offline

Activity: 1022



View Profile

Ignore
February 23, 2012, 01:43:36 PM
 #3

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.
ckolivas
Moderator
Hero Member
*
Offline Offline

Activity: 1036



View Profile WWW

Ignore
February 23, 2012, 01:58:29 PM
 #4

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...

Primary developer/maintainer for cgminer: https://bitcointalk.org/index.php?topic=28402.0  148KkS2vgVi4VzUi4JcKzM2PMaMVPi3nnq
ONLY ignoring luke-jr
-ck
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 23, 2012, 02:59:40 PM
 #5

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

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
marked
Full Member
***
Offline Offline

Activity: 168



View Profile

Ignore
February 24, 2012, 02:40:35 AM
 #6

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
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 24, 2012, 03:38:55 AM
 #7

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

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
zefir
Donator
Hero Member
*
Offline Offline

Activity: 826



View Profile

Ignore
February 24, 2012, 09:29:31 AM
 #8

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.

kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 24, 2012, 10:30:42 AM
 #9

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

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
bulanula
Hero Member
*****
Offline Offline

Activity: 518



View Profile

Ignore
February 24, 2012, 11:32:14 AM
 #10

So who got the bounty Huh
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 24, 2012, 12:39:30 PM
 #11

BFL Tongue

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
gigavps
VIP
Hero Member
*
Offline Offline

Activity: 1022



View Profile

Ignore
February 24, 2012, 01:33:51 PM
 #12

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.
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 26, 2012, 02:05:05 AM
 #13

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 <arg> 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 <arg> is usually of the format /dev/ttyUSBn
     On windows <arg> 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)

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 26, 2012, 02:12:31 AM
 #14

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)

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
zefir
Donator
Hero Member
*
Offline Offline

Activity: 826



View Profile

Ignore
February 26, 2012, 10:54:40 AM
 #15

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

kano
Hero Member
*****
Offline Offline

Activity: 1008


Linux since 1997 RedHat 4


View Profile

Ignore
February 26, 2012, 11:45:42 AM
 #16

My friend in China that I have been helping a little bit with the Icarus code is posting my two Icarus' to me tomorrow.
So I'll try to sort out the 'auto' for Icarus after I get them
However, I'm not sure there is a tidy and quick way to auto detect an Icarus, among many devices, with it's current firmware.

BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CGMiner developer,  IRC FreeNode #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
zefir
Donator
Hero Member
*
Offline Offline

Activity: 826



View Profile

Ignore
February 26, 2012, 01:43:28 PM
 #17

My friend in China that I have been helping a little bit with the Icarus code is posting my two Icarus' to me tomorrow.
So I'll try to sort out the 'auto' for Icarus after I get them
However, I'm not sure there is a tidy and quick way to auto detect an Icarus, among many devices, with it's current firmware.
Had a look at the Icarus code/protocol and got an idea on what you mean. Basically you could screw an Icarus' state machine by sending a BFL ID request command. If you knew that the BitForces are ignoring the Icarus work commands, you could just scan for Icarus devices first and then look for BitForces.

Anyone started working on X6500 support? Maybe the FPGA miner devs need to agree on a common protocol if they want to get natively supported by cgminer...


gigavps
VIP
Hero Member
*
Offline Offline

Activity: 1022



View Profile

Ignore
February 27, 2012, 06:46:22 PM
 #18

Had a try at this over the weekend but nothing yet....

Found this post from BFL stating that they find BFL singles with ttyUSB* in the /dev folder in linux.

https://bitcointalk.org/index.php?topic=28402.msg692304#msg692304

I am guessing my problem is that BAMT doesn't have any ttyUSB* files in the /dev folder. Can anyone elaborate how this can be fixed? Looks like I have the following tty files...

tty*
ttyS*
zefir
Donator
Hero Member
*
Offline Offline

Activity: 826



View Profile

Ignore
February 27, 2012, 07:35:53 PM
 #19

Had a try at this over the weekend but nothing yet....

Found this post from BFL stating that they find BFL singles with ttyUSB* in the /dev folder in linux.

https://bitcointalk.org/index.php?topic=28402.msg692304#msg692304

I am guessing my problem is that BAMT doesn't have any ttyUSB* files in the /dev folder. Can anyone elaborate how this can be fixed? Looks like I have the following tty files...

tty*
ttyS*
gigavps,

I'm not familiar with BAMT, but assuming it is a typical Linux distro try this to narrow down the problem:

1) ensure that you have common module usbserial installed:
Code:
lsmod | grep serial
should display usbserial

2) post output of
Code:
dmesg
shortly after you plugged in the BitForce.
Code:
dmesg | grep tty
should contain 'ttyUSBx'

3) post output of
Code:
lsusb -v

4) ensure that your cgminer supports FPGAs:
Code:
./cgminer -h | grep Built | grep bitforce

If any of those fail, you'll have to try with a standard Ubuntu and cgminer built with BitForce support.

gigavps
VIP
Hero Member
*
Offline Offline

Activity: 1022



View Profile

Ignore
February 27, 2012, 07:48:01 PM
 #20

gigavps,

I'm not familiar with BAMT, but assuming it is a typical Linux distro try this to narrow down the problem:

1) ensure that you have common module usbserial installed:
Code:
lsmod | grep serial
should display usbserial

2) post output of
Code:
dmesg
shortly after you plugged in the BitForce.
Code:
dmesg | grep tty
should contain 'ttyUSBx'

3) post output of
Code:
lsusb -v

4) ensure that your cgminer supports FPGAs:
Code:
./cgminer -h | grep Built | grep bitforce

If any of those fail, you'll have to try with a standard Ubuntu and cgminer built with BitForce support.

Thanks for the help. I have determined that BAMT does not contain the proper serial support needed to create the ttyUSB* files. Moving on to ubuntu this evening....
Pages: [1] 2  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!