Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: msmith78037 on March 01, 2015, 02:38:19 AM



Title: BFGMiner Source Help
Post by: msmith78037 on March 01, 2015, 02:38:19 AM
I want to write a program that can use my Saphire asic miner to generate a hash. I just need to pass in a value and get the value returned. I need some help with my class project (C#), the idea is to write a C# program that connects to a hardware device. My questions below are listed starting at the minimum and moving to more helpful.

1) Anyone what/where command codes are for a Saphire miner? By sapphire I mean the USB device that generates 333 Mh/s.
2) Anyone know which source file this correlates to? I see no sapphire driver.
3) Any guidance on which source file / function that actually does the work of passing in a parameter and handling the return value?

I did try on my own but the main function is in Sample and doesn't seem to do what I expected (possibly misunderstood  :)). I couldn't find the work function. And I couldn't tell which driver I needed to look at.

Thanks for any answer.


Title: Re: BFGMiner Source Help
Post by: nwoolls on March 04, 2015, 11:54:34 PM
I want to write a program that can use my Saphire asic miner to generate a hash. I just need to pass in a value and get the value returned. I need some help with my class project (C#), the idea is to write a C# program that connects to a hardware device. My questions below are listed starting at the minimum and moving to more helpful.

1) Anyone what/where command codes are for a Saphire miner? By sapphire I mean the USB device that generates 333 Mh/s.
2) Anyone know which source file this correlates to? I see no sapphire driver.
3) Any guidance on which source file / function that actually does the work of passing in a parameter and handling the return value?

I did try on my own but the main function is in Sample and doesn't seem to do what I expected (possibly misunderstood  :)). I couldn't find the work function. And I couldn't tell which driver I needed to look at.

Thanks for any answer.

The relevant files are here:

https://github.com/luke-jr/bfgminer/blob/bfgminer/driver-erupter.c
https://github.com/luke-jr/bfgminer/blob/bfgminer/driver-icarus.c
https://github.com/luke-jr/bfgminer/blob/bfgminer/driver-icarus.h

That being said, ASICs including the Erupter are not made to provide hashes of random data. They take a very specific input describing work to be done and generally return a nonce that satisfies that piece of work.

It's all very specific to blockchain mining. See the following for more info:

http://bitcoin.stackexchange.com/a/1291


Title: Re: BFGMiner Source Help
Post by: TYPEcoin on March 06, 2015, 02:24:02 PM
I'm on beginning level but this topic help me a lot, thanks.