upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-19 02:01:58 +0530
committerYour Name <you@example.com>2026-05-19 02:01:58 +0530
commit49f3b4aebff089991a04da370b8e343f8bcfe7ca (patch)
tree085508e8f04f516204bace19fd1736d0e6adda82 /main/config.c
parent56f30ca866613c94e6a83bc1c21bee0eb38c5b39 (diff)
fix: start services without upstream WiFi + channel 10 + disconnect reason
- Start services after 30s timeout if STA never connects (reason=211) - Set AP channel to 10 for APSTA overlap with upstream router - Add upstream WiFi credentials in default config - Log WiFi disconnect reason code for debugging - Previously: remove stop_services() on STA disconnect
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/config.c b/main/config.c
index e810ede..3a42293 100644
--- a/main/config.c
+++ b/main/config.c
@@ -16,7 +16,7 @@ esp_err_t tollgate_config_init(void)
16{ 16{
17 memset(&g_config, 0, sizeof(g_config)); 17 memset(&g_config, 0, sizeof(g_config));
18 g_config.max_retry = 5; 18 g_config.max_retry = 5;
19 g_config.ap_channel = 1; 19 g_config.ap_channel = 10;
20 g_config.ap_max_conn = 4; 20 g_config.ap_max_conn = 4;
21 g_config.price_per_step = 21; 21 g_config.price_per_step = 21;
22 g_config.step_size_ms = 60000; 22 g_config.step_size_ms = 60000;
@@ -53,7 +53,7 @@ esp_err_t tollgate_config_init(void)
53 ESP_LOGW(TAG, "No config.json found, generating default"); 53 ESP_LOGW(TAG, "No config.json found, generating default");
54 const char *default_json = "{" 54 const char *default_json = "{"
55 "\"nsec\":\"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\"," 55 "\"nsec\":\"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\","
56 "\"wifi_networks\":[]," 56 "\"wifi_networks\":[{\"ssid\":\"EnterSSID-2.4GHz\",\"password\":\"c03rad0r123!\"}],"
57 "\"ap_password\":\"\"," 57 "\"ap_password\":\"\","
58 "\"mint_url\":\"https://testnut.cashu.space\"," 58 "\"mint_url\":\"https://testnut.cashu.space\","
59 "\"price_per_step\":21," 59 "\"price_per_step\":21,"