Skip to content

Commit

Permalink
Default Heltec T114 to Fixed Pin
Browse files Browse the repository at this point in the history
Heltec T114 has a no-screen option available for purchase. At
present the Bluetooth PIN on such a device is set to random, which
makes it challenging for users to connect.

We currently don't have code to detect (lack of) a SPI-based screen.
For now, set T114 to use a fixed pin, which users can later change.

Fixes meshtastic#4565
  • Loading branch information
fifieldt committed Sep 17, 2024
1 parent 1e665d5 commit a3bc2f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nimble/NimbleBluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
LOG_INFO("*** Enter passkey %d on the peer side ***\n", passkey);

powerFSM.trigger(EVENT_BLUETOOTH_PAIR);
#if HAS_SCREEN
// FIXME: T114 has a no-screen option and we have no logic for detecting (lack of) presence of SPI based screens #4565
#if HAS_SCREEN && !defined(HELTEC_MESH_NODE_T114)
screen->startAlert([passkey](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void {
char btPIN[16] = "888888";
snprintf(btPIN, sizeof(btPIN), "%06u", passkey);
Expand Down Expand Up @@ -282,4 +283,4 @@ void clearNVS()
ESP.restart();
#endif
}
#endif
#endif

0 comments on commit a3bc2f1

Please sign in to comment.