NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

2.3.4 isn't working with my older bluetooth devices

Open societyofrobots opened this issue 4 months ago • 1 comments

1.4.3 works on my ~5 year old Fire OS 5.7 tablet, but didn't on my Samsung Galaxy phone.

So upgraded to 2.3.4, and it now works on my Samsung Galaxy, but not my Fire tablet.

nRF Connect crashes during load on my Fire tablet, so using Bluetooth Serial Terminal Android app to scan.

From my Samsung via nRF Connect, my ESP32 says "Advertising type: Legacy", so I assume it's a not legacy related issue. I was mimicking a HID device when using 1.4.3. Maybe related?

Any ideas?

ESP32, core 2.0.17, Arduino-NimBLE 2.3.4.

NimBLEDevice::init("ESP32_UART_BLE");
NimBLEDevice::setSecurityAuth(false, false, false);

pServer = NimBLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());

NimBLEService* pService = pServer->createService(SERVICE_UUID);

NimBLECharacteristic* pRxCharacteristic = pService->createCharacteristic(
    CHARACTERISTIC_UUID_RX,
    NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR
);
pRxCharacteristic->setCallbacks(new RxCallbacks());

pTxCharacteristic = pService->createCharacteristic(
    CHARACTERISTIC_UUID_TX,
    NIMBLE_PROPERTY::NOTIFY
);

pService->start();

NimBLEAdvertising* pAdvertising = NimBLEDevice::getAdvertising();
pAdvertising->setName("ESP32_UART_BLE");

pAdvertising->addServiceUUID(SERVICE_UUID);

pAdvertising->start();

societyofrobots avatar Aug 12 '25 19:08 societyofrobots

Sorry I didn't get to this sooner, your device name is too long if the service UUID is 128bit. The max name length that can fit in the advertisement is 8 characters in this setup.

h2zero avatar Sep 02 '25 15:09 h2zero