Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 103. (Read 5805649 times)

newbie
Activity: 38
Merit: 0
Any chance there'll be support for Technobit's HEX16A2 boards?
newbie
Activity: 4
Merit: 0
How to/What commnads to overclock miner? Using Hashcoins Apollo? Help) i'm newbie
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I'm willing to do some cgminer testing with the latest stable kernel (mainline 3.14), albeit I'll have to make some fake devices to test the cgminer API on the latest kernel (I don't own any ASICs).

On that note, I'm making my own GNU/Linux distribution - I've compiled the kernel (3.14) and bash (4.3) in its own fs/partition and I'm creating the linux directory hierarchy by hand. Smiley Basically my policy is everything mainline - everything latest stable. (Reason for creating this is if I want to run 3.14 none of the distros want to know about me, and I want to see the driver code for my hardware and muck around with it.)

And yes, Ted Ts'o is a bit of a smarty pants on the linux kernel mailing list, which I've found out personally. (Not sure how he treated you, conman)
The choice and features of each linux kernel pretty much has precisely zero impact on cgminer so there's nothing to test.
legendary
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
Thanks, you called it.  Problem down to one hub now I'm happy Grin
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
what does this mean?:

AMU 57 SendWork usb write err:(-9) LIBUSB_ERROR_PIPE

I'm getting hashrate to build up to 2/3rds the way then half of it shuts off and it stats to reload again until the cycle repeats.  Cannot get everything on and mining in harmony. 
It means there has been a fatal usb communication error and cgminer drops the device to allow it to restart again. You probably don't have enough power or dodgy connections etc.

Its not that simple though - I've have them all up and running before but for some reason I see that after a little that a string of them would turn on (an entire hub wont seem to connect, I have 9 hubs, of those 3 are daisy chained to a 4th.
Doesn't matter how complex your setup is, the error means the same thing. Often when something fails it can take out/reset a whole hub since the communication channel is shared.
legendary
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
what does this mean?:

AMU 57 SendWork usb write err:(-9) LIBUSB_ERROR_PIPE

I'm getting hashrate to build up to 2/3rds the way then half of it shuts off and it stats to reload again until the cycle repeats.  Cannot get everything on and mining in harmony. 
It means there has been a fatal usb communication error and cgminer drops the device to allow it to restart again. You probably don't have enough power or dodgy connections etc.

Its not that simple though - I've have them all up and running before but for some reason I see that after a little that a string of them would turn on (an entire hub wont seem to connect, I have 9 hubs, of those 3 are daisy chained to a 4th.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
what does this mean?:

AMU 57 SendWork usb write err:(-9) LIBUSB_ERROR_PIPE

I'm getting hashrate to build up to 2/3rds the way then half of it shuts off and it stats to reload again until the cycle repeats.  Cannot get everything on and mining in harmony. 
It means there has been a fatal usb communication error and cgminer drops the device to allow it to restart again. You probably don't have enough power or dodgy connections etc.
legendary
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
what does this mean?:

AMU 57 SendWork usb write err:(-9) LIBUSB_ERROR_PIPE

I'm getting hashrate to build up to 2/3rds the way then half of it shuts off and it stats to reload again until the cycle repeats.  Cannot get everything on and mining in harmony. 
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Hi, I have a question about the Cgminer API, and I hope this is the correct thread for these questions.

The Network Difficulty is reported by the Coin command, but if you have two pools with different coins, you don't know for which pool the Network Difficulty is reported. It looks like the Coin command reports the network difficulty for the pool/coin that had the last network difficulty change, but that isn't always the highest prioritized pool where you actually mine.

Isn't the Network Difficulty something that would be better to include in the Pool command, and specified for each pool?

Thanks for a great API and please let me know if I got all this wrong.
We don't care about anything but bitcoin so we have no interest in making changes for multiple coin support.
legendary
Activity: 3346
Merit: 1094
Hi, I have a question about the Cgminer API, and I hope this is the correct thread for these questions.

The Network Difficulty is reported by the Coin command, but if you have two pools with different coins, you don't know for which pool the Network Difficulty is reported. It looks like the Coin command reports the network difficulty for the pool/coin that had the last network difficulty change, but that isn't always the highest prioritized pool where you actually mine.

Isn't the Network Difficulty something that would be better to include in the Pool command, and specified for each pool?

Thanks for a great API and please let me know if I got all this wrong.
legendary
Activity: 1190
Merit: 1000

OK thanks. That helped.
I had to install linux again next to the one i had already installed to get it working. I tried autogen and make yesterday, but there where some errors and when it returned errors today when i tried it your way i decided to install linux again.
At first it did'nt work when entering sudo ./cgminer, but that was because there was no asics enabled.
I have tried to enable bitmine A1 asics, but it could'nt.

All i need now is to get the technobit 130 ghs running...

Any pointers?

Ahh, you are on wrong thread  Cheesy I can not answer here   Smiley

Try to ask here:
https://bitcointalksearch.org/topic/m.5418228

or

https://bitcointalksearch.org/topic/ann-technobit-hex8a1-240-ghs-coincraft-a1-board-finished-production-376351

I will help you  Wink
newbie
Activity: 38
Merit: 0
ok iĺl be more specific...

last time i had cgminer running it was 3.7 i think through the console/terminal so i dont know wich executionable you are talking about.. if you could be so kind and tell me i would apreciate it.
i need to get cgminer running now, as i have just received a package.

Make sure the following package already installed on your ubuntu system
Code:
1. sudo apt-get update
2. sudo apt-get upgrade
3. sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev
4. sudo apt-get install autotools-dev autoconf automake libcurl3-dev
5. sudo apt-get install libtool libncurses-dev yasm
6. sudo apt-get install curl libcurl4-openssl-dev libjansson-dev screen
7. sudo apt-get install pkg-config uthash-dev make git-core

Download & compile cgminer 4.2.3, no need to install.
Code:
1. sudo git clone https://github.com/ckolivas/cgminer.git
2. sudo mv cgminer cgminer-4.2.3
3. cd cgminer-4.2.3
4. sudo ./autogen.sh --enable-ants1 --enable-avalon --enable-bitfury
5. sudo make

Step number 4  use additional option to enable specific device. Add the option based on available devices.
Code:
 --enable-ants1          Compile support for Antminer S1 Bitmain (default  disabled)
  --enable-avalon         Compile support for Avalon (default disabled)
  --enable-bab            Compile support for BlackArrow Bitfury (default disabled)
  --enable-bflsc          Compile support for BFL ASICs (default disabled)
  --enable-bitforce       Compile support for BitForce FPGAs (default disabled)
  --enable-bitfury        Compile support for BitFury ASICs (default disabled)
  --enable-cointerra      Compile support for Cointerra ASICs (default  disabled)
  --enable-drillbit       Compile support for Drillbit BitFury ASICs (default disabled)
  --enable-hashfast       Compile support for Hashfast (default disabled)
  --enable-icarus         Compile support for Icarus (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-klondike       Compile support for Klondike (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-minion         Compile support for Minion BlackArrow ASIC (default disabled)
  --enable-modminer       Compile support for ModMiner FPGAs(default disabled)

To run, go to cgminer-4.2.3 folder.
Code:
sudo ./cgminer

To use cgminer-api, you need to compile it first
Code:
sudo gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api

To run
Code:
cgminer-api stats
Code:
cgminer-api pools
Code:
cgminer-api summary
Code:
cgminer-api devs

OK thanks. That helped.
I had to install linux again next to the one i had already installed to get it working. I tried autogen and make yesterday, but there where some errors and when it returned errors today when i tried it your way i decided to install linux again.
At first it did'nt work when entering sudo ./cgminer, but that was because there was no asics enabled.
I have tried to enable bitmine A1 asics, but it could'nt.

All i need now is to get the technobit 130 ghs running...

Any pointers?
legendary
Activity: 1190
Merit: 1000

Are those steps apply for the Raspberry pi as well. I was looking for a detailed Installation instruction like this a page before and ended up with backing up my previews version 1.8 or so. I am mining on 2GH/s with a Antminer U2 with a 14% error rate.

Yes  Smiley

The different is you don't need sudo while compile cgminer & add --enable-icarus
Code:
1. git clone https://github.com/ckolivas/cgminer.git
2. mv cgminer cgminer-4.2.3
3. cd cgminer-4.2.3
4. ./autogen.sh --enable-ants1 --enable-avalon --enable-bitfury --enable-icarus
5. make
newbie
Activity: 39
Merit: 0
ok iĺl be more specific...

last time i had cgminer running it was 3.7 i think through the console/terminal so i dont know wich executionable you are talking about.. if you could be so kind and tell me i would apreciate it.
i need to get cgminer running now, as i have just received a package.

Make sure the following package already installed on your ubuntu system
Code:
1. sudo apt-get update
2. sudo apt-get upgrade
3. sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev
4. sudo apt-get install autotools-dev autoconf automake libcurl3-dev
5. sudo apt-get install libtool libncurses-dev yasm
6. sudo apt-get install curl libcurl4-openssl-dev libjansson-dev screen
7. sudo apt-get install pkg-config uthash-dev make git-core

Download & compile cgminer 4.2.3, no need to install.
Code:
1. sudo git clone https://github.com/ckolivas/cgminer.git
2. sudo mv cgminer cgminer-4.2.3
3. cd cgminer-4.2.3
4. sudo ./autogen.sh --enable-ants1 --enable-avalon --enable-bitfury
5. sudo make

Step number 4  use additional option to enable specific device. Add the option based on available devices.
Code:
 --enable-ants1          Compile support for Antminer S1 Bitmain (default  disabled)
  --enable-avalon         Compile support for Avalon (default disabled)
  --enable-bab            Compile support for BlackArrow Bitfury (default disabled)
  --enable-bflsc          Compile support for BFL ASICs (default disabled)
  --enable-bitforce       Compile support for BitForce FPGAs (default disabled)
  --enable-bitfury        Compile support for BitFury ASICs (default disabled)
  --enable-cointerra      Compile support for Cointerra ASICs (default  disabled)
  --enable-drillbit       Compile support for Drillbit BitFury ASICs (default disabled)
  --enable-hashfast       Compile support for Hashfast (default disabled)
  --enable-icarus         Compile support for Icarus (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-klondike       Compile support for Klondike (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-minion         Compile support for Minion BlackArrow ASIC (default disabled)
  --enable-modminer       Compile support for ModMiner FPGAs(default disabled)

To run, go to cgminer-4.2.3 folder.
Code:
sudo ./cgminer

To use cgminer-api, you need to compile it first
Code:
sudo gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api

To run
Code:
cgminer-api stats
Code:
cgminer-api pools
Code:
cgminer-api summary
Code:
cgminer-api devs

Are those steps apply for the Raspberry pi as well. I was looking for a detailed Installation instruction like this a page before and ended up with backing up my previews version 1.8 or so. I am mining on 2GH/s with a Antminer U2 with a 14% error rate.
legendary
Activity: 1190
Merit: 1000
ok iĺl be more specific...

last time i had cgminer running it was 3.7 i think through the console/terminal so i dont know wich executionable you are talking about.. if you could be so kind and tell me i would apreciate it.
i need to get cgminer running now, as i have just received a package.

Make sure the following package already installed on your ubuntu system
Code:
1. sudo apt-get update
2. sudo apt-get upgrade
3. sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev
4. sudo apt-get install autotools-dev autoconf automake libcurl3-dev
5. sudo apt-get install libtool libncurses-dev yasm
6. sudo apt-get install curl libcurl4-openssl-dev libjansson-dev screen
7. sudo apt-get install pkg-config uthash-dev make git-core

Download & compile cgminer 4.2.3, no need to install.
Code:
1. sudo git clone https://github.com/ckolivas/cgminer.git
2. sudo mv cgminer cgminer-4.2.3
3. cd cgminer-4.2.3
4. sudo ./autogen.sh --enable-ants1 --enable-avalon --enable-bitfury
5. sudo make

Step number 4  use additional option to enable specific device. Add the option based on available devices.
Code:
 --enable-ants1          Compile support for Antminer S1 Bitmain (default  disabled)
  --enable-avalon         Compile support for Avalon (default disabled)
  --enable-bab            Compile support for BlackArrow Bitfury (default disabled)
  --enable-bflsc          Compile support for BFL ASICs (default disabled)
  --enable-bitforce       Compile support for BitForce FPGAs (default disabled)
  --enable-bitfury        Compile support for BitFury ASICs (default disabled)
  --enable-cointerra      Compile support for Cointerra ASICs (default  disabled)
  --enable-drillbit       Compile support for Drillbit BitFury ASICs (default disabled)
  --enable-hashfast       Compile support for Hashfast (default disabled)
  --enable-icarus         Compile support for Icarus (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-klondike       Compile support for Klondike (default disabled)
  --enable-knc            Compile support for KnC miners (default disabled)
  --enable-minion         Compile support for Minion BlackArrow ASIC (default disabled)
  --enable-modminer       Compile support for ModMiner FPGAs(default disabled)

To run, go to cgminer-4.2.3 folder.
Code:
sudo ./cgminer

To use cgminer-api, you need to compile it first
Code:
sudo gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api

To run
Code:
cgminer-api stats
Code:
cgminer-api pools
Code:
cgminer-api summary
Code:
cgminer-api devs
sr. member
Activity: 295
Merit: 250
could anybody be so kind and give step by step instruction on how to get 4.2.2 working on linux (ubuntu)?
From reading the first post in this thread, you learn you have to do this:

Go here: http://ck.kolivas.org/apps/cgminer/

If you have 32-bit Ubuntu, download the file cgminer-4.2.2.tar.bz2.
If you have 64-bit Ubuntu, download the file cgminer-4.2.2-x86_64-built.tar.bz2

Either way, unzip the file you downloaded.  Then run the executable you just unzipped, follow the prompts to set up your first pool, plug in your devices, and poof, you're mining.  (I also suggest, after you configure your pool and other settings, that you save a config file using the in-program menus and prompts.)

For anything more specific than that, you'll have to ask a clearer question.

ok iĺl be more specific...

last time i had cgminer running it was 3.7 i think through the console/terminal so i dont know wich executionable you are talking about.. if you could be so kind and tell me i would apreciate it.
i need to get cgminer running now, as i have just received a package.
I thought it was clear - "run the executable you just unzipped". The executable is cgminer - it's just zipped up for faster download. Once you unzip it, you just run it, like any other Linux program.  Either type in the name from the command line, or double click the file if you're using a GUI.  If you want to control how it runs, check the readme file and set the command line parameters the way you want them, or configure them in the program and write the config file using the built in function.

I'm sorry, but I'm honestly not sure how to be any clearer. If you don't know how to run a program in your preferred operating system, then you need to spend some time learning how to do that along with other basic tasks, like how to safely boot and shut down the PC, or how to log on and log off, or how to save your documents for later use.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
The following code snippet appears in cgminer.c from the latest (April 4, 2014) git clone.

Code:
   3073         } else {
   3074                 char *hexstr;
   3075
   3076                 endian_flip128(work->data, work->data);
   3077
   3078                 /* build hex string */
   3079                 hexstr = bin2hex(work->data, 118);
   3080                 s = strdup("{\"method\": \"getwork\", \"params\": [ \"");
   3081                 s = realloc_strcat(s, hexstr);
   3082                 s = realloc_strcat(s, "\" ], \"id\":1}");
   3083                 free(hexstr);
   3084         }

Question: in line 3079 why is the data length being passed to bin2hex()  set to 118? Should this not be 'sizeof(work->data)', that is to say, 256 bytes?
No because only those variables are actually the work payload which becomes the result. Other data in the work struct are private.
newbie
Activity: 6
Merit: 0
The following code snippet appears in cgminer.c from the latest (April 4, 2014) git clone.

Code:
   3073         } else {
   3074                 char *hexstr;
   3075
   3076                 endian_flip128(work->data, work->data);
   3077
   3078                 /* build hex string */
   3079                 hexstr = bin2hex(work->data, 118);
   3080                 s = strdup("{\"method\": \"getwork\", \"params\": [ \"");
   3081                 s = realloc_strcat(s, hexstr);
   3082                 s = realloc_strcat(s, "\" ], \"id\":1}");
   3083                 free(hexstr);
   3084         }

Question: in line 3079 why is the data length being passed to bin2hex()  set to 118? Should this not be 'sizeof(work->data)', that is to say, 256 bytes?
newbie
Activity: 38
Merit: 0
could anybody be so kind and give step by step instruction on how to get 4.2.2 working on linux (ubuntu)?
From reading the first post in this thread, you learn you have to do this:

Go here: http://ck.kolivas.org/apps/cgminer/

If you have 32-bit Ubuntu, download the file cgminer-4.2.2.tar.bz2.
If you have 64-bit Ubuntu, download the file cgminer-4.2.2-x86_64-built.tar.bz2

Either way, unzip the file you downloaded.  Then run the executable you just unzipped, follow the prompts to set up your first pool, plug in your devices, and poof, you're mining.  (I also suggest, after you configure your pool and other settings, that you save a config file using the in-program menus and prompts.)

For anything more specific than that, you'll have to ask a clearer question.

ok iĺl be more specific...

last time i had cgminer running it was 3.7 i think through the console/terminal so i dont know wich executionable you are talking about.. if you could be so kind and tell me i would apreciate it.
i need to get cgminer running now, as i have just received a package.
legendary
Activity: 1610
Merit: 1000
Con,

I am looking at stale_work() code. I am wandering if work gets stale in solo and gbt also?

if (pool->gbt_workid)
      work->job_id = strdup(pool->gbt_workid);
Shall job_id be checked inside stale_work code. For stratum it is considered as stale if there is no share but for gbt and solo?
Thanks
There are enough checks to determine if work is stale with gbt solo/pool already.
Thanks,
Can you give me some hints what to look for in the code i am carious

Thanks
work_block is enough to pick up if we're working on the same block. work_id is used only for pooled gbt mining (not solo) to tell the pool which gbt update it came from (and is optional at the pool end).
Thank You Cheesy
Jump to: