Fix/linux ble pairing flow#270
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4ec847ee6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 983b6e2df2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81a19bc4b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51a48e1778
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 757c6588db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff2cf70d45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Would you be able to fix the conflicts then I'll merge it? |
There was a problem hiding this comment.
Pull request overview
This PR improves the Linux BLE pairing/connect experience by adding a bluetoothctl-based pairing/trust fallback, integrating bond/trust recovery into the BLE connect flow, and adding UI + localization support for Linux PIN entry.
Changes:
- Added a Linux
bluetoothctlpairing/trust helper and a Linux BLE error classifier (with unit tests). - Updated BLE scanning/connecting to incorporate Linux system devices, pairing recovery, and to suppress transient Linux connect errors during auto-reconnect.
- Added localized UI strings and regenerated
AppLocalizationsfor the Linux PIN prompt flow; added a platform-interface dependency for bond-state checks.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/services/linux_ble_pairing_service_test.dart | Adds unit tests for the bluetoothctl pairing/trust helper. |
| test/services/linux_ble_error_classifier_test.dart | Adds unit tests for Linux BLE error classification heuristics. |
| pubspec.yaml | Adds flutter_blue_plus_platform_interface dependency for bond-state queries. |
| lib/services/linux_ble_pairing_service.dart | Implements bluetoothctl-based pairing/trust fallback service. |
| lib/services/linux_ble_error_classifier.dart | Adds helpers to classify Linux connect vs pairing failures by text. |
| lib/screens/scanner_screen.dart | Adds Linux PIN prompt callback path and suppresses transient connect errors during auto-reconnect. |
| lib/connector/meshcore_connector.dart | Integrates Linux bond/trust validation, pairing recovery, and Linux-specific scanning/connect retry logic. |
| lib/l10n/app_en.arb | Adds Linux PIN prompt strings (English). |
| lib/l10n/app_bg.arb | Adds Linux PIN prompt strings (Bulgarian). |
| lib/l10n/app_de.arb | Adds Linux PIN prompt strings (German). |
| lib/l10n/app_es.arb | Adds Linux PIN prompt strings (Spanish). |
| lib/l10n/app_fr.arb | Adds Linux PIN prompt strings (French). |
| lib/l10n/app_it.arb | Adds Linux PIN prompt strings (Italian). |
| lib/l10n/app_nl.arb | Adds Linux PIN prompt strings (Dutch). |
| lib/l10n/app_pl.arb | Adds Linux PIN prompt strings (Polish). |
| lib/l10n/app_pt.arb | Adds Linux PIN prompt strings (Portuguese). |
| lib/l10n/app_ru.arb | Adds Linux PIN prompt strings (Russian). |
| lib/l10n/app_sk.arb | Adds Linux PIN prompt strings (Slovak). |
| lib/l10n/app_sl.arb | Adds Linux PIN prompt strings (Slovenian). |
| lib/l10n/app_sv.arb | Adds Linux PIN prompt strings (Swedish). |
| lib/l10n/app_uk.arb | Adds Linux PIN prompt strings (Ukrainian). |
| lib/l10n/app_zh.arb | Adds Linux PIN prompt strings (Chinese). |
| lib/l10n/app_localizations.dart | Updates localization interface to include new Linux PIN prompt strings. |
| lib/l10n/app_localizations_bg.dart | Regenerated localization implementation (Bulgarian). |
| lib/l10n/app_localizations_de.dart | Regenerated localization implementation (German). |
| lib/l10n/app_localizations_en.dart | Regenerated localization implementation (English). |
| lib/l10n/app_localizations_es.dart | Regenerated localization implementation (Spanish). |
| lib/l10n/app_localizations_fr.dart | Regenerated localization implementation (French). |
| lib/l10n/app_localizations_it.dart | Regenerated localization implementation (Italian). |
| lib/l10n/app_localizations_nl.dart | Regenerated localization implementation (Dutch). |
| lib/l10n/app_localizations_pl.dart | Regenerated localization implementation (Polish). |
| lib/l10n/app_localizations_pt.dart | Regenerated localization implementation (Portuguese). |
| lib/l10n/app_localizations_ru.dart | Regenerated localization implementation (Russian). |
| lib/l10n/app_localizations_sk.dart | Regenerated localization implementation (Slovak). |
| lib/l10n/app_localizations_sl.dart | Regenerated localization implementation (Slovenian). |
| lib/l10n/app_localizations_sv.dart | Regenerated localization implementation (Swedish). |
| lib/l10n/app_localizations_uk.dart | Regenerated localization implementation (Ukrainian). |
| lib/l10n/app_localizations_zh.dart | Regenerated localization implementation (Chinese). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR improves the Linux BLE pairing/connect experience by adding a bluetoothctl-based pairing/trust fallback, integrating Linux-specific bond/trust checks into the BLE connect path, and adding a user PIN prompt (with localized strings) to support pairing agent prompts that don’t reliably surface through the default BlueZ path.
Changes:
- Added a Linux BLE pairing fallback service (
bluetoothctl) plus unit tests and an error classifier for Linux BLE connect vs pairing failures. - Integrated Linux pairing/bond/trust recovery and Linux-specific scan-device inclusion into
MeshCoreConnector.connect()and scan flow, plus reconnect-loop mitigation on pairing failures. - Added a Linux PIN dialog to the scanner connect flow and localized the new UI strings across ARB + generated localization files.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/services/linux_ble_pairing_service_test.dart | Adds unit tests for LinuxBlePairingService pairing/trust/disconnect behavior. |
| test/services/linux_ble_error_classifier_test.dart | Adds unit tests for Linux BLE error classification helpers. |
| pubspec.yaml | Adds flutter_blue_plus_platform_interface dependency to support Linux bond-state checks. |
| lib/services/linux_ble_pairing_service_stub.dart | Provides a no-op stub for builds where dart:io isn’t available. |
| lib/services/linux_ble_pairing_service.dart | Implements bluetoothctl-driven pairing/trust flow with PIN/passkey + retry handling. |
| lib/services/linux_ble_error_classifier.dart | Adds helpers to classify Linux BLE connect vs pairing failures/timeouts. |
| lib/screens/scanner_screen.dart | Wires Linux PIN prompt into connect flow and suppresses transient reconnect errors on Linux. |
| lib/connector/meshcore_connector.dart | Adds Linux scan merge with system devices, Linux connect retries/recovery, bond/trust verification, and reconnect-loop handling. |
| lib/l10n/app_en.arb | Adds English strings for Linux pairing PIN dialog. |
| lib/l10n/app_bg.arb | Adds Bulgarian strings for Linux pairing PIN dialog. |
| lib/l10n/app_de.arb | Adds German strings for Linux pairing PIN dialog. |
| lib/l10n/app_es.arb | Adds Spanish strings for Linux pairing PIN dialog. |
| lib/l10n/app_fr.arb | Adds French strings for Linux pairing PIN dialog. |
| lib/l10n/app_it.arb | Adds Italian strings for Linux pairing PIN dialog. |
| lib/l10n/app_nl.arb | Adds Dutch strings for Linux pairing PIN dialog. |
| lib/l10n/app_pl.arb | Adds Polish strings for Linux pairing PIN dialog. |
| lib/l10n/app_pt.arb | Adds Portuguese strings for Linux pairing PIN dialog. |
| lib/l10n/app_ru.arb | Adds Russian strings for Linux pairing PIN dialog. |
| lib/l10n/app_sk.arb | Adds Slovak strings for Linux pairing PIN dialog. |
| lib/l10n/app_sl.arb | Adds Slovenian strings for Linux pairing PIN dialog. |
| lib/l10n/app_sv.arb | Adds Swedish strings for Linux pairing PIN dialog. |
| lib/l10n/app_uk.arb | Adds Ukrainian strings for Linux pairing PIN dialog. |
| lib/l10n/app_zh.arb | Adds Chinese strings for Linux pairing PIN dialog. |
| lib/l10n/app_localizations.dart | Updates generated localization interface for new Linux pairing PIN strings. |
| lib/l10n/app_localizations_en.dart | Updates generated English localizations for new strings. |
| lib/l10n/app_localizations_bg.dart | Updates generated Bulgarian localizations for new strings. |
| lib/l10n/app_localizations_de.dart | Updates generated German localizations for new strings. |
| lib/l10n/app_localizations_es.dart | Updates generated Spanish localizations for new strings. |
| lib/l10n/app_localizations_fr.dart | Updates generated French localizations for new strings. |
| lib/l10n/app_localizations_it.dart | Updates generated Italian localizations for new strings. |
| lib/l10n/app_localizations_nl.dart | Updates generated Dutch localizations for new strings. |
| lib/l10n/app_localizations_pl.dart | Updates generated Polish localizations for new strings. |
| lib/l10n/app_localizations_pt.dart | Updates generated Portuguese localizations for new strings. |
| lib/l10n/app_localizations_ru.dart | Updates generated Russian localizations for new strings. |
| lib/l10n/app_localizations_sk.dart | Updates generated Slovak localizations for new strings. |
| lib/l10n/app_localizations_sl.dart | Updates generated Slovenian localizations for new strings. |
| lib/l10n/app_localizations_sv.dart | Updates generated Swedish localizations for new strings. |
| lib/l10n/app_localizations_uk.dart | Updates generated Ukrainian localizations for new strings. |
| lib/l10n/app_localizations_zh.dart | Updates generated Chinese localizations for new strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c55b3ac to
40d1e04
Compare
40d1e04 to
85579a7
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the Linux BLE pairing/connect flow by adding a bluetoothctl-based fallback pairing service, integrating Linux-specific bond/trust recovery into the connect pipeline, and adding UI + localization for PIN entry.
Changes:
- Added
LinuxBlePairingService(bluetoothctl) + a web stub, and a Linux BLE error classifier. - Updated BLE scan/connect flows to incorporate Linux system devices, pairing recovery, and a PIN dialog callback.
- Updated localization ARBs and regenerated localization Dart files; added unit tests for the new services.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/services/linux_ble_pairing_service_test.dart | Adds tests for bluetoothctl pairing/trust/disconnect behaviors and PIN handling. |
| test/services/linux_ble_error_classifier_test.dart | Adds tests for Linux BLE connect vs pairing error classification helpers. |
| pubspec.yaml | Adds flutter_blue_plus_platform_interface dependency for bond-state checks. |
| lib/services/linux_ble_pairing_service_stub.dart | Provides a no-op implementation for builds where dart:io is unavailable. |
| lib/services/linux_ble_pairing_service.dart | Implements bluetoothctl-based pairing/trust fallback with PIN/passkey + retry logic. |
| lib/services/linux_ble_error_classifier.dart | Adds helpers to classify Linux connect vs pairing failures by error text markers. |
| lib/screens/scanner_screen.dart | Wires Linux PIN dialog into connect flow; suppresses transient Linux auto-reconnect connect errors. |
| lib/connector/meshcore_connector.dart | Adds Linux system-device scan merge; Linux connect retries; bond/trust verification and pairing fallback; reconnect-loop avoidance. |
| lib/l10n/app_en.arb | Adds new strings for Linux pairing PIN dialog. |
| lib/l10n/app_bg.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_de.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_es.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_fr.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_it.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_nl.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_pl.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_pt.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_ru.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_sk.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_sl.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_sv.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_uk.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_zh.arb | Translates new Linux pairing PIN dialog strings. |
| lib/l10n/app_localizations.dart | Updates generated localization interface with new Linux pairing PIN dialog strings. |
| lib/l10n/app_localizations_en.dart | Updates generated English localization implementation. |
| lib/l10n/app_localizations_bg.dart | Updates generated Bulgarian localization implementation. |
| lib/l10n/app_localizations_de.dart | Updates generated German localization implementation. |
| lib/l10n/app_localizations_es.dart | Updates generated Spanish localization implementation. |
| lib/l10n/app_localizations_fr.dart | Updates generated French localization implementation. |
| lib/l10n/app_localizations_it.dart | Updates generated Italian localization implementation. |
| lib/l10n/app_localizations_nl.dart | Updates generated Dutch localization implementation. |
| lib/l10n/app_localizations_pl.dart | Updates generated Polish localization implementation. |
| lib/l10n/app_localizations_pt.dart | Updates generated Portuguese localization implementation. |
| lib/l10n/app_localizations_ru.dart | Updates generated Russian localization implementation. |
| lib/l10n/app_localizations_sk.dart | Updates generated Slovak localization implementation. |
| lib/l10n/app_localizations_sl.dart | Updates generated Slovenian localization implementation. |
| lib/l10n/app_localizations_sv.dart | Updates generated Swedish localization implementation. |
| lib/l10n/app_localizations_uk.dart | Updates generated Ukrainian localization implementation. |
| lib/l10n/app_localizations_zh.dart | Updates generated Chinese localization implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add Linux BLE pairing helper that drives bluetoothctl for pair/trust/PIN entry, with Completer-based flow control, explicit retry loop, and named timeout constants. - LinuxBlePairingService: pair-and-trust with up to 2 retries - LinuxBleErrorClassifier: map bluetoothctl stderr to user-facing errors - Conditional import stub for web builds (dart.library.io gate) - Scanner screen: PIN dialog integration for Linux pairing flow - MeshCoreConnector: Linux pairing/recovery/reconnect wiring - l10n: 4 new pairing keys across all 14 locales - 12 unit tests (pairing service + error classifier)
7733bf3 to
cb63b48
Compare
|
Is this still needed? |
|
you mean the pairing flow or the device filter. i have a local running it and hes able to connect to WisCore now |
…ages - Reintroduced Bluetooth pairing PIN title, prompt, show, and hide strings in English, Spanish, French, Hungarian, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Slovak, Slovenian, Swedish, Ukrainian, and Chinese. - Updated localization files to ensure consistency and clarity in user prompts related to Bluetooth pairing.
This PR narrows the branch to Linux BLE pairing flow improvements and related UI/localization support.
What’s included
bluetoothctl:lib/services/linux_ble_pairing_service.dartlib/connector/meshcore_connector.dartlib/screens/scanner_screen.dartlib/l10n/app_en.arbflutter gen-l10nflutter_blue_plus_platform_interfaceinpubspec.yamlWhy
Linux BLE pairing can fail or not surface prompts reliably through the default path. This adds a practical fallback and explicit PIN flow so Linux users can pair/connect more consistently.
Screencast.from.2026-03-07.16-31-46.webm