Commit Graph
46 Commits
Author SHA1 Message Date
hai007 00a2999269 Format all the files in CL786733783
PiperOrigin-RevId: 786873870
2025-07-24 16:25:18 -07:00
hai007 71cdf84236 Replace NEARBY_LOGS with LOG for all coding under google3/third_party/nearby/
PiperOrigin-RevId: 786733783
2025-07-24 09:34:17 -07:00
Guogang Li 0614f439d9 Control Advertising/Scanning of instant on lost separately
PiperOrigin-RevId: 778356456
2025-07-01 23:30:17 -07:00
Guogang Li 9853d62532 Enable password for AWDL upgrade
PiperOrigin-RevId: 759226149
2025-05-15 11:22:45 -07:00
Guogang Li 09ac8d8c58 Apply DCT flag in Nearby Connections
PiperOrigin-RevId: 756487383
2025-05-08 15:41:04 -07:00
Guogang Li 7ea0e00333 Add AWDL upgrade logic
PiperOrigin-RevId: 756335927
2025-05-08 09:08:52 -07:00
Johnson Lu ee9266b175 Implement Dynamic Role Switch
Implement dynamic role switch in bwu manager. When NC receive BWU request, it will check if it should switch role based on the device's capability.

PiperOrigin-RevId: 755703443
2025-05-06 23:38:16 -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
Guogang Li 45d6317a64 Don't report upgrade failure for same medium upgrade
PiperOrigin-RevId: 731153168
2025-02-25 21:41:34 -08:00
Edwin Wu 5ac9bb14f6 analytics: Add exact OperationResultCode for Bluetooth - Connect/AttemptConnect
PiperOrigin-RevId: 704918371
2024-12-10 18:29:24 -08:00
Edwin Wu 438267a63a analytics: Add operation result code for bandwidth upgrade analytics, II
PiperOrigin-RevId: 704209395
2024-12-09 03:00:17 -08:00
Edwin Wu 4c42919211 analytics: Add operation result code for bandwidth upgrade analytics, I
PiperOrigin-RevId: 704204474
2024-12-09 02:41:43 -08:00
Edwin Wu d7a1fb8c48 analytics: Update the returned code for CreateUpgradedEndpointChannel of BWUHanlder and its enherited class for NC mediums.
PiperOrigin-RevId: 704171725
2024-12-09 00:24:54 -08:00
Edwin Wu c3a479e526 analytics: Add OperationResultCode to ConnectionAttempt, II
PiperOrigin-RevId: 704166113
2024-12-09 00:03:41 -08:00
Edwin Wu ccdcd15e83 Add WEB_RTC_NON_CELLULAR enum, V
PiperOrigin-RevId: 686470433
2024-10-16 05:24:59 -07:00
Guogang Li d5b5d92f87 Internal logging update
PiperOrigin-RevId: 669420403
2024-08-30 13:08:35 -07:00
Anay Wadhera b6829008f2 Deprecate flag kProcessBwuFrameAfterPcpConnected
PiperOrigin-RevId: 659611911
2024-08-05 11:06:05 -07:00
Anay Wadhera 26d5055b13 Deprecate flag kIgnoreUpgradePathAvailableFrameForAdvertiser
PiperOrigin-RevId: 659123571
2024-08-03 11:08:50 -07:00
Eiden Kim 76b4f6c51a Block any upgrade path available frames in Advertising side
PiperOrigin-RevId: 636753678
2024-05-23 19:29:19 -07:00
Eiden Kim 35a8289ef4 Block any BWU frames before the NC connection accepted by both side
PiperOrigin-RevId: 625459811
2024-04-16 14:49:14 -07:00
Guogang Li ceded2da84 Added more logs on bandwidth upgrade
PiperOrigin-RevId: 590229747
2023-12-12 09:22:45 -08:00
Hai Shang 8987ddd461 Add more logs for bwu_manager
PiperOrigin-RevId: 584429491
2023-11-21 14:27:18 -08:00
hai007 55aedfb235 Implement Safe to Disconnect feature
PiperOrigin-RevId: 560119556
2023-08-25 09:51:44 -07:00
Janusz Sobczak 8ccb9fcfec Replace std::function with AnyInvocable
PiperOrigin-RevId: 556090653
2023-08-11 14:27:08 -07:00
Guogang Li 6d886e3fc8 Fixed some issues in analytics data
PiperOrigin-RevId: 551900985
2023-07-28 11:13:07 -07:00
hai007 742f57423c Enable WIFI_DIRECT in NC connection layer
PiperOrigin-RevId: 538827162
2023-06-08 10:36:32 -07:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
hai007 499b2691f4 WIFI Direct implementation (3)
Part 3: BWU and client interface part

PiperOrigin-RevId: 498218241
2022-12-28 11:22:48 -08:00
hai007 fcfec33a7c Clarify BWU retry method name and fix a small logic error
PiperOrigin-RevId: 493936270
2022-12-08 10:45:08 -08:00
hai007 2012acdbcc Change BWU priority from Hotspot to WifiLan
PiperOrigin-RevId: 491388299
2022-11-28 10:55:28 -08:00
hai007 8f681dece0 Throughput profiling
PiperOrigin-RevId: 477752265
2022-09-29 10:02:11 -07:00
Pu Shi 643c0efdde [Nearby Connections] Add methods to shutdown executors in bwu_manager
Adding methods that allow us to shutdown executors in bwu_manager
during Nearby Connections shutdown process to prevent potential crashes.

PiperOrigin-RevId: 466425604
2022-08-09 11:57:38 -07:00
hai007 ef014d47b8 Disable encryption for HOTSPOT
PiperOrigin-RevId: 463773343
2022-07-28 00:51:47 -07:00
hai007 e4a0f280e2 BWU Hotspot Responder(client) need to disconnect Hotspot when the session is done
PiperOrigin-RevId: 460577462
2022-07-12 16:23:48 -07:00
hai007 407222b104 Fix a BWU revert logic error for BWU initiator
PiperOrigin-RevId: 457799119
2022-06-28 12:58:33 -07:00
hai007 7d3b6d7d82 Disable BWU from WLAN to Hotspot for Discoverer side
Windows doesn't support BWU from WIFI_LAN to WIFI_HOTSPOT. Because when the discoverer side try to switch from current AP to the Hotspot, it loss physical connection. When here's no physical connection, BWU protocol frame exchange won't be finished successfully, then BWU will fail eventually.
In the current code implementation, if Windows Nearby act as Advertiser, it will not do BWU from WLAN to Hotspot. This CL adds similar logic when Windows Nearby act as discoverer.

PiperOrigin-RevId: 453248717
2022-06-06 11:50:06 -07:00
hai007 37b0c31319 Add Wifi Hotspot AP and Client validation check
PiperOrigin-RevId: 451492039
2022-05-27 15:20:36 -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
bourdakos da13735484 Update Package.swift and stub webrtc
PiperOrigin-RevId: 443722630
2022-04-22 11:57:15 -07:00
hai007 ec2d3ae1aa WIFI Hotspot implementation (4)
Part 4: BWU and client interface part

PiperOrigin-RevId: 443700883
2022-04-22 10:32:12 -07:00
nohle 0c19f3f279 [NC] Track bandwidth upgrade mediums for each endpoint (fix)
Rename RevertInitiatedBwuMediumForEndpointIfNecessary to RevertBwuMediumForEndpoint because this method can be called by RESPONDERs of the bandwidth upgrade request. Also, make sure to remove the endpoint from the endpoint-to-medium map.

PiperOrigin-RevId: 442055611
2022-04-15 11:13:27 -07:00
nohle 98a5b9d0ee [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (4/4 unit tests)
Add unit tests for BaseBwuHandler and BwuManager (BWU initiation only). Add fake classes and helper methods needed for testing. Refine comments and logs.

PiperOrigin-RevId: 442021842
2022-04-15 08:33:21 -07:00
nohle e5fb3a8f11 [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (3/4)
* Fix bandwidth upgrade service ID usage. For instance, no longer use the inaccurate service ID from ClientProxy.
* Add more fine-grained upgraded endpoint tracking using both service IDs and endpoint IDs
* Only "revert" bandwidth-upgrade mediums--for example, stop accepting connections on a server socket--for a service when the last endpoint for that service is finished.

These changes are necessary to support multiple services (e.g., Nearby Share and Phone Hub) and multiple mediums (e.g., WebRTC and WLAN).

PiperOrigin-RevId: 442021257
2022-04-15 08:29:41 -07:00
nohle dee3e9cfb4 [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (2/4)
Consolidate BWU service ID bookkeeping into the BaseBwuHandler class. This eliminates duplicated code in per-medium BWU handlers and allows us to easily augment the bookkeeping with endpoint IDs in a subsequent CL.

Also, localize all service ID wrapping to the BaseBwuHandler class. A postfix is appended to the service ID during bandwidth upgrade, e.g., "NearbyShare_INITIATOR_BWU"; this is done to distinguish a medium's use for advertising/discovery vs. its use for device-to-device connections.

This CL should theoretically be a no-op, but per-medium BWU handlers were inconsistent in their implementations.

PiperOrigin-RevId: 442019603
2022-04-15 08:19:19 -07:00
nohle 463d391fcd [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (1/4)
This CL should be a no-op.

Provide better access to the service ID during bandwidth upgrade handling. Notably, 1) have the endpoint channel store its associated service ID, and 2) send the service ID on a connect/disconnect.

The service ID identifies the application, for example, "NearbySharing". In future CLs, we will use the service IDs to better handle bandwidth-upgrade bookkeeping when multiple services are running simultaneously. Specifically, we will better handle reverting a bandwidth-upgrade medium without interfering with other services.

PiperOrigin-RevId: 442019209
2022-04-15 08:15:53 -07:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00