103 Commits

Author SHA1 Message Date
Skot Croshere
ec9d84e90e set default max_retries to 420 2023-07-01 14:24:02 -04:00
Skot Croshere
ff403395ee wifi connection retry displays on OLED 2023-07-01 14:24:00 -04:00
Skot Croshere
260ba51edb added some basic wifi connection retrys and debugging 2023-07-01 14:23:35 -04:00
Ben
4899ffcbaa still need to set default baud 2023-07-01 14:23:35 -04:00
Ben
700db06f5a even softer start & smarter low voltage recovery 2023-07-01 14:23:35 -04:00
Ben
914b926758 power soft start 2023-07-01 14:23:35 -04:00
Ben
e8f36e89fa frequency throttling during voltage drops 2023-07-01 14:23:35 -04:00
johnny9
6949b73bb9 nvs_config: introduce configuration through NVS
Stratum and Wifi configuration can now be read from NVS on the
flash. An example config.cvs file is included and can be used
to generate the partition and then be flashed to the esp32 using
the esp-idf parttool.py.
2023-07-01 14:23:35 -04:00
Ben
55b9960da7 temperature protection init 2023-07-01 14:23:35 -04:00
Skot Croshere
4896d1255b typo 2023-07-01 14:23:35 -04:00
Skot Croshere
486f35694e switched to the recommended wifi station example 2023-07-01 14:23:35 -04:00
Skot Croshere
51b3d344ed cleanup connect Kconfig 2023-07-01 14:23:35 -04:00
Skot Croshere
7226f569eb cleanup connect defines 2023-07-01 14:23:35 -04:00
Skot Croshere
a3b798de7a switch to separate connect component 2023-07-01 14:23:35 -04:00
Ben
af22994402 Move the asic response handling into its own task 2023-07-01 14:23:35 -04:00
johnny9
bc326499ea stratum: parse version-rolling config result 2023-07-01 14:23:35 -04:00
johnny9
c7de2c0795 bm1397: add multiple midstates using version mask
Job packets can have more that 1 midstate. If the stratum supports
version-rolling, calculate additional midstates by incrementing
the version with the version_mask provided by the stratum server.
Currently does 4 midstates for each extranonce2.
2023-07-01 14:23:35 -04:00
Ben
1b75644b67 added back stratum unit tests 2023-07-01 14:23:35 -04:00
Ben
2171e55e14 reorder STRATUM_V1_submit_share params to fit api 2023-07-01 14:23:35 -04:00
Ben
ba384294b5 comments 2023-07-01 14:23:35 -04:00
Ben
8755a8fcbc rervet changes - stratum messages must have unique id 2023-07-01 14:23:35 -04:00
Ben
12770f3393 fix jobid for ckpool 2023-07-01 14:23:35 -04:00
Skot Croshere
63bc2e6326 fix typo in mining.set_difficulty 2023-07-01 14:23:35 -04:00
Ben
6065ef05a3 Fixed issues with ckpool job id, parameter length, asic init 2023-07-01 14:23:35 -04:00
Ben
35358e0e44 cleaning and optimizing stratum_task/stratum_api 2023-07-01 14:23:35 -04:00
Ben
c3301aab30 move queue 2023-07-01 14:23:35 -04:00
Skot Croshere
65f906eb3d change stratum_api TAG to match filename 2023-07-01 14:23:35 -04:00
Ben
a7bae3ce71 Modularized 3 tasks, created global state struct 2023-07-01 14:23:33 -04:00
Ben
b604e0ccc6 cleaning up serial.c 2023-07-01 14:22:35 -04:00
Ben
3d9d1692f2 more cleanup of mb1397 and system 2023-07-01 14:22:10 -04:00
Ben
c148aec820 modulize system, bm1397, cleanup 2023-07-01 14:22:10 -04:00
Ben
ef3adab700 typo 2023-07-01 14:22:10 -04:00
Ben
b1651ed97c init difficulty_mask 2023-07-01 14:21:40 -04:00
Skot Croshere
0810936b3f free strings first when clearing the ASIC_jobs queue 2023-07-01 14:21:40 -04:00
Skot Croshere
b14f21c697 added the beginning of stratum result parsing. 2023-07-01 14:21:40 -04:00
Ben
beed8fad11 revert uart driver changes 2023-07-01 14:21:40 -04:00
Ben
aa9e278f18 increase baud to 3.1Mbps 2023-07-01 14:21:39 -04:00
Ben
18d0f651e8 hashrate calc, WIP 2023-07-01 14:20:48 -04:00
Ben
dfcd831bdf comment out baud stuff for now 2023-07-01 14:20:48 -04:00
Ben
02e4b0d76d ticket_mask 2023-07-01 14:20:48 -04:00
Ben
676f6d0602 Computing job wait time 2023-07-01 14:20:48 -04:00
johnny9
13b60f5e52 bm1397: update test with changes to serial_rx api 2023-07-01 14:20:48 -04:00
johnny9
c1f586c77a stratum: remove unused function 2023-07-01 14:20:48 -04:00
johnny9
471c53c817 stratum: configure version-rolling and parse version mask 2023-07-01 14:20:48 -04:00
Skot Croshere
552795d61e tighten up the serial_rx loop for collecting nonces. tried to fix the ckpool diff issue -- still broken 2023-07-01 14:20:48 -04:00
Skot Croshere
8c2079b8db cleanup send_hash_frequency() 2023-07-01 14:20:48 -04:00
Skot Croshere
9e3f615004 ported the hash frequency algorithm from cgminer. seems to work?? 2023-07-01 14:20:48 -04:00
Skot Croshere
6560ea3a06 get rid of some old serial parsing functions 2023-07-01 14:20:48 -04:00
johnny9
4764b368d1 bm1397: remove unused variable 2023-07-01 14:20:48 -04:00
johnny9
5a94acff09 stratum: don't attempt to recv authorize result
Previous implementation would miss the first mining.set_difficulty
message. We need to find a better way to manage result messages.
2023-07-01 14:20:48 -04:00