Repository navigation
Open
Description
I am running Windows 11 25H2. I am using the latest stable Chrome and also the OS's inbuilt Bluetooth functionality to test connecting to my ESP32 BLE server. My code:
#include <Arduino.h>
#include <FastLED.h>
#include <NimBLEDevice.h>
#define LED_COUNT 1
#define LED_PIN 48
#define IP_ADDR_SERVICE_UUID "0c3df205-d093-46ab-b360-74e67fee325f"
#define WIFI_SETUP_SERVICE_UUID "cab5bfc5-18a5-4924-bcf8-02269e00301c"
#define IP_ADDR_CHARACTERISTIC_UUID "5181caeb-8309-48e5-942f-5e678fccf4db"
#define SSID_CHARACTERISTIC_UUID "88f26ae8-04f1-49ab-9341-1208f7b0fff8"
#define PSK_CHARACTERISTIC_UUID "ad42f5f5-6560-4773-9604-925d0727c671"
NimBLEServer* bleServer;
CRGB leds[LED_COUNT];
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, LED_COUNT);
FastLED.setBrightness(100);
leds[0] = CRGB::Yellow;
FastLED.show();
NimBLEDevice::init("CT Tester");
bleServer = NimBLEDevice::createServer();
auto ipAddressService = bleServer->createService(IP_ADDR_SERVICE_UUID);
auto wifiSetupService = bleServer->createService(WIFI_SETUP_SERVICE_UUID);
auto ipCharacteristic = ipAddressService->createCharacteristic(
IP_ADDR_CHARACTERISTIC_UUID,
NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::NOTIFY);
auto ssidCharacteristic =
wifiSetupService->createCharacteristic(SSID_CHARACTERISTIC_UUID);
auto pskCharacteristic =
wifiSetupService->createCharacteristic(PSK_CHARACTERISTIC_UUID);
ipAddressService->start();
wifiSetupService->start();
ipCharacteristic->setValue("1.2.3.4");
auto advertising = NimBLEDevice::getAdvertising();
advertising->addServiceUUID(IP_ADDR_SERVICE_UUID);
advertising->addServiceUUID(WIFI_SETUP_SERVICE_UUID);
advertising->enableScanResponse(true);
advertising->setConnectableMode(BLE_GAP_CONN_MODE_UND);
advertising->setName("CT Tester");
advertising->start();
bleServer->start();
leds[0] = CRGB::Green;
FastLED.show();
}
void loop() {}The LED goes green on startup, and the device is adveritising. However, any connection attempt times out with a failure (error code 0 in Chrome). I have tried with and without the setConnectableMode call.
Metadata
Metadata
Assignees
Labels
No labels
Activity
h2zero commentedon Feb 16, 2026
If im not mistaken I don't think windows will connect to a device that doesn't have bonding enabled.
axa88 commentedon Feb 17, 2026
I'm absolutely sure a BLE client using the windows SDK can allow a connection without having a bond.
Im unsure how "Chrome" in this case, affects the use of the underlying windows sdk but, targeting:
<TargetFramework>net10.0-windows10.0.26100.0</TargetFramework>and most likely earlier versions, will allow it as per spec, fwiw I do it all the time.
Probably already done it, but i'd advise trying with another client like nRF Connect, and confirm your peripheral is working as expected.
afpineda commentedon Feb 25, 2026
This seems to be an specific issue with Windows 11 2025H2 (not other versions).
This is how I fixed it:
Go to Settings > System > Recovery > Fix problems using Windows Update > Reinstall now.
afpineda commentedon Feb 25, 2026
Not exactly and not only Windows.
Just HID devices.
You can connect HID devices without pairing, but bonding is required for the operating system to reroute HID reports to all applications.
ayan4m1 commentedon Feb 26, 2026
Sorry, I'm not reinstalling my entire copy of Windows to fix this. That's very disappointing. Thanks.
afpineda commentedon Feb 26, 2026
That's not a reinstall, but another patch. It takes less than an hour and is not destructive.
axa88 commentedon Feb 28, 2026
I should clarify. while I'm confident connection is possible without bonding, this is of course only relevant if both devices agree to not to ask/require a bond upon connection or data exchange. Confirm your client doesn't attempt to pair and hang as you're not handling the request.
To do this , you could simply set with a
NimBLEServerCallbacksand verify the device isn't requesting authenticated pair and you're not handling it.Edit: just ran some test with this library, indeed a bond is not needed to connect.
h2zero commentedon Mar 18, 2026
@ayan4m1 I tested your code and was able to connect to a windows 11 desktop, is this still an issue?
ayan4m1 commentedon Mar 18, 2026
It is still not working for me, but I've given up on doing this in Arduino and moved to ESP-IDF.
h2zero commentedon Mar 18, 2026
Fair enough are you using https://github.com/h2zero/esp-nimble-cpp in IDF?