Commit Graph
54 Commits
Author SHA1 Message Date
Guogang Li 0c0a59d8a1 Add API to retrieve BLE peripheral ID from native BLE ID
PiperOrigin-RevId: 773373972
2025-06-19 09:54:00 -07:00
Francis Tsui b48b943275 Remove reference to BlePeripheral.
PiperOrigin-RevId: 757830081
2025-05-12 10:55:38 -07:00
Francis Tsui acc5f1b0d8 Remove BlePeripheral reference from BleSocket.
PiperOrigin-RevId: 757797557
2025-05-12 09:38:22 -07:00
Francis Tsui 16839afa18 Switch Connect() to use BlePeripheral::UniqueId.
PiperOrigin-RevId: 756821680
2025-05-09 10:36:24 -07:00
Francis Tsui 99458be820 Change ConnectToGattServer to take BlePeripheral::UniqueId.
PiperOrigin-RevId: 756498100
2025-05-08 16:10:04 -07:00
Francis Tsui e1c072e797 Switch ConnectOverL2cap methods to use BlePeripheral::UniqueId instead of BlePeripheral object.
PiperOrigin-RevId: 756491579
2025-05-08 15:52:01 -07:00
Francis Tsui 59e527dbe3 Remove unused methods.
PiperOrigin-RevId: 756053350
2025-05-07 16:36:04 -07:00
Francis Tsui 4beed5b72a Remove unused method.
PiperOrigin-RevId: 756045245
2025-05-07 16:11:41 -07:00
Crisrael Lucero 067450c9ef Remove extra semi-colon to pass -Wextra-semi option in Chromium builds
PiperOrigin-RevId: 755455902
2025-05-06 11:42:17 -07:00
Francis Tsui bda5444fcd Remove g3 BlePeripheral subclass.
PiperOrigin-RevId: 754087426
2025-05-02 12:06:07 -07:00
Francis Tsui 866b3fa9e1 Make api::ble_v2::BlePeripheral into a concrete class.
PiperOrigin-RevId: 753745108
2025-05-01 15:11:08 -07:00
Edwin Wu 4911d49f82 Implementation of BLE L2CAP connecting flow.
PiperOrigin-RevId: 749092197
2025-04-18 11:26:54 -07:00
hai007 3c77c0dfa0 Stop BLE_V2 scan before upgrading to Wifi HotSpot to avoid interference
PiperOrigin-RevId: 746541587
2025-04-11 11:59:18 -07:00
Edwin Wu b10957d712 Add OpenL2capServerSocket and skeleton BleL2capServerSocket/BleL2capSocket
PiperOrigin-RevId: 746334743
2025-04-11 00:01:50 -07:00
Crisrael Lucero 62f9891e45 Remove extra semi-colons to pass -Wextra-semi option in Chromium builds
PiperOrigin-RevId: 741283141
2025-03-27 14:32:12 -07:00
Mingshiou Wu aefcc4a8b2 Add client-side connection APIs for ble l2cap
PiperOrigin-RevId: 741061740
2025-03-27 01:38:10 -07:00
Mingshiou Wu 04b2f9cfc6 Interface definition for Ble L2CAP Medium in Nearby Connections layer
PiperOrigin-RevId: 741054574
2025-03-27 01:04:16 -07:00
Crisrael Lucero c619a2b921 Remove extra semi-colon to pass -Wextra-semi option in Chromium builds
PiperOrigin-RevId: 734203138
2025-03-06 10:43:46 -08:00
Francis Tsui 7e758061ac Allow setting of alternate service UUID on StartDiscovery.
PiperOrigin-RevId: 733850300
2025-03-05 13:34:29 -08:00
Guogang Li b6dc3348a4 remove callback for multiple services scan
PiperOrigin-RevId: 733518623
2025-03-04 17:12:25 -08:00
Guogang Li dec2ff910a Multiple Service scanning implementation for G3.
PiperOrigin-RevId: 733458126
2025-03-04 14:05:10 -08:00
Guogang Li b814358f89 Add to allow scan multiple BLE services
PiperOrigin-RevId: 733445592
2025-03-04 13:32:37 -08:00
Crisrael Lucero acc38a809b [Nearby Presence] Update ScanManager to trigger changed and lost events
PiperOrigin-RevId: 644072733
2024-06-17 11:17:00 -07:00
Daniel Classon f09368247b [Nearby Connections] Use async StartScanning when flag enabled
Creates the feature flag `enable_ble_v2_async_scanning_advertising` which
enables/disables the use of the async StartScanning, StopScanning,
StartAdvertising, StopAdvertising, etc methods over the soon-to-be deprecated
synchronous versions of those methods. Opted for feature flag over NearbyFlag,
as ChromeOS is the only current consumer and doesn't use Mendel.

Also sets the feature flag to enabled in the ServiceControllerRouter, which
is where ChromeOS sets NC feature flags at startup.

This CL also fully links up the asynchronous Scanning methods. Advertising
will be addressed in a follow up CL.

PiperOrigin-RevId: 608158273
2024-02-18 12:59:02 -08:00
Nick Bourdakos 9998093366 Add Objective-C++ BLE Medium wrapper
PiperOrigin-RevId: 558278732
2023-08-18 16:37:09 -07:00
Crisrael Lucero 01c8e1ed05 Convert absl::string_view to const std::string&
PiperOrigin-RevId: 531634295
2023-05-12 16:40:50 -07:00
Janusz Sobczak b5938c0d17 Add G3 gatt server
PiperOrigin-RevId: 531287485
2023-05-11 13:15:40 -07:00
Janusz Sobczak 0901aec6e2 Add BleMedium::GetRemotePeripheral
Added:
nearby::api::ble_v2::BlePeripheral::GetUniqueId()
nearby::api::ble_v2::BleMedium::GetRemotePeripheral(...)

Moved BlePeripheral implementation from bluetooth_adapter_* to ble_v2.*
Added G3 (test) implementation for the new methods.

PiperOrigin-RevId: 531023568
2023-05-10 15:40:38 -07:00
Janusz Sobczak 05cd950539 Add read,write callbacks to characteristics
During Fast pair handshake, the seeker writes to GATT characteristics, the
provider reads the value and sends the response.
We need callbacks for reading and writing GATT characteristics to test the
handshake. Static GATT DB entries are not sufficient.

PiperOrigin-RevId: 527958868
2023-04-28 12:38:41 -07:00
Qin Wang 1e4497d59c Add Write Type enum to specify what type of GATT write should be performed
PiperOrigin-RevId: 515487102
2023-03-09 17:28:09 -08:00
Qin Wang 53d4f55e70 Immediate convert ByteArray to string to avoid using ByteArray in Fast Pair internal code
PiperOrigin-RevId: 514833850
2023-03-07 14:06:33 -08:00
Qin Wang 0c078b3528 Convet ByteArray to std::string in ble_gatt_client
PiperOrigin-RevId: 514786088
2023-03-07 11:10:34 -08:00
Qin Wang ba8d60b8a9 Implement subscription for a GATT characteristic value changed
PiperOrigin-RevId: 513960871
2023-03-06 07:08:08 -08:00
Qin Wang 4727861f5d Refactor GattCharactristic to support bitwise combination of Permission and Property
PiperOrigin-RevId: 513339751
2023-03-01 14:21:04 -08:00
Anay Wadhera abe68db97d Add GattServer#NotifyCharacteristicChanged to ble_v2
PiperOrigin-RevId: 512124578
2023-02-24 11:46:33 -08:00
Anay Wadhera f3ebf77ed2 Add GattClient#SetCharacteristicNotification for subscribing to a GATT characteristic
PiperOrigin-RevId: 511862183
2023-02-23 12:54:41 -08:00
Guogang Li d260feced5 Added BLE V2 GATT client implementation for Windows
PiperOrigin-RevId: 511635693
2023-02-22 17:05:31 -08:00
Janusz Sobczak f4d85f9b90 Migrate to AnyInvocable in platform code
PiperOrigin-RevId: 504104740
2023-01-23 16:04:21 -08:00
Janusz Sobczak a29be214a3 Migrate to absl::AnyInvocable in NP.
Replaces a bunch of std::function uses with absl::AnyInvocable.

PiperOrigin-RevId: 502960326
2023-01-18 13:16:29 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
Janusz Sobczak e64f9859e1 Replace BleOperationStatus with absl::Status
PiperOrigin-RevId: 497191477
2022-12-22 10:20:15 -08:00
Hai Shang da54ba3422 Add async operations to ble_v2
PiperOrigin-RevId: 472611661
2022-09-06 19:08:22 -07:00
edwinwu 160a224510 [BLE Refactor] Implement iOS Advertising modules.
PiperOrigin-RevId: 455005322
2022-06-14 18:34:01 -07:00
edwinwu 67b318fa6f [BLE Refactor] Refactor GATTClient implementation.
PiperOrigin-RevId: 454290863
2022-06-10 20:20:40 -07:00
edwinwu 8e048f7be0 [BLE Refactor] Uses Uuid class for those used in Uuid string-form in /medium layer.
PiperOrigin-RevId: 450910238
2022-05-25 06:36:55 -07:00
edwinwu a1e84f0597 [BLE Refactor] Implements BleV2Socket and BleV2ServerSocket.
PiperOrigin-RevId: 450586535
2022-05-23 20:22:10 -07:00
edwinwu 01f439b9ad [BLE Refactor] Add Extended advertisement support.
PiperOrigin-RevId: 449619994
2022-05-18 17:45:04 -07:00
edwinwu eddf53ec29 [BLE Refactor] Removes fast advertisement uuid in StartAdvertising and StartScanning.
PiperOrigin-RevId: 448426759
2022-05-13 00:19:16 -07:00
edwinwu 080e964a4c [BLE Refactor] Implements GattClient for sender's device to fetch Gatt advertisement.
PiperOrigin-RevId: 448400837
2022-05-12 20:29:30 -07:00
edwinwu 12cef58420 [BLE Refactor] Refactor BlePeripheral class.
PiperOrigin-RevId: 447638179
2022-05-09 21:27:58 -07:00