Skip to content

feat(ble): expose descriptor operations (discoverDescriptors + writeDescriptor)#26

Open
Zcating wants to merge 1 commit into
zykeco:mainfrom
Zcating:feat/descriptor-operations
Open

feat(ble): expose descriptor operations (discoverDescriptors + writeDescriptor)#26
Zcating wants to merge 1 commit into
zykeco:mainfrom
Zcating:feat/descriptor-operations

Conversation

@Zcating

@Zcating Zcating commented Jul 1, 2026

Copy link
Copy Markdown

iOS Core Bluetooth requires explicit discoverDescriptors before setNotifyValue can find the CCCD (0x2902) descriptor handle. Without these primitives exposed, callers cannot enable BLE notifications on iOS — the subscription is a silent no-op.

Changes:

  • specs/NativeBleNitro.nitro.ts: add 2 new spec methods
  • manager.ts: add Promise-returning wrappers that normalize UUIDs
  • ios/BleNitroBleManager.swift: implement discoverDescriptors/writeDescriptor using CBPeripheral.discoverDescriptors + writeValue(for: descriptor)
  • ios/BlePeripheralDelegate.swift: store per-descriptor callbacks, fire them from didDiscoverDescriptorsFor and didWriteValueFor(error:)
  • android/BleNitroBleManager.kt: implement both methods (Android discovers descriptors as part of characteristic discovery, so discoverDescriptors is a fast no-op resolving once cached descriptors are available; writeDescriptor reuses the existing GattOperation.WriteDescriptor queue)

@Zcating Zcating force-pushed the feat/descriptor-operations branch from 88936bd to f098a68 Compare July 1, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant