Commit Graph
927 Commits
Author SHA1 Message Date
aaronyujiaze ccca7bef6f Mute logging of BLE advertisement discovery for release builds
PiperOrigin-RevId: 453493406
2022-06-07 12:06:31 -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
aaronyujiaze 5566832a00 Enhance stability of bluetooth classic medium
PiperOrigin-RevId: 453239216
2022-06-06 11:09:57 -07:00
aaronyujiaze 71974b2c0b Fix BlePeripheral pointer protection bug
PiperOrigin-RevId: 452884820
2022-06-03 19:08:15 -07:00
hai007 47775bba3d Add visibility for ClearcutEventLogger nearby 3rd party package dependencies
PiperOrigin-RevId: 452881217
2022-06-03 18:31:51 -07:00
aaronyujiaze bc6c726970 Fix bugs in Windows' BluetoothAdapter
PiperOrigin-RevId: 452808916
2022-06-03 11:38:33 -07:00
aaronyujiaze 4045af569f Add Extended Advertising support for BlePeripheral discovery
PiperOrigin-RevId: 452801874
2022-06-03 11:06:43 -07:00
aaronyujiaze 45386948be Add dual-mode Bluetooth Classic Device to support RequestConnection over BLE Fast Advertisement
PiperOrigin-RevId: 452782174
2022-06-03 09:33:59 -07:00
suetfei 182a1d4568 Merge pull request #682 from rzhw/update_depot_tools
Update depot_tools
2022-06-02 14:07:28 -07:00
aaronyujiaze c94981c880 Convert logging of advertisement bytes to hex string format
PiperOrigin-RevId: 452610643
2022-06-02 13:35:52 -07:00
aaronyujiaze 926dcc28d4 Add BlePeripheral discovery logic implementation
PiperOrigin-RevId: 452609641
2022-06-02 13:31:25 -07:00
jfcarroll 28da839987 Latest update for winrt
PiperOrigin-RevId: 452591835
2022-06-02 12:05:19 -07:00
aaronyujiaze 11558b453c Fix remote static bluetooth mac address serialization bug
PiperOrigin-RevId: 452536487
2022-06-02 07:48:03 -07:00
jfcarroll 6d8d04a9f7 Fix for memory leaks, buffer overruns etc on the bluetooth adapter.
PiperOrigin-RevId: 452464213
2022-06-01 23:09:25 -07:00
jfcarroll 5e2b1e9c4c Fix for expanding the CriticalSection coverage to eliminate out of order callbacks from bluetooth
PiperOrigin-RevId: 452463213
2022-06-01 23:01:19 -07:00
jfcarroll 8f067bba98 Set scan mode was starting advertising whether we should or not.
SetScanMode now only starts advertising if the radio is discoverable.

PiperOrigin-RevId: 452461975
2022-06-01 22:48:57 -07:00
jsobczak 09c04d4cc8 Build visibility changes
PiperOrigin-RevId: 452460772
2022-06-01 22:37:42 -07:00
hai007 33ebc9e93f Change SendPayload to accept const char ** instead of char **.
PiperOrigin-RevId: 452457446
2022-06-01 22:06:11 -07:00
hai007 90b0f35449 Remove duplicate strategy field in the AdvertisingOptionsW, ConnectionOptionsW.
PiperOrigin-RevId: 452444826
2022-06-01 20:14:46 -07:00
hai007 6ebf3731c8 Add WifiLan validation check
PiperOrigin-RevId: 452402734
2022-06-01 15:51:06 -07:00
hai007 5cf5ee2048 Change DisconnectFromEndpoint to accept const char * instead of char *.
PiperOrigin-RevId: 452301890
2022-06-01 08:26:08 -07:00
Richard Wang d8453565db Update depot_tools
Adds support for use_remoteexec gn arg, which replaces the now-deprecated use_rbe arg

Bug: crbug.com/1247781
2022-06-01 17:22:22 +09:00
hai007 412e97a40a Fix link error when linking exe with core_adapter.dll.
PiperOrigin-RevId: 452222662
2022-05-31 23:30:05 -07:00
jfcarroll b5a1359d1f Automated g4 rollback of changelist 451248048.
*** Reason for rollback ***

Although this fixes Bluetooth Classic, it appears to break Ble, will resubmit once Ble is fixed.

*** Original change description ***

BEGIN_PUBLIC
Bug fixes for 233012255 and 232995024
Refactor bluetooth_adapter setname and getname to remove logic errors, array overruns, and leaking memory.
Refactor bluetooth discovery callbacks to prevent getting updates before we have cached the device found.
Refactor the dart code interfaces to more closely align between the dll and the dart UI, and move from using the device name (which can be easily duplicated) as the primary key to using endpoint_id as the primary key for all calls into...

***

PiperOrigin-RevId: 452177878
2022-05-31 17:31:03 -07:00
aaronyujiaze b4b74ca5b4 Add Extended Advertising support in Nearby Connections layer
PiperOrigin-RevId: 452112156
2022-05-31 12:29:18 -07:00
guogang 93bc497872 Enabled the visibility of analytics to Nearby Sharing
PiperOrigin-RevId: 452109359
2022-05-31 12:16:26 -07:00
jfcarroll 0521012f83 Remove spurious log entries
PiperOrigin-RevId: 452106082
2022-05-31 12:02:33 -07:00
hai007 e096c7e666 Fix typo in the comment.
PiperOrigin-RevId: 452034210
2022-05-31 06:52:23 -07:00
hai007 b14201a744 Add ToString support to location::nearby::connections::Status.
PiperOrigin-RevId: 451985493
2022-05-31 01:33:46 -07:00
hai007 e9d34f4c3f Fix link error when linking exe with core_adapter.dll.
PiperOrigin-RevId: 451885776
2022-05-30 09:15:09 -07:00
hai007 0e63917cb6 Replace line separators from Windows style(\r\n) to Unix style(\n).
PiperOrigin-RevId: 451877419
2022-05-30 08:12:11 -07:00
hai007 e9d7a29d14 Add visibility for Nearby test snippet.
PiperOrigin-RevId: 451876141
2022-05-30 08:03:02 -07:00
hai007 4aaedaac28 Fix typo in the comment and replace line separators to Unix style(\n).
PiperOrigin-RevId: 451875541
2022-05-30 07:57:57 -07:00
edwinwu 01ec55de58 [BLE Refactor] Implement iOS Platform BLEV2 api with No-Op for advertising and discovery
PiperOrigin-RevId: 451844375
2022-05-30 03:54:55 -07:00
hai007 fe27ea822a Change comment "WIFI" to "WiFi"
PiperOrigin-RevId: 451659534
2022-05-28 14:48:55 -07:00
hai007 37b0c31319 Add Wifi Hotspot AP and Client validation check
PiperOrigin-RevId: 451492039
2022-05-27 15:20:36 -07:00
jfcarroll 10605d5534 Remove spurious log entries
PiperOrigin-RevId: 451426941
2022-05-27 10:37:09 -07:00
hai007 519144eb24 [Analytics] Reorganize code structure for Analytics
- move AnalyticsRecorder to Connections specific folder
- log generic proto type in EventLogger

PiperOrigin-RevId: 451265563
2022-05-26 16:14:51 -07:00
jfcarroll 8765e5bc83 Bug fixes for 233012255 and 232995024
Refactor bluetooth_adapter setname and getname to remove logic errors, array overruns, and leaking memory.
Refactor bluetooth discovery callbacks to prevent getting updates before we have cached the device found.
Refactor the dart code interfaces to more closely align between the dll and the dart UI, and move from using the device name (which can be easily duplicated) as the primary key to using endpoint_id as the primary key for all calls into the dll.

PiperOrigin-RevId: 451248048
2022-05-26 14:46:08 -07:00
aaronyujiaze 8867721271 Add reset for std::promise
std::promise needs to be reinitialized for each async operation after std::future is returned
PiperOrigin-RevId: 451236518
2022-05-26 13:55:18 -07:00
hai007 500f67c85e Add Wifi Medium to query WIFI interface capability and information
PiperOrigin-RevId: 451233512
2022-05-26 13:40:14 -07:00
hai007 ea939b70d3 Add connection attempt type into the established connection for distinguishing the initial and upgrade in the pipeline. So we could get the information of:
1. the transfer speed in initial connection stage or upgraded stage.
2. when doing the end to end mapping, we could map the right metadate field into right established connection for getting more correct analysis.

PiperOrigin-RevId: 451156631
2022-05-26 07:23:57 -07:00
edwinwu f39770d690 Fixes Flaky test by set larger timer(100 ->1000 ms) for CancelableAlarm.
PiperOrigin-RevId: 450911652
2022-05-25 06:46:42 -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
aaronyujiaze cb8fef7875 Add fix to check the availability of BluetoothAdapter
This change makes sure BluetoothClassic and BLE medium can only be added to the CONNECTION_REQUEST frame if BluetoothAdapter is valid and enabled.

PiperOrigin-RevId: 450777716
2022-05-24 15:05:45 -07:00
hai007 28acece858 C++20 fixes.
Structs with user-declared constructors are no longer aggregates.
Remove the user-declared constructors.

Bug: chromium:1284275
PiperOrigin-RevId: 450762391
2022-05-24 13:58:08 -07:00
edwinwu a1e84f0597 [BLE Refactor] Implements BleV2Socket and BleV2ServerSocket.
PiperOrigin-RevId: 450586535
2022-05-23 20:22:10 -07:00
aaronyujiaze 0be161e3bb Add Copresence Service UUID to BLE Advertisement 0x16 Service Data
The medium abstraction layer does not prepopulate the advertisement_bytes ByteArray with Copresence Service UUID. This adds it at the platform impl layer.

PiperOrigin-RevId: 450054877
2022-05-20 13:47:29 -07:00
aaronyujiaze 48a91eec73 Add BLE V1 windows platform implementation
This CL implements the BLE V1 Medium and its corresponding unit tests:
- Start/Stop Advertising
- Start/Stop Scanning
- Receive BLE Advertisement callbacks handler
- BLE Advertisement Publisher/Watcher status callbacks handler

PiperOrigin-RevId: 449824666
2022-05-19 13:48:56 -07:00
johnsonlu 58d14a36bf Add comments of MediumMetadata
PiperOrigin-RevId: 449641256
2022-05-18 20:17:56 -07:00