Commit Graph
51 Commits
Author SHA1 Message Date
Francis Tsui 959322177f Remove BlePeripheral usage from framework.
PiperOrigin-RevId: 759337592
2025-05-15 15:59:33 -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 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
Francis Tsui 065a79e9ac Remove unnecessary callback.
PiperOrigin-RevId: 753697677
2025-05-01 13:07:12 -07:00
Edwin Wu e71de0e0c3 Fixes the peripheral null issue as a L2CAP server.
PiperOrigin-RevId: 750094718
2025-04-22 01:36:54 -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
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 b814358f89 Add to allow scan multiple BLE services
PiperOrigin-RevId: 733445592
2025-03-04 13:32:37 -08:00
hai007 9cd75f8e27 [NearbyConnections] Update ios BLE discovery related logs
PiperOrigin-RevId: 730693835
2025-02-24 19:54:06 -08:00
Hai Shang 17a71c8b7e Internal cleanup
PiperOrigin-RevId: 604442644
2024-02-05 15:00:32 -08:00
Hai Shang 9896e327c0 internal clean
PiperOrigin-RevId: 604358478
2024-02-05 10:23:25 -08:00
Janusz Sobczak 9f42452386 Fix PCP handler cleanup
All tasks in base_pcp_handler must complete before
p2p_cluster_pcp_handler is destroyed to prevent use-after-free errors.

Added a couple of missing StopDiscovery calls.

PiperOrigin-RevId: 547931350
2023-07-13 14:56:14 -07:00
Janusz Sobczak 472fba64ae Add const in ReadCharacteristic prototype
PiperOrigin-RevId: 538891905
2023-06-08 14:30:03 -07:00
Janusz Sobczak a5060a3c18 Call gatt disconnect callback in tests
PiperOrigin-RevId: 536737632
2023-05-31 09:33:52 -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 3241efb292 Make BleV2ServerSocket copyable
PiperOrigin-RevId: 531270942
2023-05-11 12:11:14 -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 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
Hai Shang 29a52b7bf1 ble_v2 internal clean up
PiperOrigin-RevId: 513933519
2023-03-06 07:06:57 -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
Janusz Sobczak f4d85f9b90 Migrate to AnyInvocable in platform code
PiperOrigin-RevId: 504104740
2023-01-23 16:04:21 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -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
hai007 2d4cc75dfa Fix miscellaneous typos in the comments or logging.
PiperOrigin-RevId: 454649199
2022-06-13 10:55:57 -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 412f9e0752 [BLE Refactor] Connects BleV2 mediums to PCP handler.
PiperOrigin-RevId: 449196646
2022-05-17 05:42:05 -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 771ce23fa3 [BLE Refactor] Implements advertisement tracking in Ble medium with DiscoveredPeripheralTracker class.
PiperOrigin-RevId: 447397658
2022-05-09 00:36:33 -07:00
edwinwu 190d3ebafc [BLE Refactor] Impl Start/Stop Scanning and DiscoveredPeripheral callback function in medium layer and ScanCallback in platform layer.
PiperOrigin-RevId: 438293171
2022-03-30 07:08:05 -07:00
edwinwu 66b425dc4e [BLE Refactor] Impl Start/Stop AdvertisementGattServer
PiperOrigin-RevId: 432657453
2022-03-05 08:33:01 -08:00