Bitcoin Forum
May 01, 2024, 10:11:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [BOUNTY 5 BTC] Clear instructions for cgminer's --scan-serial option  (Read 9003 times)
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
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
1714601483
Hero Member
*
Offline Offline

Posts: 1714601483

View Profile Personal Message (Offline)

Ignore
1714601483
Reply with quote  #2

1714601483
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
bulanula
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
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.
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
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.
-ck
Legendary
*
Offline Offline

Activity: 4088
Merit: 1631


Ruu \o/


View Profile WWW
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...

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
kano
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
marked
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile
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
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
zefir
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
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
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
February 24, 2012, 10:30:42 AM
Last edit: February 24, 2012, 11:17:59 AM by kano
 #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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
bulanula
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
February 24, 2012, 11:32:14 AM
 #10

So who got the bounty Huh
kano
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
February 24, 2012, 12:39:30 PM
 #11

BFL Tongue

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
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
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
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)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
kano
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


View Profile
February 26, 2012, 02:12:31 AM
Last edit: February 26, 2012, 05:08:18 AM by kano
 #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)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
zefir
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
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
Legendary
*
Offline Offline

Activity: 4480
Merit: 1800


Linux since 1997 RedHat 4


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

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
zefir
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



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


jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
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: 919
Merit: 1000



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

jamesg (OP)
VIP
Legendary
*
Offline Offline

Activity: 1358
Merit: 1000


AKA: gigavps


View Profile
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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!