175 Commits

Author SHA1 Message Date
adammwest
df0c9ed745
add warnings for consecutive timeout responses (no rx) from the chip (#378)
* add common vars to control rx warning behavoir
* rename vars, reduce rx timout value, add warning when 20s of consecutive rx timeouts occour
* rename device to asic
* better naming of warning condition variable

* move counter variables into the ASIC source files
* move constants to defines and counters to local vars
* fix stray semicolon

Co-authored-by: Skot <skot@bitnet.cx>
2024-10-09 18:59:45 -04:00
Erik Olof Gunnar Andersson
cccae3cabf
Enable WiFi 802.11k 802.11v (#365) 2024-10-09 15:45:25 -04:00
Skot
2c41cc9255
Fix a couple missed issues from the fix_warnings PR (#393)
* move ADC_init() before start_http_server() because the UI reads the ADC
* split SYSTEM_init() into separate functions. cleaned up nvs init.
* fix my dumb INA260_init() memory leak
* SYSTEM_init_peripherals() cleanup
2024-10-09 12:52:55 -04:00
Skot
e1bf30b26e
Fix compiler warnings (#381)
Fix all compiler warnings and migrate off depreciated ADC and I2C libraries.
---------
Co-authored-by: Erik Olof Gunnar Andersson <eandersson@users.noreply.github.com>
2024-10-08 11:27:32 -04:00
Erik Olof Gunnar Andersson
2536347c56 Improve failure handling and add fallback 2024-10-03 17:24:13 +02:00
Erik Olof Gunnar Andersson
549e8272e7
Fix wifi status not updating after disconnected (#321) 2024-09-27 23:49:59 -04:00
adammwest
f130b05511
ASIC version mask now based on pool stratum version mask msg (#349)
* make set version mask a function call

* update name

* update init fuc to support version mask setting

* update parameter spec for bm1397

* parametrize set version rolling and update init func for BM136X +

* add default stratum mask

* update all bmchips with a new set_version_mask ASIC function which can be called in main

* update init func prototype params

* update self test to remove extra vmask call in init

* fix compiler errors

* fix compiler errors in main

* add version_mask_given bool to tell the next job to set a new version mask to the chip when a smg comes in
2024-09-26 11:30:06 -04:00
Skot
8fdbe96b91 print wifi error reason codes. allow connecting to open networks (set empty password) 2024-09-24 19:34:31 -04:00
Benjamin Wilson
7b5e3ef2eb increasing delay to 100ms again 2024-09-22 21:18:58 -04:00
Benjamin Wilson
0b0881d025 decrease ramp up 2024-09-22 21:06:53 -04:00
Benjamin Wilson
a94bf8e95e increase ramp_up delay 2024-09-21 15:12:22 -04:00
Benjamin Wilson
b700c6bbf0
Fix overtemp and self tests for gamma (#343) 2024-09-20 19:30:20 -04:00
Skot
f795fc7df5 move job frequency constants to the respective ASIC include files 2024-09-18 11:03:15 -05:00
WantClue
3ee6ac25bc add frequency rampup bm1368 2024-09-06 09:56:30 +02:00
Skot
9577b1a531 add serial buffer framing fix to bm1397 2024-09-05 19:53:02 -04:00
Skot
706fadfc8c add 1370 support for resyncing the ASIC RX buffer on errors 2024-09-03 14:16:20 -04:00
Skot
29f7e0b1b2 moved send_hash_frequency() and do_frequency_ramp_up() over from esp-miner-multichip 2024-08-29 20:50:16 -04:00
Skot
edd39e0071 add frequency ramp up from S21 Pro 2024-08-17 00:26:44 -04:00
Skot
be1242ec61 added TPS546 static power offset. Increased delay for power_management_task.c to start 2024-08-16 22:32:22 -04:00
Skot
3c27ad599f crap, one more asic_response_buffer size fix 2024-08-15 19:28:13 -04:00
Skot
dd0df1ae31 asic_response_buffer size fix 2024-08-15 19:23:57 -04:00
Skot
4cd7a38b9f rebasing gamma-support on 2.1.10 2024-08-15 18:51:05 -04:00
WantClue
064b89207f fix memset buf 2024-08-13 22:32:11 +02:00
Skot
349b5cbd35 reduce ASIC serial RX buf to 16 bytes (from 1024). make sure to free() after every nvs_config_get_string() 2024-08-09 16:27:29 -04:00
Skot
2e03a8f0e9
clear ASIC RX serial buffer on framing errors (#279)
* added rx serial buffer flush and serial debugging for BM1368

* added serial buffer flush to BM1366 also

* turned off ASIC serial debugging. let's see how this does on free heap
2024-08-09 16:06:12 -04:00
WantClue
6101b3e6c2 change stratum subscribe method to not send extra characters 2024-08-08 08:48:53 +02:00
mutatrum
e3ef2e55bd
Implement client.reconnect and reset stratum uid on reconnect (#253)
* Implement client.reconnect and reset stratum uid on reconnect
2024-07-12 14:11:48 -04:00
Georges Palauqui
2dcff97bea
fix minor bug (log display) 2024-07-10 21:25:31 +02:00
Skot
04c8b80287
WIP: Fix job interval timing (#249)
* add extended nonce debugging

* switch to semaphore for job timing

* clean up nonce debugging. hardcode 1366 job interval to 2s and show when new jobs are sent

* set nonce range to 0x0F0000 set job interval to 20s. better stratum debugging,

* testing out longer intervals on 1368

* looking at exact serial commands sent

* fix log value digit count

* add core from nonce debug

* set BM1366 initial chip difficulty to 32

* add version rolling debug

* improve debug printing again

* fix diff

* fix core_id extraction

* printf fix

* debug cleanup

* setup BM1368 for testing. reg10 to S21 default, job interval @ 0.5s

* set init diff on 1366 and 1368 back to 256

---------

Co-authored-by: Georges Palauqui <g.palauqui@gptechinno.com>
2024-07-07 09:05:31 -04:00
3x3y3z3t
248df91543
Fixed incompatible function signature (#247) 2024-07-02 14:12:03 +02:00
mutatrum
e3edb87b6c Change stratum message_id to 64bit 2024-06-25 15:34:15 +02:00
tommywatson
19aa080202
Left a dangling pointer (#240)
* Clean up and return 0 on recv, let task reconnect

* Set json buffer to null

---------

Co-authored-by: tommy <tommy@tommywatson.com>
Co-authored-by: Skot <skot@bitnet.cx>
2024-06-21 08:26:19 -04:00
tommywatson
34cf8d9483
Clean up and return 0 on recv, let task reconnect (#227)
Co-authored-by: tommy <tommy@tommywatson.com>
2024-06-20 23:49:06 -04:00
yanir99
ff5b60b54e
Update bm1397.c to increase the max frequency to 650Mhz (#209)
* Update bm1397.c to increase the max frequency to 650Mhz

The original version was setting everything above 500Mhz to 500Mhz, the update increases the limit to 650Mhz.
No changes to the web interface - drop-down still shows up to 575Mhz

* Update edit.component.ts to include higher freqeuncy for BM1397

* Updated BM1397 frequencies to above 500Mhz

* Update bm1397.c

* Update bm1397.c

* UN-Update readme.md

* Update bm1397.c

* Update bm1397.c

* Update bm1397.c
2024-06-20 12:21:05 +02:00
Georges
9dc8c8cad3
try to explain nonce space duration from paramters (#228)
* try to explain nonce space duration from paramters

* Fix Nonce Space duration for BM1397 (no version-rolling)

* fixed issue with version mask on 1397. added easy serial debugging on 1397

* cleanup jobID debugs

---------

Co-authored-by: Skot <skot@bitnet.cx>
2024-06-19 15:29:45 +02:00
tommywatson
00a3a0ba3d
Code clean resulting from looking into #218 (#220)
* Code clean resulting from looking into #218

* Fixed asic count

Set canary value for invalid device's asic_count

---------

Co-authored-by: tommy <tommy@tommywatson.com>
2024-06-18 08:18:51 +02:00
Georges
10c331a400
Supra 402 (#221)
* port TCH Supra 402 branch

* refactor TMP1075 (unused?) driver using i2c_master module

* pulled in @Bitmaker-hub stratum_task.c DNS changes from PR #185

* removing serial debug

---------

Co-authored-by: Skot <skot@bitnet.cx>
2024-06-14 16:09:08 -04:00
Georges Palauqui
11107a3d32
fix dependancies 2024-06-11 10:14:30 +02:00
Georges Palauqui
17852f03c5
oups 2024-06-07 21:59:04 +02:00
Georges Palauqui
95a2a8c605
loop over regA8 for all chips 2024-06-07 21:52:12 +02:00
Georges Palauqui
5b38d332ce
distribute chip address to all chip available 2024-06-07 15:24:56 +02:00
wizkid057
62693c12fd
Add software version string to the stratum mining.subscribe (#197)
lgtm
2024-06-04 11:30:38 -04:00
Skot
4bda726f38
update system hashrate on every chip share, not just pool shares. (#196) 2024-06-02 09:06:00 -04:00
Skot
11c1d087a8
Stratum message ordering fix (#192)
* rough strategy for this fix. needs testing
* seems to be working with OCEAN. need to make sure nothing else is broken
* add version mask debug
* removed stratum setup response results from A/R shares tally
2024-05-31 17:43:10 -04:00
Benjamin Wilson
a87f1e974c display AP ssid on connecting screen 2024-05-24 20:00:10 -04:00
pixel::doc
e4fcfdca83
Add more Logging to esp_restart (#179) 2024-05-23 22:55:31 -04:00
MoellerDi
0072a0f5c8
add option to configure hostname (#174) 2024-05-23 22:54:39 -04:00
MoellerDi
1da7132b6a
fix stratum parsing not always counting rejected shares (#163)
* fix stratum parsing not counting rejected messages

* add unit tests
2024-05-23 22:53:05 -04:00
Benjamin Wilson
b53b641c68 Remove wifi max retry, remove max fan speed on reboot 2024-05-23 22:34:11 -04:00
WantClue
3c15a050a3 uint fix 2024-03-22 15:33:37 +01:00