Commit Graph
45 Commits
Author SHA1 Message Date
Francis Tsui b48b943275 Remove reference to BlePeripheral.
PiperOrigin-RevId: 757830081
2025-05-12 10:55:38 -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 065a79e9ac Remove unnecessary callback.
PiperOrigin-RevId: 753697677
2025-05-01 13:07:12 -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
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
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
Guogang Li d5b5d92f87 Internal logging update
PiperOrigin-RevId: 669420403
2024-08-30 13:08:35 -07:00
Francis Tsui 4bca950bc7 Rename NEARBY_LOG() to NEARBY_LOG_OBSOLETE()
PiperOrigin-RevId: 667785090
2024-08-26 18:20:49 -07: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
Juliet Levesque 84bb5700c4 [Nearby Presence] Check IsValid() before accessing impl_
Adding a check to `IsInvalid()` before accessing `impl_` in
`Blev2Medium::IsExtendedAdvertisementsAvailable()` to prevent a crash when
`impl_` is nullptr (which occurs when BleV2 is disabled).

PiperOrigin-RevId: 635854690
2024-05-21 10:38:27 -07: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 dfdb5a6405 Fix crash in BleV2MediumTest::StartScanningTmp
This fixes flakiness in the tests.

PiperOrigin-RevId: 551009093
2023-07-25 15:09:47 -07: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 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 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
Edwin Wu e57591aede Revert back cl/522520410; iOS still need to broadcast all the data back.
PiperOrigin-RevId: 524442774
2023-04-14 19:51:19 -07:00
Guogang Li 461985419f Fixed the logic issue to handle peripheral in BLE v2
PiperOrigin-RevId: 522520410
2023-04-06 21:40:41 -07:00
Hai Shang 29a52b7bf1 ble_v2 internal clean up
PiperOrigin-RevId: 513933519
2023-03-06 07:06:57 -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 9a1ada9a56 [BLE Refactor] Implement iOS Scanning modules.
PiperOrigin-RevId: 455274324
2022-06-15 19:23:55 -07:00
hai007 2d4cc75dfa Fix miscellaneous typos in the comments or logging.
PiperOrigin-RevId: 454649199
2022-06-13 10:55:57 -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 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
edwinwu 91dfdefb9f [BLE Refactor] Impl Start/Stop Advertising function in medium layer.
PiperOrigin-RevId: 432185275
2022-03-03 07:04:32 -08:00