summaryrefslogtreecommitdiff
path: root/src/drivers/bluetooth.cpp
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-04-02 11:13:50 +1100
committerailurux <ailuruxx@gmail.com>2024-04-02 11:13:50 +1100
commite20ebe7574db5aedc73f07b7bb3a0a01eae93c84 (patch)
tree34c93ec8a80e282f3ce3e47dd60c41e46de0f8b3 /src/drivers/bluetooth.cpp
parenta750af35aa6afda40aadca8f7cf8db75f41a43b2 (diff)
parent0d0c4b2307cac8436fea7276956f293262b265ed (diff)
downloadtangara-fw-e20ebe7574db5aedc73f07b7bb3a0a01eae93c84.tar.gz
Merge branch 'main' into lua-volume
Diffstat (limited to 'src/drivers/bluetooth.cpp')
-rw-r--r--src/drivers/bluetooth.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/bluetooth.cpp b/src/drivers/bluetooth.cpp
index 84c81de0..d15ffd7f 100644
--- a/src/drivers/bluetooth.cpp
+++ b/src/drivers/bluetooth.cpp
@@ -515,7 +515,7 @@ static void timeoutCallback(TimerHandle_t) {
}
void Connecting::entry() {
- sTimeoutTimer = xTimerCreate("bt_timeout", pdMS_TO_TICKS(5000), false, NULL,
+ sTimeoutTimer = xTimerCreate("bt_timeout", pdMS_TO_TICKS(15000), false, NULL,
timeoutCallback);
xTimerStart(sTimeoutTimer, portMAX_DELAY);
@@ -568,8 +568,9 @@ void Connecting::react(const events::internal::Gap& ev) {
transit<Idle>();
break;
case ESP_BT_GAP_CFM_REQ_EVT:
- ESP_LOGW(kTag, "user needs to do cfm. idk man.");
- transit<Idle>();
+ // FIXME: Expose a UI for this instead of auto-accepting.
+ ESP_LOGW(kTag, "CFM request, PIN is: %lu", ev.param->cfm_req.num_val);
+ esp_bt_gap_ssp_confirm_reply(ev.param->cfm_req.bda, true);
break;
case ESP_BT_GAP_KEY_NOTIF_EVT:
ESP_LOGW(kTag, "the device is telling us a password??");