SIRBTC
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2022, 04:09:08 PM |
|
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.
¿Can help you with this? Code Miner for ESP32 (arduino) https://github.com/joric/arduino-bitcoin-minerI have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English) i have looked at running bare-metal Linux 5.0 kernel and cgminer 4.12 on ESP32-C3-DevkitC-02 but can't seem to find a better clean way to do it. Everything seems so complex with tons of bugs to accomplish. The best way is always the simplest way. Just to run bare-metal Linux 5.0 kernel on ESP32-C3 you need to add external memory using the SPI at least 8 MB (preferably 16 MB ) PSRAM plus 2 or 4 MB Flash and then connect a MicroSD for storage (32 or 64 GB ). Should we rethink using ESP32-C3-DevKitC-02 ? and try something else ? Not sure what it might be. How about using -- The Raspberry Pi Zero 2 W for US $15-- it has everything we need with 40-pin breakout with all the pins we need and might act as drop in replacement for ESP32-C3-DevkitC-02. it can run 32bit & 64Bit ubuntu 20.04, 21.04 and so on. All we need is to add cgminer 4.12 (Kanoi version ) . Any ideas or experience about this ? i think Nonce did something similar . Porting Cgminer 4.12 drivers for Gekko Compac-F to ESP32 is something we really need !!! . Hi, ¿This can help tou? Linux 5 in ESP32 and link for ubuntu 9 in ESP32 https://www.cnx-software.es/2021/07/19/linux-5-0-arranca-en-el-procesador-esp32/Tell me something for try help you........is yuo have telegram or Discord and need speak tell me too. i think that's just running JuiceVM emulation with ubuntu 9. i think we don't need a vm if the native CPU supports standard Linux Distro . Instead i am thinking of Ubuntu 20.04 , 21.04 etc with Cgminer 4.12 and that's supported on Raspberry Pi Zero 2 W and no need to do a lot of messing around . Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue.
|
|
|
|
NotFuzzyWarm
Legendary
Offline
Activity: 3738
Merit: 2667
Evil beware: We have waffles!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 14, 2022, 04:22:03 PM |
|
Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue. Frankly, using the Pi Zero or Pico is your best bet. Cgminer itself only takes a few hundred MB when running so it seems a very bad choice to use an emulator/whatnot to be able to run in on a non-native platform that would require far more memory. Oh, and please notice that one does not have to constantly quote entire msg chains...
|
|
|
|
SIRBTC
Newbie
Offline
Activity: 5
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 15, 2022, 09:31:52 AM |
|
Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue. Frankly, using the Pi Zero or Pico is your best bet. Cgminer itself only takes a few hundred MB when running so it seems a very bad choice to use an emulator/whatnot to be able to run in on a non-native platform that would require far more memory. Oh, and please notice that one does not have to constantly quote entire msg chains... Hello, you are right, the simplest thing to install Linux is to do it on the Pi Zero, the difference is that the ESP32 has a double core prepared to mine Crypto and gives you a higher performance x2. Ups!! excuseme for reply entire msg.
|
|
|
|
hZti
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 15, 2022, 12:59:50 PM |
|
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.
¿Can help you with this? Code Miner for ESP32 (arduino) https://github.com/joric/arduino-bitcoin-minerI have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English) Sadly I don’t give such coding skills, but I would gladly try to set up a device like this if I get the right software for it. Because from a technical kind of view I can for shure assemble such a miner.
|
|
|
|
n0nce
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 15, 2022, 03:50:24 PM |
|
Hello, you are right, the simplest thing to install Linux is to do it on the Pi Zero, the difference is that the ESP32 has a double core prepared to mine Crypto and gives you a higher performance x2.
If anything, the Pi Zero has heaps more processing power. In fact, it has a quad-core 64-bit ARM Cortex-A53 SoC running at 1GHz and also has 512MB of RAM. The main reason for Skot to choose ESP32 is that it's cheaper and doesn't run a full OS. Microcontrollers like this also recover easier / more reliably from sudden power cuts, which makes them better suited to control smaller numbers of ASIC chips. It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis. You also can't usually order Raspberry Pi in large quantities. Looking at RP2040 would be interesting, though. Can be bought relatively cheap, in bulk, not affected by chip shortage..
|
|
|
|
developeralgo
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 63
Merit: 72
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 16, 2022, 06:24:36 PM Last edit: November 16, 2022, 06:38:37 PM by developeralgo Merited by vapourminer (1) |
|
It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis. You also can't usually order Raspberry Pi in large quantities.
Looking at RP2040 would be interesting, though. Can be bought relatively cheap, in bulk, not affected by chip shortage..
i agree that Raspberry Pi Zero 2 W is hard to get right now therefore very expensive and ESP32 is ideal but its lacking in necessary software support and resources. we don't want to reinvent the wheel every time we need to accomplish something. There is big shortage of Pi Zero sized SBC units around the world . Normal prices are around USD$20 or less but due to chip shortages and high inflation around the world , they have shot up to US$ 45 to US$200 depending the specifications I have been looking at Raspberry Pi Zero 2 W Clones ( with 4GB RAM and 16GB Storage with inbuilt WiFi) which support running standard Linux Distro like Ubuntu 20.04+ with or without a desktop : The following come to mind (but also be careful about standard Linux Distro software support for the clones): 1. Radxa Zero ( or upcoming Radxa Zero 2 ) ---- 64bit 4G RAM, 16GB eMMC, built-in WiFi ( around US$50 ) --- Can run ubuntu 20.04 Server out-of-box with cgminer 4.12 --- You can order this in bulk 2. Banana Pi M2 Zero BPI-M2 with H3 Allwinner -- 512 MB RAM, with Micro SD and built-in WiFi 3. MangoPi MQ-Pro Allwinner D1 --- 1 GB RAM , with Micro SD and built-in WiFi 4. Raspberry Pi Pico RP2040 -- will need to go through same issues as ESP32-C3-DevkitC-02 Radxa Zero also have variants with 512 MB, 1 GB, 2GB that are cheaper at around $39 or less. With Chip shortages its hard to get lower cheap prices for anything that can do the job. Check this or aliexpress https://shop.allnetchina.cn/collections/frontpage/products/copy-of-radxa-zero?variant=39440872276070
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 17, 2022, 10:49:01 PM Last edit: November 18, 2022, 04:07:32 AM by Skot Merited by vapourminer (2) |
|
If anything, the Pi Zero has heaps more processing power. In fact, it has a quad-core 64-bit ARM Cortex-A53 SoC running at 1GHz and also has 512MB of RAM. The main reason for Skot to choose ESP32 is that it's cheaper and doesn't run a full OS. Microcontrollers like this also recover easier / more reliably from sudden power cuts, which makes them better suited to control smaller numbers of ASIC chips. It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis. You also can't usually order Raspberry Pi in large quantities.
yes, exactly! ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) I don't think you guys are going to get Linux running on a ESP32. Not well at least. When I was talking about running cgminer on a ESP32, what I meant was: Porting some of the functionality of cgminer to the ESP32. The things that cgminer Kano edition can do that need to run on the ESP32 (as ESP-Miner) are: - Turning on and configuring the BM1397 over serial - Setting the baud rate, hashing frequency, and filling in some other mystery registers - Connecting to a pool or stratum server and getting the latest work over the stratum JSON-RPC protocol. - we need a place to configure this URL too.. maybe on a simple webpage hosted on the ESP32? - Parsing that work into the format that the BM1397 wants - it's really pretty similar. the only tricky thing is the midstates, but Kano seems to have figured this out. - Sending the work to the BM1397 over serial. 115200 baud is prolly fine. - Listening for replies from the BM1397 (decent hashes) - based on the hashing frequency, know when the BM1397 has been at it for too long and send it some new work. - Packaging up those replies into the format that the stratum server wants and sending it off. - All of the administrative stuff of running a miner like; - Set the BM1397 core voltage and current. - check the fan speed - check the BM1397 temperature - optimize the hashing frequency and core voltage for max efficiency I put this together with a (hastily made) block diagram on GitHub; https://github.com/skot/ESP-Mineralas, I have not coded any of this yet. I tried out some of the ESP-IDF WiFi sample projects and they worked great. I messed around with cJSON and it seems very capable of parsing JSON-RPC. https://github.com/DaveGamble/cJSON
|
|
|
|
n0nce
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 18, 2022, 06:21:28 PM |
|
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained). This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_SupplyI have my GekkoScience hub kicking around that I'd regulate down to the core voltage required by BitaxeMAX, using this step-down circuit. Are you running your BitaxeMAX off that PSU or still off of your lab power supply?
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained). This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_SupplyYup, exactly! Running low voltage-high current from the TPS40305 to the bitaxeMax over those connectors is not ideal. (Like NotFuzzyWarm said earlier). It should really all be on the same board. I was waiting to make some progress on the ESP32 firmware side of things before making another PCB, but maybe I should just do this. I have my GekkoScience hub kicking around that I'd regulate down to the core voltage required by BitaxeMAX, using this step-down circuit.
Are you running your BitaxeMAX off that PSU or still off of your lab power supply?
I am running my BitaxeMax off the TPS40305 board. I power the TPS board with 5V from the lab power supply.
|
|
|
|
developeralgo
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 63
Merit: 72
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2022, 02:06:00 PM Last edit: November 20, 2022, 02:27:00 PM by developeralgo Merited by vapourminer (1) |
|
I am running my BitaxeMax off the TPS40305 board. I power the TPS board with 5V from the lab power supply.
Skot, What is the highest Hashrates you have been able to push the bitaxeMax so far in your tests ? Have you been able to run it above 545 MHz Frequency or above 350 GH++ ? Some say they can be pushed to above 500 GH but i have no confirmation apart from one dude who is using liquid cooling and gets about 500 GHashes/s @ 3A per chip or around 1.8V @ high current per chip with GekkoScience Compac-F USB Miner. That will be really hot on those BM1397 chips. I think a tiny or mini Liquid cooling kit would help on that but it's overkill
|
|
|
|
sidehack
Legendary
Offline
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2022, 03:18:02 PM |
|
As a test of a redesigned regulator, I set up a Compac F on our regular tester (air cooled) at 600MHz and ran it 12 hours no problem. I've talked to a guy that runs a few at 750MHz I'm pretty sure with air cooling, pulls about 25 watts per stick. Between the huge die and copper plating, the package cools very efficiently.
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2022, 06:15:00 PM |
|
As a test of a redesigned regulator, I set up a Compac F on our regular tester (air cooled) at 600MHz and ran it 12 hours no problem. I've talked to a guy that runs a few at 750MHz I'm pretty sure with air cooling, pulls about 25 watts per stick. Between the huge die and copper plating, the package cools very efficiently.
Wow that’s impressive! I definitely have not gotten that high. What core voltage were you running at? I need to get my low voltage regulator on board before I can get there.
|
|
|
|
developeralgo
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 63
Merit: 72
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2022, 08:45:09 PM Last edit: November 20, 2022, 09:26:02 PM by developeralgo |
|
Sidehack, That's really impressive. Any chance of sharing the redesigned regulator schematic ? Well you are legend , and we thank you for the wisdom nuggets. What type of step-down regulators or controllers are you using in the redesign ? is it TPS40305 controller or a different ?
I think with TPS40305 controller from Ti it's a 3-V to 20-V, 25-A, 1.2-MHz synchronous buck controller with FSS and if coupled with a Maxim DS4322 voltage adjuster as Skot did mention earlier that should get us close to achieving maximum performance without a lot of pain in power delivery system
What is the Maximum frequency of BM1397AG/AI that you have tested or have been tested by another user if you know ? is it 750 MHz or around 800 MHz and is it stable with good cooling
|
|
|
|
n0nce
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 20, 2022, 10:09:48 PM |
|
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained). This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_SupplyYup, exactly! Running low voltage-high current from the TPS40305 to the bitaxeMax over those connectors is not ideal. (Like NotFuzzyWarm said earlier). It should really all be on the same board. I was waiting to make some progress on the ESP32 firmware side of things before making another PCB, but maybe I should just do this. If it suits you time-wise to combine the 2 circuits / PCBs soon, I'd wait for that before ordering; PSU circuit seems to work fine, right! I should just do it myself, I know, but I still need to get into KiCAD. ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) If I manage to do it before you, I'll PR on GitHub.
|
|
|
|
NebulaMiner
Newbie
Offline
Activity: 22
Merit: 27
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2022, 08:56:22 AM Merited by vapourminer (2) |
|
Gratz guys for the job already done, I came upon your project last night and couldn't sleep since then... I am very exited by your project, for a good reason, I started a similair one back in november 2013, here of course (but my thread has been deleted since then, just my account profile can attest the period). Let me present it for reference only (nothing is to keep from it, old time, old chips, old tools, old design...) : Nebula Miner. The concept was to promote a decentralized mining (Satoshi spirit) without taking into account ROI and other profitability stuff. Nebula Miner was a small miner you could buy for less than 50$ (idealy), plug it at home, consume less than 10W electricity and let it run knowing you are participating to the global BTC mining (network securing) effort. Back in the time, the ASIC industry just started, Nebula Miner was based on Avalon 1 chip and Bitmain was not a thing yet. I was living in China and add access to many electronics parts and suppliers. I was working as freelance designing various PCB and embedded SW for them. Nebula Miner had a modular design with a Main Board for ethernet (wifi) communication with pool, and 1 or up to 8 Hash Board with 1 ASIC chip on each can be plug in a chain as show on the photo : https://i.ibb.co/WnrNWqW/IMG-20131225-105859-edited.jpgUnfortunately I stopped the project because it was almost impossible to buy ASIC chip on the brand new market (without repair spare parts as of today), and alone against the big mining company like Bitmain.... But today, looking at your current project, I am thinking about joining force to revive my old dream. I have advanced skills in PCB design and embedded SW development.
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2022, 04:21:50 PM |
|
Gratz guys for the job already done, I came upon your project last night and couldn't sleep since then...
Isn't that a good feeling?? At least until you have to go to work the next day. Sorry / Not Sorry! I am very exited by your project, for a good reason, I started a similair one back in november 2013, here of course (but my thread has been deleted since then, just my account profile can attest the period). Let me present it for reference only (nothing is to keep from it, old time, old chips, old tools, old design...) : Nebula Miner.
The concept was to promote a decentralized mining (Satoshi spirit) without taking into account ROI and other profitability stuff. Nebula Miner was a small miner you could buy for less than 50$ (idealy), plug it at home, consume less than 10W electricity and let it run knowing you are participating to the global BTC mining (network securing) effort.
That's awesome to hear! I feel the same way as you about this. I'm convinced there are non-trivial amounts of people out there who want to play around with bitcoin mining and be involved. They aren't too worried about ROI, and they aren't going to run any of the big noisy industrial miners out there. I've never heard of "Satoshi spirit" before, but I think I like the idea. Satoshi open sourced this whole Bitcoin thing and look where we are now. The least we can do is open source projects that are building on Bitcoin. Back in the time, the ASIC industry just started, Nebula Miner was based on Avalon 1 chip and Bitmain was not a thing yet. I was living in China and add access to many electronics parts and suppliers. I was working as freelance designing various PCB and embedded SW for them. Nebula Miner had a modular design with a Main Board for ethernet (wifi) communication with pool, and 1 or up to 8 Hash Board with 1 ASIC chip on each can be plug in a chain as show on the photo https://i.ibb.co/WnrNWqW/IMG-20131225-105859-edited.jpgUnfortunately I stopped the project because it was almost impossible to buy ASIC chip on the brand new market (without repair spare parts as of today), and alone against the big mining company like Bitmain.... The electronics field has come a long way since 2013! Now we've got amazing, open source firmware SDKs, IDEs, compilers and CAD tools. PCBs and PCBA are dirt cheap now and amazing quality. WiFi SoCs are commonplace and relatively cheap. There are all kinds of cool low-power wireless standards with reference designs mere mortals can understand. Mining ASICs and all sorts of other hardware are reasonably easy to come by on AliExpress. If it weren't for the !@#$ chip shortage I'd say we're in heaven. But today, looking at your current project, I am thinking about joining force to revive my old dream. I have advanced skills in PCB design and embedded SW development.
Yess! let's do it!
|
|
|
|
n0nce
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2022, 04:48:26 PM |
|
~
Hey Skot; I've had a look at the updated schematics of bitaxe max_v2. I believe some components need footprint assignments, but other than that the PSU circuit looks to be connected to the ASIC chip already, right? If I understand correctly, that's why not all components transfer over to the PCB layout when refreshing it. There are a few small DRC violations, but that can be fixed quickly.
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2022, 05:00:16 PM |
|
Hey Skot; I've had a look at the updated schematics of bitaxe max_v2. I believe some components need footprint assignments, but other than that the PSU circuit looks to be connected to the ASIC chip already, right? If I understand correctly, that's why not all components transfer over to the PCB layout when refreshing it. There are a few small DRC violations, but that can be fixed quickly.
The max_v2 branch is still WIP. I just pushed a commit with some TODO notes included in the schematic. I may have gotten a little carried away with changes on this rev!
|
|
|
|
NebulaMiner
Newbie
Offline
Activity: 22
Merit: 27
|
Looking at the current state, I think I can be helpfull on the Firmware code, specially the BM1397 driver. I don't have BM1397 chip nor a S17 on hand, only a S9k (BM1393 chip) and some defective S9 Hashboard (BM1387), maybe you can do some Logic Analyzer (Saleae Logic 2?) log of the Serial communication from cgminer and even better from a real S17. A good way to log the Serial comm is to use female HE10 connector directly pressed on the flat cable between control board and hash board : https://i.ibb.co/yyTyRV5/PXL-20221122-173823822-Copie.jpg. I am starting a Saleae Logic 2 High Level Analyzer https://support.saleae.com/extensions/high-level-analyzer-extensions based on the BM1385 datasheet, the BM1393 log I have, and cgminer source code for BM1397. Another great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk... Also, about the I2C temperature sensor NCT218, do you think we will keep this ref, and I can start working on a driver, or will you change the source ? About the Firmware source, I am working in Rust because : - the embedded abstraction is very well supported for ESP32-C3, and in the future, we can change the MCU easily - stratum v1 and v2 are already coded in Rust by Braiins https://github.com/braiins/braiins-open/tree/master/protocols/stratum and because v2 use Noise Protocol, it is better to not have to code it ourself - the cgminer source code is not very clean (many type mixing) and not very adapted to embedded system - will be booting/running very fast and very reliable
|
|
|
|
Skot
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 221
Merit: 246
bitaxe.org
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 22, 2022, 06:55:23 PM Merited by vapourminer (2) |
|
Looking at the current state, I think I can be helpfull on the Firmware code, specially the BM1397 driver.
Ok, great! I think we can use a lot of help there. The way I see it there are 3 main components to the firmware (and one minor); - Stratum task (connecting over WiFi and getting work over stratum. also sending results) - Miner task (translating the work from stratum, computing midstates and rolling extranonce. Which, BTW Kano had a good post today about; https://bitcointalk.org/index.php?topic=5419549.0) - ASIC task (care and feeding of the BM1397 ASIC chip) - Admin task (setup and config the miner) I've tried to summarize this a bit here; https://github.com/skot/ESP-MinerI don't have BM1397 chip nor a S17 on hand, only a S9k (BM1393 chip) and some defective S9 Hashboard (BM1387), maybe you can do some Logic Analyzer (Saleae Logic 2?) log of the Serial communication from cgminer and even better from a real S17. A good way to log the Serial comm is to use female HE10 connector directly pressed on the flat cable between control board and hash board : https://i.ibb.co/yyTyRV5/PXL-20221122-173823822-Copie.jpg. I am starting a Saleae Logic 2 High Level Analyzer https://support.saleae.com/extensions/high-level-analyzer-extensions based on the BM1385 datasheet, the BM1393 log I have, and cgminer source code for BM1397. Probably the easiest way to get a BM1397 to start playing around with is to get one of the Gekkoscience Compac F. https://bitcoinmerch.com/products/gekkoscience-compac-f-fan-upgrade-combo-up-to-270gh-s The Compac F is super cool, and now it's available again thanks to sidehack's continued efforts. Saleae Logic Analyzers are also amazing. I get a ton of use out of mine. From a data standpoint, the Compac F is a FTDI usbserial chip directly attached to a BM1397. You can connect with a serial terminal and prod registers to your heart's content. I put some of my notes/logs with the BM1397 here: https://github.com/skot/ESP-Miner/blob/master/bm1397_protocol.mdAnother great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk...
oooo that would be amazing to see. Also, about the I2C temperature sensor NCT218, do you think we will keep this ref, and I can start working on a driver, or will you change the source ?
the NCT218 went out of stock. I just switched to the EMC2101. It does fan control too! Hooray integrated products from the PC motherboard world. Adafruit has some driver examples to work from; https://learn.adafruit.com/emc2101-fan-controller-and-temperature-sensorAbout the Firmware source, I am working in Rust because : - the embedded abstraction is very well supported for ESP32-C3, and in the future, we can change the MCU easily - stratum v1 and v2 are already coded in Rust by Braiins https://github.com/braiins/braiins-open/tree/master/protocols/stratum and because v2 use Noise Protocol, it is better to not have to code it ourself - the cgminer source code is not very clean (many type mixing) and not very adapted to embedded system - will be booting/running very fast and very reliable From what I hear, embedded Rust is the new hotness. Are you pretty good at it? I'd love to learn. It seems like the ESP32-C3 modules are all lacking in RAM. We're going to need a lot to deal with the big stratum ASCII JSON messages. I was thinking about switching to the ESP32-S3 for the time being. I assume that's still decently supported in Rust? I hear you on the cgminer source. I feel like I'm going cross-eyed. In their defense, I think it's had a ton of authors over the years. stoked to have you on board!
|
|
|
|
|