Commit Graph
212 Commits
Author SHA1 Message Date
Lucas Silva Shepard a683ed6789 [fp-rs] Added device dismissing functionality. The Seeker will ignore a dismissed device's advertisements until a 10s timeout expires. 2023-08-14 13:33:46 -07:00
Lucas Silva Shepard 57373a80c3 [fp-rs] Displaying device image retrieved from model ID. 2023-08-14 13:33:44 -07:00
Lucas Silva Shepard 329e1b298e [fp-rs] Retrieving device information from model ID by parsing local file with serde. 2023-08-14 13:32:25 -07:00
Lucas Silva Shepard a57b55ad98 [fp-rs] Now using model ID instead of BLE address for keeping track of unique devices. 2023-08-14 13:32:22 -07:00
Lucas Silva Shepard f8fb8d4b52 [fp-rs] Flutter UI now only displays the closest discovered device. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard 0505a23b3f [fp-rs] Added bluetooth pairing button, result displayed in alert dialog. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard bf05ab5db4 [fp-rs] Invoking Rust code from Dart, retrieving stream of incoming bluetooth advertisements. 2023-08-13 16:52:26 -07:00
Lucas Silva Shepard 2c8809c1e1 [fp-rs] Converted bluetooth module into standalone crate, with fastpair UI provided as an example. 2023-08-13 16:51:16 -07:00
Lucas Silva Shepard 6074e1beba [fp-rs] Set up basic demo for calling Rust from Flutter 2023-08-13 16:51:13 -07:00
Lucas Silva Shepard 80a3b508fa [fp-rs] Providing constructs for generating Rust-side bridge code 2023-08-02 12:25:49 -07:00
Lucas Silva Shepard d7aedea815 [fp-rs] Initial Rust dummy commit for Flutter UI demo 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard c45dd7467d [fp-rs] Initial flutter create commit 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard 20e55d6d78 [fp-rs] Migrating from fastpair/rust to fastpair/rust/bluetooth. 2023-08-02 12:25:48 -07:00
Qin Wang 33b2748a8c Add UX for Retroactive Pairing
PiperOrigin-RevId: 552944003
2023-08-01 15:38:15 -07:00
Copybara-Service 498fc35aa5 Merge pull request #1957 from TheShepord:fpwinrs_pair
PiperOrigin-RevId: 552656377
2023-07-31 19:20:22 -07:00
Lucas Silva Shepard e73a9bb9a8 [fp-rs] Updated API for accessing platform-specific structs.
Previously, `Device` trait was implemented by both Classic and BLE
Devices. This forced usage of associated types for choosing the type of
address employed, bringing about limitations of Rust's type system. By
ensuring cross-platform traits are only used for shared cross-platform
behavior, there are no longer type annotation issues in the application
layer.

Changes:
* Split the `Device` trait into `ClassicDevice` and `BleDevice`.
* Migrated these to an `api/` module to avoid name clashes and clearly
  differentiate common structs (under `common/) from common traits (under
  `api/)`.
* Removed shared `Address` enum in order to get rid of device's address
  associated type.
* Application layer can now only talk to impl traits rather than the concrete
  platform-specific type. This ensures compile-time behavior guarantees.
  Constructors for cross-platform impls provided under the `Platform`
  unit struct.
* Updated `unsupported` module for unsupported platforms. Previously,
  dummy inherent impls would've been necessary for calling the `new()`
  method. This is now part of the `ClassicDevice` and `BleDevice` API,
  so cross-platform behavior is guaranteed to work.
2023-07-29 17:23:45 -07:00
Lucas Silva Shepard 25a3257880 [fp-rs] Moving service data and advertisement information into separate BleAdvertisement struct. 2023-07-29 17:23:13 -07:00
Lucas Silva Shepard f42fdb4186 [fp-rs] Temporarily removing bluetooth lib abstraction layer, applications now talk directly to platform code.
Rust's type system is causing issues with notating associated types. For
now, concrete types will be used, but this will be fixed when the API is
updated with splitting Device into ClassicDevice and BleDevice.
2023-07-29 17:22:16 -07:00
Lucas Silva Shepard ba945aa360 [fp-rs] Implemented device selection CLI. 2023-07-29 17:22:14 -07:00
Lucas Silva Shepard 7730a0f1db [fp-rs] Updating Fast Pair Seeker to filter out non-FP advertisements. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 81592cc4c5 [fp-rs] Device now holds 16bit UUID service data, collected by Adapter. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 4be9872f6d [fp-rs] Updated device scanning interface to facilitate adding more functionality to device constructor. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard fc07423925 [fp-rs] Implemented classic device pairing 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 9da0bf2987 [fp-rs] Implemented address API 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 494eb66027 [fp-rs] Implemented custom error types for Bluetooth library. 2023-07-29 17:18:39 -07:00
Qin Wang e36b26184a Retroactive pairing detector: check login status and if device has already been saved to the user's account
PiperOrigin-RevId: 551985769
2023-07-28 17:04:46 -07:00
Janusz Sobczak 749d528206 Add FinishRetroactivePairing
Add the second step of retroactive pairing.
The client should:
* start retroactive pairing
* get user consent
* finish retroactive pairing

PiperOrigin-RevId: 551934024
2023-07-28 13:20:56 -07:00
Janusz Sobczak 974d4b357c Skip SDP check for FP rfcomm connection on Windows
The SDP checks fails but rfcomm connection works.
Skipping the SDP check does not seem to have any ill side effects.

PiperOrigin-RevId: 551370531
2023-07-26 18:15:44 -07:00
Qin Wang 2145ccce69 Fix flaky test:scanner_broker_impl_test
PiperOrigin-RevId: 551329018
2023-07-26 15:16:58 -07:00
Qin Wang 040ed31341 Integrate Dart UX with windows_admin_plugin
PiperOrigin-RevId: 551316220
2023-07-26 14:30:04 -07:00
Qin Wang bccdf6543e Checks if a device is already saved before writing accountkey
PiperOrigin-RevId: 551045458
2023-07-25 17:33:45 -07:00
Qin Wang 3456c419c8 Check account log in status before attempt to write account key
PiperOrigin-RevId: 551032914
2023-07-25 16:39:02 -07:00
Qin Wang 2bdafe926c Add UX to show pairing result
PiperOrigin-RevId: 551027791
2023-07-25 16:18:35 -07:00
Qin Wang be688441aa Implemet save_device UX for fast pair windwos
PiperOrigin-RevId: 549693338
2023-07-20 11:42:21 -07:00
Qin Wang 0cd8aaab25 Write account association to footprints
PiperOrigin-RevId: 549693215
2023-07-20 11:39:06 -07:00
Crisrael Lucero 0e44ed626d Refactor crypto/ directory into crypto_cros/ and crypto/
PiperOrigin-RevId: 549467911
2023-07-19 17:12:52 -07:00
Lucas Silva Shepard 251740d010 [fp-rs] Renaming folder windows_ble to windows, moving common to folder 2023-07-19 12:10:21 -07:00
Qin Wang eec9c98a95 Refactor fast_pair_discoverable_scanner
PiperOrigin-RevId: 549081197
2023-07-18 12:41:23 -07:00
Qin Wang 99053e4df3 Implement scanner for fast pair subsequent pairing
PiperOrigin-RevId: 548841808
2023-07-17 17:20:01 -07:00
Qin Wang 7899d18907 Fix flaky test::pairer_broker_impl_test
PiperOrigin-RevId: 548818974
2023-07-17 15:43:34 -07:00
Qin Wang 04a70b479d Fix flay test:fast_pair_pairer_impl_test
PiperOrigin-RevId: 548770439
2023-07-17 12:40:45 -07:00
Qin Wang 8ec86f5ff9 BugFix:fast_pair_handshake_impl_test
PiperOrigin-RevId: 548765785
2023-07-17 12:23:37 -07:00
Anay Wadhera daed4f5f62 Revert "Revert "Fast Pair BLE Device Discovery for Windows in Rust"" 2023-07-14 15:53:52 -04:00
suetfei 15d3341e34 Revert "Fast Pair BLE Device Discovery for Windows in Rust" 2023-07-14 12:50:20 -07:00
suetfei 71ce4bff1a Merge pull request #1867 from TheShepord/fpwinrs_seeker
Fast Pair BLE Device Discovery for Windows in Rust
2023-07-14 11:36:00 -07:00
Lucas Silva Shepard a855dd19e1 [fp-rs] Cross-platform Bluetooth now interfaces with impl trait rather than concrete per-platform type. 2023-07-13 16:09:37 -07:00
Lucas Silva Shepard aeed049d58 [fp-rs] Updating device scanning interface, split into start/stop/next. 2023-07-13 16:08:44 -07:00
Qin Wang 47de9bdfaa Implementation account management for fast pair windows
PiperOrigin-RevId: 547955144
2023-07-13 16:08:39 -07:00
Lucas Silva Shepard 1375066f74 [fp-rs] Adding line width formatting to Fast Pair Rust. 2023-07-13 16:08:23 -07:00
Lucas Silva Shepard 07b5750f07 [fp-rs] Implemented device discovery for FP Windows in Rust. 2023-07-13 16:08:22 -07:00