207 Commits

Author SHA1 Message Date
WantClue
d032f2da4a
feat: frequency transition (#747)
* feat: frequency transition

* remove floats that are unnecessary

* fix: callback of set_freq function

* refactor asic model code to asic.c

* fix: change namining scheme
2025-03-09 13:58:13 +01:00
Erik Olof Gunnar Andersson
1eeb303672
Refactor Stratum code for Seamless Failover (#717)
* Refactor stratum code

* No need to abandon work when switching connection

* Bump primary task priority slightly

* Reduce watchdog stack size

* Revert debug changes

* Removed unused code

* Removed unused unit test code

* Handle jobs more aggressively

* Fix merge conflict
2025-03-09 13:55:58 +01:00
Erik Olof Gunnar Andersson
6e1205f30a
Remove unit test workaround for qemu (#743) 2025-03-08 23:15:59 +01:00
mutatrum
a0c9710a90
Show share reject reasons (#746)
* Show share reject reasons

Fixes #264

* Fix string assignment
2025-03-08 13:07:16 +01:00
mutatrum
ad5d1291b9
Remove undefined method headers (#704) 2025-02-15 19:40:09 +01:00
Erik Olof Gunnar Andersson
b8c748be69
Restore Max support (#705) 2025-02-15 12:14:27 +01:00
Skot
7dcb69ebdc
GammaTurbo support and HW abstraction (#698)
* initial changes for the gammaturbo bringup
* added preliminary TPS546 changes
* added preliminary EMC2103 support
* ASIC temp seems to be maybe working.
* magically now fan seems to have the right polarity
* added in ideality and beta constants (currently unused). Fixed EMC2103_get_fan_speed()
* abstract fan and ASIC temp into thermal functions
* abstracted voltage regulator specifics out of tasks and into power.c and vcore.c functions
* add TPS546 support for multiple models
* move TPS40305/DS4432U vout setter to DS4432U.c
* move all ASIC specific functions to asic.c
* bad device_model nvs handling
* remove old code
* add workaround for TPS546 VIN_UV_WARN_LIMIT silicon bug.
2025-02-11 22:46:56 -05:00
Erik Olof Gunnar Andersson
678809a5f8
Improved pool fallback code (#693)
* Disconnect if no data received in more than 10 minutes

* Minor socket fix

* Removed unused code and minor nit fix
2025-02-06 18:48:04 +01:00
WantClue
cbb02389ba
Wifi scan fix (#690)
* feature: wifi reconnect disable wifi connect

* fix: scanning flag to prevent reconnect attempts

* fix: add external bool, define globally

* fix: wifi scan on missing ssid

* fix: remove unused connected flag
2025-02-04 03:40:06 +01:00
WantClue
980d213445
SSID WiFi lookup (#679)
* init

* fix: filter out poor networks
2025-02-01 18:19:30 +01:00
Brett Rowan
c98ac818c9
Grandma knows what Wifi means! (#623)
* Grandma knows what Wifi means!

Use Wifi instead of SSID on screen, and add short `(join for setup)` message instead of `Configuration SSID`.
This should be easier to understand, but does add 2 characters, which will fill the screen completely.

* Change NVS configs to init wifi with empty strings, and check for empty string when initializing wifi

* Change `WiFi` to `Wi-Fi` in `connect.c`

* Change what information shows on screen during inital setup and on wifi error

* fix: remove camelCase

remove Bitaxe camel case

---------

Co-authored-by: Upstream Data <brett@upstreamdata.ca>
Co-authored-by: WantClue <86001033+WantClue@users.noreply.github.com>
2025-02-01 18:19:06 +01:00
Erik Olof Gunnar Andersson
f40972ced2
Reduce invalid job found log from error to warning (#480)
* Reduce invalid job found from error to info

* Standarized on LOGW for Invalid job
2025-01-27 19:25:02 +01:00
adammwest
e7b037df10
use length rather than static 4 for hex2bin func of extranonce2_generate (#660) 2025-01-27 18:46:58 +01:00
Erik Olof Gunnar Andersson
c8671cf69c
Enable Unit Test CI (#634)
* Enable Unit Test CI

* Remove non-functional entrypoint

* symlink CMakeLists.txt
2025-01-27 18:25:38 +01:00
mutatrum
244dacc26a
Tine header define cleanup (#535) 2025-01-16 22:21:59 +01:00
tdb3
b5d1e366c6
test: fix stratum alternative error test (#608)
The test now checks for the expected id and reject-reason

Co-authored-by: WantClue <86001033+WantClue@users.noreply.github.com>
2025-01-08 11:47:22 +01:00
tdb3
3bf8997a72
test: add boundary check for implicit response method (#548)
Test the boundary of STRATUM_RESULT and STRATUM_RESULT_SETUP more completely
2025-01-04 23:57:27 +01:00
tdb3
5e56bcdccc
test: fix failing unit test for large stratum id (#546)
PR #243 changes the type of id to int64_t,
allowing for ids exceeding a 16-bit integer.
Adjusts an associated unit test to ensure that
16-bit rollover wouldn't occur.
2025-01-04 23:57:05 +01:00
mutatrum
61042d93ae
Configure GPIO in Kconfig (#566)
* Put all GPIO defines in gpio_bitaxe.h

* Whitespace

* Use Kconfig.projbuild

* Missing Kconfig
2025-01-04 01:53:56 +01:00
Erik Olof Gunnar Andersson
695d84ac2a
Tune HTTP and System Stability (#571) 2024-12-11 23:23:07 +01:00
mutatrum
848c7807ec
LVGL All The Things! (#539) 2024-12-11 23:03:58 +01:00
mutatrum
6283480fa1
Parse stratum api reject reason (#472)
* Parse stratum api reject reason

* Remove superfluous nullcheck
2024-12-09 16:35:13 +01:00
WantClue
b03045d37d
Update bm1366.h
disable debugging
2024-11-30 18:59:33 +01:00
Skot
e05839b007
Fix hashing on BM1366 (#532)
* remove erroneous ASIC baudrate change

* add calculated frequency ramp up function. uncomment set_max_baudrate
2024-11-30 10:02:29 -05:00
Skot
22cb8bf4e2
Make selftest failing non-fatal (#524)
* switched selftest fail to be non fatal

* switched to BOOT longpress to reboot after selftest

* lots and lots of error handling cleanup. <slippery slope>

* move around the DS4432U_Init() function call
2024-11-30 10:02:09 -05:00
tdb3
e39b6db368
fix: correct json_rpc_buffer initialization order (#473)
Performs memset after checking if the malloc was successful.
Safer, avoids segfault on (unlikely) unsuccessful malloc,
and allows the error printing to occur.
2024-11-27 20:12:27 -05:00
mutatrum
e2041ab78b
Set proper size in hex2bin call (#471)
Fixes #302
2024-11-27 20:09:37 -05:00
mutatrum
48711ef0a7
Fix stratum message order (#498) 2024-11-21 11:45:08 -05:00
Erik Olof Gunnar Andersson
b9126910d6
Make sure we are done writing before setting a new baudrate (#503) 2024-11-20 18:54:10 -05:00
Benjamin Wilson
488473e10e
temp sensor fixes (#484)
* temp sensor fixes

* fix emc2101 external temp sign reading

* reset self test file

* Make the emc2101 changes specific to BM1370

---------

Co-authored-by: Benjamin Wilson <admin@opensourceminer.com>
2024-11-16 20:09:32 -05:00
Erik Olof Gunnar Andersson
8ca3a766f0 Do nothing when roaming 2024-11-09 19:38:07 +01:00
mutatrum
b5e7ae293e
Fix ESP-NOW warning by limiting ap max_connections (#426) 2024-11-03 21:13:35 -05:00
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