Bitcoin Forum
April 18, 2024, 08:45:44 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: change Voltage & Frequency using cgminer api  (Read 579 times)
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 09:22:16 AM
Last edit: April 18, 2020, 02:16:40 AM by frodocooper
 #1

Hello dear fellow Miners,

I am trying to understand how I can change global voltage and frequency on my Antminer S9s using the cgminer API. I have been able to monitor all kinds of things, change pools etc. but I don't quite understand the documentation clearly.

Could somebody provide me an example?

I believe the command below (from the documentation at: https://github.com/ckolivas/cgminer/blob/master/API-README) might be what I need?

Code:
ascset|N,opt[,val] (*)
               none           There is no reply section just the STATUS section
                              stating the results of setting ASC N with
                              opt[,val]
                              This is only available if ASC mining is enabled

                              If the ASC does not support any set options, it
                              will always return a WARN stating ascset isn't
                              supported

                              If opt=help it will return an INFO status with a
                              help message about the options available

                              The current options are:
                               AVA+BTB opt=freq val=256 to 1024 - chip frequency
                               BTB opt=millivolts val=1000 to 1400 - corevoltage
                               MBA opt=reset val=0 to chipcount - reset a chip
                               BMA opt=volt val=0-9 opt=clock val=0-15
                               MBA opt=freq val=0-chip:100-1400 - set chip freq
                               MBA opt=ledcount val=0-100 - chip count for led
                               MBA opt=ledlimit val=0-200 - led off below GHs
                               MBA opt=spidelay val=0-9999 - SPI per I/O delay
                               MBA opt=spireset i|s0-9999 - SPI regular reset
                               MBA opt=spisleep val=0-9999 - SPI reset sleep ms
1713473144
Hero Member
*
Offline Offline

Posts: 1713473144

View Profile Personal Message (Offline)

Ignore
1713473144
Reply with quote  #2

1713473144
Report to moderator
1713473144
Hero Member
*
Offline Offline

Posts: 1713473144

View Profile Personal Message (Offline)

Ignore
1713473144
Reply with quote  #2

1713473144
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713473144
Hero Member
*
Offline Offline

Posts: 1713473144

View Profile Personal Message (Offline)

Ignore
1713473144
Reply with quote  #2

1713473144
Report to moderator
1713473144
Hero Member
*
Offline Offline

Posts: 1713473144

View Profile Personal Message (Offline)

Ignore
1713473144
Reply with quote  #2

1713473144
Report to moderator
1713473144
Hero Member
*
Offline Offline

Posts: 1713473144

View Profile Personal Message (Offline)

Ignore
1713473144
Reply with quote  #2

1713473144
Report to moderator
favebook
Sr. Member
****
Offline Offline

Activity: 604
Merit: 416


View Profile
April 17, 2020, 09:26:06 AM
 #2

Use a custom firmware for S9s, do not meddle with things you do not understand (that tends to end badly for people).
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 09:37:25 AM
Last edit: April 18, 2020, 02:17:19 AM by frodocooper
 #3

Hello Favebook,

Thank you for your reply. I have been using stock Firmware, braiinsOS and Awesome Miner. All of them have their advantages and disadvantages. One thing none of them can do for me though is to programatically change frequency and voltage. Do you know of any custom firmware that can do this? I was thinking about trying hiveOS as well!

As for now I am looking for a more customised approach. I was hoping somebody in here could help me to understand. Of course you are right, that nobody should execute commands or code without having a clue whats going on there.
favebook
Sr. Member
****
Offline Offline

Activity: 604
Merit: 416


View Profile
April 17, 2020, 11:18:44 AM
 #4

I have never used braiinsOS nor Awesome Miner so I cannot give any insight into them, but if you want to manually control Voltage and Frequency, I'd suggest you to try Rocket's firmware.

I've used it for about 9 months on my S9 machines before I decided to sell them. Was really satisfied. And now I am using his firmware for S17Pro/S17+.


P.S.
I am in no way affiliated nor do I have any profit from his firmware. I just like it and that is why I recommend it.
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 11:29:06 AM
 #5

Manually controlling voltage and frequency is possible with both: Awesome Miner and braiinsOS.
From what I can find on the internet and in this forum, Rocket's firmware seems interesting but does not state any specifics about programatically changing volt and frequency. Doing so from within the webview/browser is not what I am aiming for, as this is possible with a range of firmwares. If you do know about a programmatic way that can be automated I'd be very glad to hear about it!

The cgminer API is implemented widely on many different miners. Thats why I want to use it.
As an alternative I am thinking about writing a script that will modify the configuration file (eg. bosminer.toml for braiinsOS) on a given miner and restart the mining process via ssh.
I just though cgminer API might be a better solution.
favebook
Sr. Member
****
Offline Offline

Activity: 604
Merit: 416


View Profile
April 17, 2020, 11:31:36 AM
 #6

programatically changing volt and frequency.

Not really sure what you mean by that. Can you elaborate?
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 11:39:46 AM
Merited by frodocooper (4), philipma1957 (1)
 #7

I want to write a software that will adapt frequency and voltage automatically based on availability of energy (coming from the wind), energy prices (changing frequently - every 15 min) and bitcoin price. When lots of wind is blowing, electricity is available plenty and cheaply. In that case I want to run with very high voltage and frequency. When energy is expensive, I want to either turn off mining completely or run with much lower power to still be profitable. (Better energy efficiency - Mhash / J).

I cannot sit in front of my computer all day checking energy and bitcoins prices, manually changing voltage and frequrency to make sure I am running on a profit. Thats why I need to automate these tasks and have my software/server configure the miners for me.
philipma1957
Legendary
*
Offline Offline

Activity: 4102
Merit: 7710


'The right to privacy matters'


View Profile WWW
April 17, 2020, 11:56:00 AM
 #8

I want to write a software that will adapt frequency and voltage automatically based on availability of energy (coming from the wind), energy prices (changing frequently - every 15 min) and bitcoin price. When lots of wind is blowing, electricity is available plenty and cheaply. In that case I want to run with very high voltage and frequency. When energy is expensive, I want to either turn off mining completely or run with much lower power to still be profitable. (Better energy efficiency - Mhash / J).

I cannot sit in front of my computer all day checking energy and bitcoins prices, manually changing voltage and frequrency to make sure I am running on a profit. Thats why I need to automate these tasks and have my software/server configure the miners for me.

That is an ambitious undertaking. If it were to succeed it would be valuable for renewable energy mining.  Please keep posting if you have any progress with the programming.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
favebook
Sr. Member
****
Offline Offline

Activity: 604
Merit: 416


View Profile
April 17, 2020, 12:13:20 PM
Last edit: April 18, 2020, 02:19:36 AM by frodocooper
 #9

Yeah, that truly is one big plan. I'd imagine something like that would take a team of experienced programmers. But I can in no way assist you in that jakaba.

But I wish you all the luck!

Will be following this thread.
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 12:46:20 PM
 #10

Sure thing, I will give you an update once I've made substantial progress!

In the meantime, if anyone experienced with cgminer API has some insights to share let me know. I Want to explore every possibility.
taserz
Sr. Member
****
Offline Offline

Activity: 798
Merit: 293


Created AutoTune to saved the planet! ~USA


View Profile
April 17, 2020, 01:31:15 PM
 #11

I want to write a software that will adapt frequency and voltage automatically based on availability of energy (coming from the wind), energy prices (changing frequently - every 15 min) and bitcoin price. When lots of wind is blowing, electricity is available plenty and cheaply. In that case I want to run with very high voltage and frequency. When energy is expensive, I want to either turn off mining completely or run with much lower power to still be profitable. (Better energy efficiency - Mhash / J).

I cannot sit in front of my computer all day checking energy and bitcoins prices, manually changing voltage and frequrency to make sure I am running on a profit. Thats why I need to automate these tasks and have my software/server configure the miners for me.

So you have to power cycle the miner pretty much everytime you want to change those settings. Drawback number 1. Also your going to have to autotune for every voltage level and that is going to be a ton on the s9.

I would just run the s9 LPM (low power mode) version on asic.to  then ssh in and do bmminer-api stats

Autotune Firmware for S19 and S19j! Overclock, Underclock, AutoTuning. Asic.to The MOON Increased hashrate, improved power efficiency 30w/TH up to 85th/s!!Mining bitcoin since 2011 • Best nerd decision of my life
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 17, 2020, 02:40:50 PM
Last edit: April 18, 2020, 02:21:38 AM by frodocooper
Merited by frodocooper (3)
 #12

Hey taserz, thank you for your reply!

I don't plan on changing voltage and frequency on my miners more often than necessary. Of course I would have to find a good balance with that.
Given that I have electricity prices between 0.0$ and 0.20$ / KWh over the year I need to adapt my miners though. Running at 16 TH/s when electricity is "free", running at around 9-10 TH/s when it is above 0.03$ and not running at all above 0.05$ is my goal. Of course those thresholds will be variable and multiple presets may exist.

I am hoping - though I don't know for sure - that this method will give me better results even with autotuning turned off. If you disagree I'd love to hear your arguments!
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1798


Linux since 1997 RedHat 4


View Profile
April 17, 2020, 11:54:54 PM
Merited by o_e_l_e_o (2), NotFuzzyWarm (1)
 #13

I wrote that document you quoted and the code related to it.

It is up to the driver developer to include ascset commands, since each device driver has it's own unique hardware related to that.

If BM don't include options to change what you want in the API in their driver, that they added to cgminer, then it's not available at the moment.
You'd have to request them, or the only legal firmware release: bOS, to add it to their release.

HiveOS, and every other release for BM hardware in this part of the forum, violates the cgminer license.
That violation includes the firmware released with awesomeminer.
While people like Phil and tazers only care about money and gambling, and don't give a damn about the cgminer license, please avoid joining that crowd of criminals using infringing firmware.

Also note the obvious: the price of BTC changes every day every hour.
You don't know in advance, what price you will get for all the BTC you generated for the days or weeks up to when you sell it.
Pretending that calculations based on the current hourly price and difficulty will directly affect your profit/loss, shows a complete misunderstanding of that.

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
taserz
Sr. Member
****
Offline Offline

Activity: 798
Merit: 293


Created AutoTune to saved the planet! ~USA


View Profile
April 18, 2020, 12:31:14 AM
 #14

I wrote that document you quoted and the code related to it.

It is up to the driver developer to include ascset commands, since each device driver has it's own unique hardware related to that.

If BM don't include options to change what you want in the API in their driver, that they added to cgminer, then it's not available at the moment.
You'd have to request them, or the only legal firmware release: bOS, to add it to their release.

HiveOS, and every other release for BM hardware in this part of the forum, violates the cgminer license.
That violation includes the firmware released with awesomeminer.
While people like Phil and tazers only care about money and gambling, and don't give a damn about the cgminer license, please avoid joining that crowd of criminals using infringing firmware.

Also note the obvious: the price of BTC changes every day every hour.
You don't know in advance, what price you will get for all the BTC you generated for the days or weeks up to when you sell it.
Pretending that calculations based on the current hourly price and difficulty will directly affect your profit/loss, shows a complete misunderstanding of that.

https://www.cryptomining.tools/calculator

^ good way to calculate but it's a crap shoot

Autotune Firmware for S19 and S19j! Overclock, Underclock, AutoTuning. Asic.to The MOON Increased hashrate, improved power efficiency 30w/TH up to 85th/s!!Mining bitcoin since 2011 • Best nerd decision of my life
jakaba (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 35


View Profile
April 18, 2020, 10:58:49 AM
Last edit: April 22, 2020, 08:06:54 AM by jakaba
Merited by o_e_l_e_o (2), frodocooper (2)
 #15

I wrote that document you quoted and the code related to it.

It is up to the driver developer to include ascset commands, since each device driver has it's own unique hardware related to that.

If BM don't include options to change what you want in the API in their driver, that they added to cgminer, then it's not available at the moment.
You'd have to request them, or the only legal firmware release: bOS, to add it to their release.

HiveOS, and every other release for BM hardware in this part of the forum, violates the cgminer license.
That violation includes the firmware released with awesomeminer.
While people like Phil and tazers only care about money and gambling, and don't give a damn about the cgminer license, please avoid joining that crowd of criminals using infringing firmware.

Also note the obvious: the price of BTC changes every day every hour.
You don't know in advance, what price you will get for all the BTC you generated for the days or weeks up to when you sell it.
Pretending that calculations based on the current hourly price and difficulty will directly affect your profit/loss, shows a complete misunderstanding of that.

Hello Kano,

Thanks for sharing your thoughts! The things you've said are very interesting and I will definitely keep them in mind going forward.

As brainsOS is the only decent open source solution I have found thus far there is a strong incentive for me to use it. Sadly the latest releases of braiins don't implement cgminer API as the old Cobalt releases did. Anyway as for now I feel comfortable continuing to write my own code to modify the configuration file to change the desired properties myself. So far its working pretty well.

What you said about noting the obvious. Of course you are absolutely right that there is a large degree of uncertainty involved. Depending on the scale of the mining operations it may at least be possible to minimize the timeframe between mining and selling. The results and profitability predictions will not be completely accurate, but I hope to make an educated guess about whether or not it could be profitable to mine given certain parameters. As for now the entire thing is more of a research project and in case of success I am considering to deploy it at a larger scale.
Morescratch
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 30, 2020, 04:17:42 PM
 #16

Also note the obvious: the price of BTC changes every day every hour.
You don't know in advance, what price you will get for all the BTC you generated for the days or weeks up to when you sell it.
Pretending that calculations based on the current hourly price and difficulty will directly affect your profit/loss, shows a complete misunderstanding of that.

100% however I'm with @jakaba in that knowing the current consumption and projecting forward allows you to make an educated guess about profitability. Right now its a guess at best because of price volatility but marginal gains are important especially right now post halving.

The problem I've had whilst looking at this in the past is that I couldn't find a way to get or calculate the current power consumption of the unit. All I could do is average consumption using a meter over a sample of hardware and use that value. It would be great if the actual current consumption was available in the firmware API but I understand that this is probably not possible.
philipma1957
Legendary
*
Offline Offline

Activity: 4102
Merit: 7710


'The right to privacy matters'


View Profile WWW
May 30, 2020, 04:38:34 PM
Last edit: May 31, 2020, 01:15:00 AM by frodocooper
 #17

I wrote that document you quoted and the code related to it.

It is up to the driver developer to include ascset commands, since each device driver has it's own unique hardware related to that.

If BM don't include options to change what you want in the API in their driver, that they added to cgminer, then it's not available at the moment.
You'd have to request them, or the only legal firmware release: bOS, to add it to their release.

HiveOS, and every other release for BM hardware in this part of the forum, violates the cgminer license.
That violation includes the firmware released with awesomeminer.
While people like Phil and tazers only care about money and gambling, and don't give a damn about the cgminer license, please avoid joining that crowd of criminals using infringing firmware.

Also note the obvious: the price of BTC changes every day every hour.
You don't know in advance, what price you will get for all the BTC you generated for the days or weeks up to when you sell it.
Pretending that calculations based on the current hourly price and difficulty will directly affect your profit/loss, shows a complete misunderstanding of that.

I only use braiins firmware or bm firmware.

don't slander me.

All gear I sell has braiins or bm firmware.

don't state other wise.

I am formally asking you to retract your statement.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1798


Linux since 1997 RedHat 4


View Profile
June 01, 2020, 12:50:08 AM
Last edit: June 01, 2020, 09:13:23 AM by kano
 #18

Firstly this is not my thread, I do not read every thread on the forum every day.

I do try to read every thread in the BTC mining pool section every day, since I run a BTC mining pool.

You did not contact me, as you claim in another thread, that I only found by coincidence.

---

As for using firmware that violates the cgminer license, I guess you either forgot that you did, or thought I wouldn't know to reply with a recent example, since you didn't contact me about this.

---

In the asic.to thread you have posted stating that you have used that firmware, that violates the cgminer licence.
Not only that, you've given the OP post 4 merit points.

Edit: I guess I should have quoted the specific posts here - they're now gone 7 hours later ...

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
taserz
Sr. Member
****
Offline Offline

Activity: 798
Merit: 293


Created AutoTune to saved the planet! ~USA


View Profile
June 01, 2020, 06:56:08 PM
 #19

Firstly this is not my thread, I do not read every thread on the forum every day.

I do try to read every thread in the BTC mining pool section every day, since I run a BTC mining pool.

You did not contact me, as you claim in another thread, that I only found by coincidence.

---

As for using firmware that violates the cgminer license, I guess you either forgot that you did, or thought I wouldn't know to reply with a recent example, since you didn't contact me about this.

---

In the asic.to thread you have posted stating that you have used that firmware, that violates the cgminer licence.
Not only that, you've given the OP post 4 merit points.

Edit: I guess I should have quoted the specific posts here - they're now gone 7 hours later ...

I just distribute a Linux operating system with a bunch of files on there.

Autotune Firmware for S19 and S19j! Overclock, Underclock, AutoTuning. Asic.to The MOON Increased hashrate, improved power efficiency 30w/TH up to 85th/s!!Mining bitcoin since 2011 • Best nerd decision of my life
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1798


Linux since 1997 RedHat 4


View Profile
June 03, 2020, 12:53:33 PM
 #20

...
Edit: I guess I should have quoted the specific posts here - they're now gone 7 hours later ...
Guess I needed time to reread the whole thread yet again, it's pretty clear Smiley

After reading through it in detail again, here's the issues:

He says multiple times how he will use the firmware.
He posts stats about performance.
He merits the OP 5 times with a total of 12 merit points.
The OP merits his posts twice.
He posts in the thread ...  17 times, never once saying people shouldn't use the firmware, often promoting it.

Clearly, his posts and merits are supporting someone who is violating the cgminer license.

Aside: I can say the same about frodo also, since he merits the thread over and over ... but frodo is ... well yeah other than a pain in the ass, bias mod, he's nothing.

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