Linux + iPhone Continuity / iMessage / SMS
fix: better diagnostics for bug report
Zack Bartel460c06a0eef4
diff --git a/docs/BLUETOOTH.md b/docs/BLUETOOTH.mdindex 8c336e5..c09b4df 100644--- a/docs/BLUETOOTH.md+++ b/docs/BLUETOOTH.md@@ -418,6 +418,7 @@ checks the daemon does not make.| `tether --bt-connection` reports LE and messages up but `Notifications: no`, for hours | Fixed. The LE link was opened by the dial and carries no ANCS. A connected link used to take the solicitation off air, so the phone was never asked for the service | Nothing. The advert goes back on air over a link that has stayed up without ANCS -- see 2026-08-23. To clear it by hand on an older build, `tether --bt-solicit`; do not re-pair, and do not cycle the phone's Bluetooth || LE never comes up on a `BR/EDR + LE` bond, the advert is on air, and cycling the phone's Bluetooth changes nothing | The bond is pinned to `PreferredBearer=bredr`, so the inbound LE link the iPhone opens is never accepted | Fixed for new bonds, which are handed back to `le` after pairing. An older bond stays pinned: re-pair it, or set the property by hand with `busctl set-property org.bluez /org/bluez/hci0/dev_<ADDR> org.bluez.Device1 PreferredBearer s le` -- see 2026-08-25 below || The status says the iPhone is not answering on LE, and its permission is on | The phone's Bluetooth stack is wedged, which the granted permission does not prevent | Turn Bluetooth off and back on **on the iPhone**. Re-pairing and re-toggling the permission do not clear this |+| The status says this computer is not putting the notification request on air | The adapter reports LE advertising support and BlueZ is holding no advertising instance for it, so the iPhone is never asked for the service | Nothing on the iPhone, and re-pairing will not help. Check `controller` in `tether --bt-diagnostics` and try another with `tether --bt-adapter <hciN>` -- see 2026-09-04 below || Everything connects but `ancs_ready` stays false | Compatibility mode, or iOS has not authorized notification content yet | Check `Mode:` in `tether --bt-status`. In full mode the daemon retries, the first request returns `NotPermitted` until the prompt on the phone is approved || A group conversation cannot be replied to | Working as designed until the route is unambiguous | The thread's `reply_reason` says which condition failed || The iPhone never offers the "Show Notifications" toggle, and messages and contacts work | Fixed. A BR/EDR-only bond used to latch notification mirroring off in the config, which takes the ANCS solicitation off air -- so the phone is never asked for the service | Nothing. On an older build, `tether --bt-ancs on` then `tether --bt-solicit`; `tether --bt-status` now shows mirroring under `Notifications:` -- see 2026-09-01 |@@ -497,6 +498,8 @@ tether --bt-diagnostics```Prints the delivery mode, auth strategy, Bluetooth settings, current connection state, and timeline of recent link and pairing transitions.+It names the controller too: `controller` under `status.adapters` is the chip, from+sysfs. The `modalias` beside it is BlueZ's own device id, not the hardware.It is redacted for pasting into an issue. Bluetooth addresses, phone numbers, emailaddresses, and home and runtime directories become numbered placeholders.@@ -2067,3 +2070,80 @@ None of this changes the shipped design. It sharpens the reason for it: the supppath needs one flag Tether already requires, and the alternative needs three settingsacross two daemons, gives up call control, gives up keeping the phone's audio on thephone, and still depends on the phone choosing to connect.++### 2026-09-04 - A Barrot dongle, and a dump that could not say whether it was the cause++Reported as #128. LE never connected across a 1.8-hour timeline while MAP and PBAP+worked throughout, on a machine that passes every capability check Tether makes.++| | |+|---|---|+| Controller | **Barrot Technology Co.,Ltd.** — `manufacturer 2279` (SIG company id `0x08E7`) in the reporter's `btmgmt info`. USB dongle; exact USB id not captured |+| Kernel | 7.0.0-31-generic (Kubuntu 26.04.1) |+| BlueZ | 5.87, self-built, running with `--experimental` |+| Adapter roles | central + peripheral; 3 advertising instances; `secure-conn`, `ll-privacy` on |+| Adapter class | `0x7c0408` — A/V Hands-Free |+| Phone | iPhone 17, iOS 26.6.1 |+| Tether | 0.2.24 |++Captured: `le_connected` false in all 46 timeline entries. `classic_connected` flapped+about 20 times with MAP and PBAP churning `none` / `no_record` / `other` / `forbidden`.+Part of that flapping is the "no locally connectable profile" artifact of 2026-08-23,+but not its rate -- no MT7925 session recorded above looks like this.++Barrot's only presence in the kernel is `btusb.c`'s CSR-clone workaround, whose comment+names "a Barrot 8041a02" among controllers that are "really messed-up", plus+`BTUSB_BARROT` for `33fa:0010` and `33fa:0012`. That is circumstantial: the reporter's+chip is HCI version 13 (Core 5.4), not the BT 4.0 clone the quirk covers. It is the same+shape as #69, where an unbranded CSR clone reported `class=ok`, `secure-connections=on`+and both LE roles and still produced only BR/EDR bonds.++**The finding is that the report could not settle it, and two of our own defects are+why.** Both are #118's lesson again: a precondition reported as established when it was+only assumed, and advice that depends on it.++- **`bond_has_le` did not mean the bond had an LE half.** `resolve_capability()` set it+ from `has_le_bearer` alone, which is only "`Bearer.LE1` carries properties" -- so+ `--bt-status` printed `Bond: BR/EDR + LE` for every bonded device on any machine+ running `bluetoothd --experimental`. `pairing.cpp` had the right predicate all along+ (`has_le_bearer && le_bonded`); the capability path did not. The one question that+ separates "this chip cannot derive the LE LTK", which is #69's story, from "it derives+ keys and never carries the link" is exactly what that field was for, and #128's+ `bond_has_le: true` is worth nothing. Fixed, with a test for a **populated**+ `Bearer.LE1` whose `Bonded` is false -- the existing tests only covered the absent and+ empty-interface cases, which is how it survived.++- **Nothing separated "we registered an advert" from "an advert is on air."**+ `ancs_soliciting` is `AncsAdvertisement::active()`, our own registration flag, and+ `resolve_capability()` read `SupportedInstances` and never `ActiveInstances`. A+ controller that accepts `RegisterAdvertisement` and then does not radiate -- the+ plausible failure for a single-radio chip scheduling an ACL, page scan and inquiry+ scan at once -- is indistinguishable from a phone ignoring a healthy advert. The+ supervisor took the second reading unconditionally and told the reporter their iPhone+ was wedged; they cycled its Bluetooth "countless times". `advertising_active_instances`+ is now reported, and `BearerOps::solicitation_on_air()` gates the advice: a long LE+ silence in which the solicitation was never once observed on air names the adapter and+ says plainly that nothing on the iPhone will change it. The flag is latched across the+ window, because the advert is legitimately off air while a dial owns the radio and an+ instantaneous read there would blame a working adapter.++Also corrected here: **`Adapter1.Modalias` is not the controller.** It is BlueZ's own+device id -- the reporter's `usb:v1D6Bp0246d0557` is Linux Foundation / BlueZ with+`0x0557` encoding version 5.87, and it reads identically on every machine. The chip comes+from `/sys/class/bluetooth/<hciN>/device/modalias`, needs no privilege, and is now+reported as `controller` alongside it and printed by `scripts/bt-probe.sh`. Measured on+the MT7925 machine, the two read `usb:v0E8Dp0717d0100...` and `usb:v1D6Bp0246d0557`+respectively.++**The coexistence question is open.** Nothing here proves the Barrot cannot advertise+while holding a BR/EDR link; it makes the next report able to. What would settle it, in+order of cost: `btmon` showing whether `LE Set Extended Advertising Enable` ever returns+a non-zero status and whether any `LE Connection Complete` occurs at all; an external LE+scanner looking for the `Tether` advert with the iPhone connected and again with its+Bluetooth off; and `tether --bt-adapter <hciN>` onto any other controller. A secondary+suspect worth ruling out is `ll-privacy`, since answering the solicitation means the+iPhone connects with a rotating address the local resolving list has to handle, and clone+firmware gets resolving lists wrong.++No known-bad-controller list was added. One report is not a rule, and naming the hardware+in every dump has to come first.diff --git a/po/cs.po b/po/cs.poindex c3a5aaf..d13433c 100644--- a/po/cs.po+++ b/po/cs.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Czech\n"@@ -755,6 +755,14 @@ msgstr """role a2dp_sink a hfp_hf vypnuté. Nic nechybí a na iPhonu není třeba nic ""měnit."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Tento počítač nevysílá požadavek na oznámení, takže iPhone o službu nikdy není požádán. Nic na iPhonu to nezmění a opětovné párování také ne. Zkontrolujte řadič pomocí tether --bt-status; jiný lze vybrat pomocí tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "diff --git a/po/de.po b/po/de.poindex eec8fdd..269d525 100644--- a/po/de.po+++ b/po/de.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: German\n"@@ -762,6 +762,14 @@ msgstr """einem, bei dem die Rollen a2dp_sink und hfp_hf abgeschaltet sind. Es fehlt ""nichts, und am iPhone muss nichts geändert werden."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Dieser Computer sendet die Benachrichtigungsanfrage nicht aus, das iPhone wird also nie nach dem Dienst gefragt. Daran ändert weder etwas am iPhone noch ein erneutes Koppeln etwas. Prüfen Sie den Controller mit tether --bt-status; ein anderer lässt sich mit tether --bt-adapter auswählen."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1908,7 +1916,8 @@ msgstr "Desktop-Benachrichtigungen anzeigen"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Aus schaltet iPhone-Hinweise, neue Nachrichten und ankommende Dateien stumm."+msgstr ""+"Aus schaltet iPhone-Hinweise, neue Nachrichten und ankommende Dateien stumm."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/es.po b/po/es.poindex bca2693..ca094a8 100644--- a/po/es.po+++ b/po/es.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: Spanish\n"@@ -758,6 +758,14 @@ msgstr """en uno donde los roles a2dp_sink y hfp_hf están desactivados. No falta nada ""y no hay que cambiar nada en el iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Este equipo no está emitiendo la solicitud de notificaciones, así que nunca se le pide el servicio al iPhone. Nada en el iPhone cambia esto, y volver a emparejar tampoco. Compruebe la controladora con tether --bt-status; se puede elegir otra con tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1894,7 +1902,9 @@ msgstr "Mostrar avisos del escritorio"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Desactivado silencia los avisos del iPhone, los mensajes nuevos y los archivos que llegan."+msgstr ""+"Desactivado silencia los avisos del iPhone, los mensajes nuevos y los "+"archivos que llegan."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/fr.po b/po/fr.poindex 8c17be7..0211629 100644--- a/po/fr.po+++ b/po/fr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: French\n"@@ -763,6 +763,14 @@ msgstr """sur une machine où les rôles a2dp_sink et hfp_hf sont désactivés. Rien ne ""manque et rien n'est à changer sur l'iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Cet ordinateur n'émet pas la demande de notifications, l'iPhone n'est donc jamais sollicité pour le service. Rien sur l'iPhone n'y change quoi que ce soit, et refaire l'appairage non plus. Vérifiez le contrôleur avec tether --bt-status ; on peut en choisir un autre avec tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1902,7 +1910,9 @@ msgstr "Afficher les bulles du bureau"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Désactivé, cela coupe les alertes de l'iPhone, les nouveaux messages et les fichiers reçus."+msgstr ""+"Désactivé, cela coupe les alertes de l'iPhone, les nouveaux messages et les "+"fichiers reçus."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/it.po b/po/it.poindex f8ec8c8..d2aadd1 100644--- a/po/it.po+++ b/po/it.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Italian\n"@@ -758,6 +758,14 @@ msgstr """a2dp_sink e hfp_hf sono disattivati. Non manca nulla e non serve cambiare ""nulla sull'iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Questo computer non sta trasmettendo la richiesta di notifiche, quindi all'iPhone non viene mai chiesto il servizio. Nulla sull'iPhone lo cambia, e nemmeno rifare l'associazione. Controlla il controller con tether --bt-status; se ne può scegliere un altro con tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1894,7 +1902,9 @@ msgstr "Mostra gli avvisi del desktop"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Disattivato silenzia gli avvisi dell'iPhone, i nuovi messaggi e i file in arrivo."+msgstr ""+"Disattivato silenzia gli avvisi dell'iPhone, i nuovi messaggi e i file in "+"arrivo."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/ja.po b/po/ja.poindex 4a3351f..b2dc6c8 100644--- a/po/ja.po+++ b/po/ja.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Japanese\n"@@ -743,6 +743,14 @@ msgstr """効なマシンでは普通のことです。不足しているものはなく、iPhone 側で変更すべき点""もありません。"+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "このコンピューターが通知の要求を電波に乗せていないため、iPhone にサービスが要求されることがありません。iPhone 側では解決できず、ペアリングをやり直しても変わりません。tether --bt-status でコントローラーを確認してください。別のものは tether --bt-adapter で選べます。"+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1860,7 +1868,9 @@ msgstr "デスクトップのポップアップを表示"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "オフにすると iPhone の通知、新着メッセージ、受信ファイルがすべて表示されません。"+msgstr ""+"オフにすると iPhone の通知、新着メッセージ、受信ファイルがすべて表示されませ"+"ん。"#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/ko.po b/po/ko.poindex eabf6e4..020ec86 100644--- a/po/ko.po+++ b/po/ko.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Korean\n"@@ -736,6 +736,14 @@ msgstr """택이 없는 컴퓨터나 a2dp_sink 및 hfp_hf 역할이 꺼진 컴퓨터에서는 흔한 일입니""다. 빠진 것은 없으며 iPhone에서 바꿀 것도 없습니다."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "이 컴퓨터가 알림 요청을 송출하지 않아 iPhone에 서비스를 요청하는 일이 없습니다. iPhone에서 할 수 있는 일은 없으며 다시 페어링해도 마찬가지입니다. tether --bt-status로 컨트롤러를 확인하고, tether --bt-adapter로 다른 것을 선택할 수 있습니다."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "diff --git a/po/nl.po b/po/nl.poindex 5557f89..945b9cb 100644--- a/po/nl.po+++ b/po/nl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Dutch\n"@@ -753,6 +753,14 @@ msgstr """rollen a2dp_sink en hfp_hf uitstaan. Er ontbreekt niets en er hoeft niets te ""veranderen op de iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Deze computer zendt het meldingsverzoek niet uit, dus de iPhone wordt nooit om de service gevraagd. Niets op de iPhone verandert dit, en opnieuw koppelen ook niet. Controleer de controller met tether --bt-status; een andere kies je met tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1884,7 +1892,8 @@ msgstr "Bureaubladmeldingen tonen"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Uit dempt iPhone-meldingen, nieuwe berichten en binnenkomende bestanden."+msgstr ""+"Uit dempt iPhone-meldingen, nieuwe berichten en binnenkomende bestanden."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/pl.po b/po/pl.poindex 6c08d71..5ac21e1 100644--- a/po/pl.po+++ b/po/pl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Polish\n"@@ -758,6 +758,14 @@ msgstr """a2dp_sink i hfp_hf są wyłączone. Niczego nie brakuje i niczego nie trzeba ""zmieniać na iPhonie."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Ten komputer nie nadaje żądania powiadomień, więc iPhone nigdy nie jest proszony o tę usługę. Nic po stronie iPhone'a tego nie zmieni, ponowne parowanie także nie. Sprawdź kontroler poleceniem tether --bt-status; inny można wybrać poleceniem tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1885,7 +1893,8 @@ msgstr "Pokazuj wyskakujące powiadomienia"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Wyłączenie wycisza alerty z iPhone'a, nowe wiadomości i przychodzące pliki."+msgstr ""+"Wyłączenie wycisza alerty z iPhone'a, nowe wiadomości i przychodzące pliki."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/pt_BR.po b/po/pt_BR.poindex 3588c4d..5a5c269 100644--- a/po/pt_BR.po+++ b/po/pt_BR.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Brazilian Portuguese\n"@@ -755,6 +755,14 @@ msgstr """papéis a2dp_sink e hfp_hf estão desativados. Não falta nada e nada precisa ""ser mudado no iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Este computador não está transmitindo o pedido de notificações, então o serviço nunca é solicitado ao iPhone. Nada no iPhone muda isso, e refazer o pareamento também não. Verifique a controladora com tether --bt-status; outra pode ser escolhida com tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1885,7 +1893,8 @@ msgstr "Mostrar pop-ups da área de trabalho"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Desligado silencia alertas do iPhone, mensagens novas e arquivos que chegam."+msgstr ""+"Desligado silencia alertas do iPhone, mensagens novas e arquivos que chegam."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/ru.po b/po/ru.poindex 4685cd8..3519bd4 100644--- a/po/ru.po+++ b/po/ru.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Russian\n"@@ -760,6 +760,14 @@ msgstr """там, где роли a2dp_sink и hfp_hf отключены. Ничего не отсутствует и ничего ""не нужно менять на iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Этот компьютер не передаёт запрос уведомлений в эфир, поэтому iPhone никогда не просят об этой службе. Ничто на iPhone этого не изменит, повторное сопряжение тоже. Проверьте контроллер командой tether --bt-status; другой можно выбрать командой tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1885,7 +1893,9 @@ msgstr "Показывать всплывающие уведомления"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Выключено — не показываются оповещения iPhone, новые сообщения и полученные файлы."+msgstr ""+"Выключено — не показываются оповещения iPhone, новые сообщения и полученные "+"файлы."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/sv.po b/po/sv.poindex d4c1342..d116c75 100644--- a/po/sv.po+++ b/po/sv.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Swedish\n"@@ -752,6 +752,14 @@ msgstr """a2dp_sink och hfp_hf är avstängda. Inget saknas och inget behöver ändras på ""iPhonen."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Den här datorn sänder inte ut notisförfrågan, så iPhone blir aldrig tillfrågad om tjänsten. Ingenting på iPhone ändrar det, och att para ihop på nytt gör det inte heller. Kontrollera styrkretsen med tether --bt-status; en annan kan väljas med tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "diff --git a/po/tether.pot b/po/tether.potindex 0426341..38f9ac1 100644--- a/po/tether.pot+++ b/po/tether.pot@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether 0.2.24\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <[email protected]>\n"@@ -698,6 +698,14 @@ msgid """are turned off. Nothing is missing and nothing needs changing on the iPhone."msgstr ""+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr ""+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "diff --git a/po/tr.po b/po/tr.poindex ad9c91b..b48bf96 100644--- a/po/tr.po+++ b/po/tr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Turkish\n"@@ -752,6 +752,14 @@ msgstr """makinede bu olağandır. Eksik bir şey yok ve iPhone'da değiştirilmesi gereken ""bir şey yok."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Bu bilgisayar bildirim isteğini yayına vermiyor, bu yüzden iPhone'dan hizmet hiçbir zaman istenmiyor. iPhone tarafında hiçbir şey bunu değiştirmez, yeniden eşleştirme de değiştirmez. Denetleyiciyi tether --bt-status ile denetleyin; başka biri tether --bt-adapter ile seçilebilir."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1864,7 +1872,8 @@ msgstr "Masaüstü açılır bildirimlerini göster"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Kapalıyken iPhone uyarıları, yeni mesajlar ve gelen dosyalar susturulur."+msgstr ""+"Kapalıyken iPhone uyarıları, yeni mesajlar ve gelen dosyalar susturulur."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/uk.po b/po/uk.poindex 627ee16..7ed0a17 100644--- a/po/uk.po+++ b/po/uk.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Ukrainian\n"@@ -761,6 +761,14 @@ msgstr """де ролі a2dp_sink і hfp_hf вимкнено. Нічого не бракує і нічого не треба ""змінювати на iPhone."+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "Цей комп'ютер не передає запит сповіщень в ефір, тож iPhone ніколи не просять про цю службу. Ніщо на iPhone цього не змінить, повторне спарювання теж. Перевірте контролер командою tether --bt-status; інший можна вибрати командою tether --bt-adapter."+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "@@ -1884,7 +1892,9 @@ msgstr "Показувати спливні сповіщення"#: src/gtk/settings_view.cppmsgid "Off silences iPhone alerts, new messages and arriving files."-msgstr "Вимкнено — не показуються сповіщення з iPhone, нові повідомлення та отримані файли."+msgstr ""+"Вимкнено — не показуються сповіщення з iPhone, нові повідомлення та отримані "+"файли."#: src/gtk/settings_view.cppmsgid "SMS and iMessage conversations synced over Bluetooth."diff --git a/po/zh_CN.po b/po/zh_CN.poindex a2f5449..e2ab218 100644--- a/po/zh_CN.po+++ b/po/zh_CN.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-04 18:00-0700\n"+"POT-Creation-Date: 2026-09-04 18:25-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Simplified Chinese\n"@@ -725,6 +725,14 @@ msgstr """可连接的配置文件——在没有音频栈的机器上,或者关闭了 a2dp_sink 和 hfp_hf 角色的""机器上,这很常见。没有缺少任何东西,iPhone 上也无需更改。"+#: src/core/src/bluetooth/bearer_supervisor.cpp+msgid ""+"This computer is not putting the notification request on air, so the iPhone "+"is never asked for the service. Nothing on the iPhone changes this and re-"+"pairing will not either. Check the controller with tether --bt-status; "+"another one can be selected with tether --bt-adapter."+msgstr "这台计算机没有把通知请求发送到空中,因此从未向 iPhone 请求该服务。在 iPhone 上做任何操作都无法改变这一点,重新配对也不行。用 tether --bt-status 检查控制器;可以用 tether --bt-adapter 选择另一个。"+#: src/core/src/bluetooth/bearer_supervisor.cppmsgid """The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: "diff --git a/scripts/bt-probe.sh b/scripts/bt-probe.shindex 20f18f5..4acabb3 100755--- a/scripts/bt-probe.sh+++ b/scripts/bt-probe.sh@@ -173,6 +173,11 @@ addr=$(prop org.bluez.Adapter1 Address)name=$(prop org.bluez.Adapter1 Alias)ok "$addr ($name)"+# The chip, which BlueZ never reports: Adapter1.Modalias is BlueZ's own device id+# and reads the same on every machine. Bug reports need the hardware named.+controller=$(cat "/sys/class/bluetooth/$ADAPTER/device/modalias" 2>/dev/null || true)+[[ -n $controller ]] && note "controller $controller"+[[ $(prop org.bluez.Adapter1 Powered) == true ]] && ok "powered on" || bad "powered off (bluetoothctl power on)"roles=$(prop org.bluez.Adapter1 Roles)diff --git a/src/core/include/tether/bluetooth/bearer_supervisor.hpp b/src/core/include/tether/bluetooth/bearer_supervisor.hppindex 60744a7..ec548b5 100644--- a/src/core/include/tether/bluetooth/bearer_supervisor.hpp+++ b/src/core/include/tether/bluetooth/bearer_supervisor.hpp@@ -57,6 +57,8 @@ namespace tether::bluetooth {virtual ConnectResult connect_le(std::string& err) = 0;// Whether a connect request is still outstandingvirtual bool le_connect_outstanding() const = 0;+ // Whether the ANCS solicitation is registered AND BlueZ is advertising.+ virtual bool solicitation_on_air() const = 0;};struct BearerStatus {@@ -114,6 +116,8 @@ namespace tether::bluetooth {bool le_dial_spent_ = false;int64_t classic_connected_since_ = -1;int64_t le_down_since_ = -1;+ // Whether the solicitation has been observed on air since LE went down.+ bool solicited_since_le_down_ = false;int64_t next_classic_attempt_ = 0;};diff --git a/src/core/include/tether/bluetooth/objects.hpp b/src/core/include/tether/bluetooth/objects.hppindex 620c3e1..d39102a 100644--- a/src/core/include/tether/bluetooth/objects.hpp+++ b/src/core/include/tether/bluetooth/objects.hpp@@ -28,11 +28,15 @@ namespace tether::bluetooth {uint32_t device_class = 0;bool powered = false;std::vector<std::string> roles;- // Controller identity. Empty when BlueZ has none.+ // BlueZ's own device id, not the chip's.std::string modalias;+ // The controller itself, from /sys/class/bluetooth/<hciN>/device/modalias.+ std::string controller;// org.bluez.LEAdvertisingManager1 is a separate interface on the same object.bool has_advertising_manager = false;uint8_t advertising_instances = 0;+ // Instances BlueZ currently holds registered.+ uint8_t advertising_active_instances = 0;bool has_role(const std::string& role) const;bool class_is_handsfree() const { return (device_class & COD_MASK) == COD_TARGET; }diff --git a/src/core/src/bluetooth/bearer_supervisor.cpp b/src/core/src/bluetooth/bearer_supervisor.cppindex 0e2c6a6..0969d21 100644--- a/src/core/src/bluetooth/bearer_supervisor.cpp+++ b/src/core/src/bluetooth/bearer_supervisor.cpp@@ -62,6 +62,11 @@ namespace tether::bluetooth {"the a2dp_sink and hfp_hf roles are turned off. Nothing is missing and nothing needs changing on ""the iPhone.");+ constexpr const char* LE_NEVER_SOLICITED_ADVICE =+ N_("This computer is not putting the notification request on air, so the iPhone is never asked for "+ "the service. Nothing on the iPhone changes this and re-pairing will not either. Check the "+ "controller with tether --bt-status; another one can be selected with tether --bt-adapter.");+constexpr const char* LE_PHONE_SILENT_ADVICE =N_("The iPhone is not answering on LE. Its Bluetooth is wedged on its own side: turn Bluetooth off ""and back on on the iPhone, which clears this even when Share System Notifications is already on. "@@ -76,6 +81,7 @@ namespace tether::bluetooth {void BearerSupervisor::reset() {classic_failures_ = 0;le_down_since_ = -1;+ solicited_since_le_down_ = false;classic_connected_since_ = -1;next_classic_attempt_ = 0;status_.classic_backoff = 0;@@ -100,10 +106,14 @@ namespace tether::bluetooth {status_.classic_connected = ops_.classic_connected();status_.le_available = ops_.le_bearer_available();status_.le_connected = status_.le_available && ops_.le_connected();- if (status_.le_connected)+ if (status_.le_connected) {le_down_since_ = -1;- else if (le_down_since_ < 0)+ solicited_since_le_down_ = false;+ } else if (le_down_since_ < 0) {le_down_since_ = now;+ }+ if (!status_.le_connected && ops_.solicitation_on_air())+ solicited_since_le_down_ = true;if (status_.le_connected)status_.le_dialling = false;@@ -203,11 +213,13 @@ namespace tether::bluetooth {// read after the attempt, never beforestatus_.le_dialling = ops_.le_connect_outstanding();- status_.reason = le_down_since_ >= 0 && now - le_down_since_ >= LE_SILENT_SECONDS- ? _(LE_PHONE_SILENT_ADVICE)- : _("Connected. Waiting for the iPhone to open the LE link that carries "- "notifications. If it does not, open Settings > Bluetooth > (i) on the "- "iPhone and check Share System Notifications.");+ const bool le_silent = le_down_since_ >= 0 && now - le_down_since_ >= LE_SILENT_SECONDS;++ status_.reason = le_silent && !solicited_since_le_down_ ? _(LE_NEVER_SOLICITED_ADVICE)+ : le_silent ? _(LE_PHONE_SILENT_ADVICE)+ : _("Connected. Waiting for the iPhone to open the LE link that carries "+ "notifications. If it does not, open Settings > Bluetooth > (i) on the "+ "iPhone and check Share System Notifications.");return !(status_ == previous);}diff --git a/src/core/src/bluetooth/connection.cpp b/src/core/src/bluetooth/connection.cppindex 24a4fa0..2d905e8 100644--- a/src/core/src/bluetooth/connection.cpp+++ b/src/core/src/bluetooth/connection.cpp@@ -372,6 +372,15 @@ namespace tether::bluetooth {return le_->pending;}+ bool solicitation_on_air() const override {+ if (!ancs_solicitation_active())+ return false;+ const auto objects = monitor_.snapshot();+ auto device = lookup();+ const Adapter* adapter = device ? objects.find_adapter(device->adapter_path) : nullptr;+ return adapter && adapter->advertising_active_instances > 0;+ }+// Issued asynchronously and never abandoned: a synchronous call that// times out leaves BlueZ still connecting, and the next attempt then// collides with it forever.diff --git a/src/core/src/bluetooth/objects.cpp b/src/core/src/bluetooth/objects.cppindex 6494730..309a007 100644--- a/src/core/src/bluetooth/objects.cpp+++ b/src/core/src/bluetooth/objects.cpp@@ -5,6 +5,7 @@#include <algorithm>#include <cstring>#include <filesystem>+#include <fstream>namespace tether::bluetooth {@@ -107,6 +108,19 @@ namespace tether::bluetooth {return path.substr(0, slash);}+ // The chip, which BlueZ does not report.+ std::string controller_of(const std::string& adapter_path) {+ const auto slash = adapter_path.find_last_of('/');+ const std::string id = slash == std::string::npos ? adapter_path : adapter_path.substr(slash + 1);+ if (id.empty())+ return {};++ std::ifstream in("/sys/class/bluetooth/" + id + "/device/modalias");+ std::string line;+ std::getline(in, line);+ return line;+ }+void read_adapter(const std::string& path, GVariant* ifaces, BluezObjects& out) {GVariant* props = g_variant_lookup_value(ifaces, IFACE_ADAPTER, G_VARIANT_TYPE("a{sv}"));if (!props)@@ -122,11 +136,13 @@ namespace tether::bluetooth {a.powered = get_bool(props, "Powered");a.roles = get_strv(props, "Roles");a.modalias = get_string(props, "Modalias");+ a.controller = controller_of(path);g_variant_unref(props);if (GVariant* adv = g_variant_lookup_value(ifaces, IFACE_LE_ADV_MGR, G_VARIANT_TYPE("a{sv}"))) {a.has_advertising_manager = true;a.advertising_instances = get_byte(adv, "SupportedInstances");+ a.advertising_active_instances = get_byte(adv, "ActiveInstances");g_variant_unref(adv);}@@ -442,7 +458,9 @@ namespace tether::bluetooth {if ((d.bonded || d.paired) && d.looks_like_iphone()) {cap.bonded_device_present = true;- if (d.has_le_bearer)+ // The interface being populated says the API is live, not that the+ // bond has an LE half. Only Bearer.LE1.Bonded says that.+ if (d.has_le_bearer && d.le_bonded)cap.bond_has_le = true;}}@@ -523,8 +541,10 @@ namespace tether::bluetooth {{"powered", a.powered},{"roles", a.roles},{"modalias", a.modalias},+ {"controller", a.controller},{"advertising_manager", a.has_advertising_manager},{"advertising_instances", a.advertising_instances},+ {"advertising_active_instances", a.advertising_active_instances},{"class_ok", a.class_is_handsfree()},};}diff --git a/test/test_bluetooth_objects.cpp b/test/test_bluetooth_objects.cppindex b7c320b..db63e45 100644--- a/test/test_bluetooth_objects.cpp+++ b/test/test_bluetooth_objects.cpp@@ -319,6 +319,39 @@ TEST(Capability, ClassicOnlyIphoneBondIsNamedAsSuch) {EXPECT_EQ(cap.mode, DeliveryMode::Full);}+// Bearer.LE1 carrying properties says the experimental API is live. It says+// nothing about the bond, and reading it as "the bond has an LE half" reported+// "Bond: BR/EDR + LE" for every bonded device on a machine running bluetoothd+// --experimental -- which is what made issue #128's dump unable to say whether+// the controller had derived the LE keys at all.+TEST(Capability, APopulatedLeBearerIsNotProofOfAnLeBond) {+ Payload p(join(ADAPTER_FULL, R"({+ '/org/bluez/hci0/dev_60_57_C8_30_6A_F7': {+ 'org.bluez.Device1': {+ 'Paired': <true>,+ 'Bonded': <true>,+ 'UUIDs': <['00001132-0000-1000-8000-00805f9b34fb', '0000112f-0000-1000-8000-00805f9b34fb']>+ },+ 'org.bluez.Bearer.LE1': { 'Paired': <false>, 'Bonded': <false> }+ }+ })")+ .c_str());+ auto objects = parse_managed_objects(p.v);+ objects.experimental_api = true;+ auto cap = resolve_capability(objects);++ ASSERT_FALSE(objects.devices.empty());+ EXPECT_TRUE(objects.devices[0].has_le_bearer);+ EXPECT_EQ(cap.bearer_api, BearerApi::Confirmed);+ EXPECT_TRUE(cap.bonded_device_present);+ EXPECT_FALSE(cap.bond_has_le);++ bool named = false;+ for (const auto& reason : cap.reasons)+ named = named || reason.find("BR/EDR only") != std::string::npos;+ EXPECT_TRUE(named) << "a bond with no LE half went unreported";+}+// A controller that cannot advertise never solicits ANCS, so the iPhone is never// asked for the service and no bond made on it can have an LE half. Telling that// user to Forget This Device and pair again sends them round a loop that cannotdiff --git a/test/test_bluetooth_supervisor.cpp b/test/test_bluetooth_supervisor.cppindex 6f9c637..3020f12 100644--- a/test/test_bluetooth_supervisor.cpp+++ b/test/test_bluetooth_supervisor.cpp@@ -56,6 +56,11 @@ namespace {// cases reading as they did.bool outstanding = false;bool le_connect_outstanding() const override { return outstanding; }++ // The healthy case: the adapter accepted the solicitation. Only a test+ // about an adapter that will not advertise clears this.+ bool on_air = true;+ bool solicitation_on_air() const override { return on_air; }};class FakeProfiles : public ProfileOps {@@ -309,6 +314,44 @@ TEST(BearerSupervisor, NamesThePhoneCycleAfterALongSilence) {EXPECT_NE(sup.status().reason.find("turn Bluetooth off"), std::string::npos);}+// Same silence, but the adapter never put the solicitation on air, so the phone+// was never asked for the service. Sending that user to cycle Bluetooth on the+// iPhone is the #128 dead end: nothing on the phone is wrong.+TEST(BearerSupervisor, BlamesTheAdapterWhenNothingWasEverSolicited) {+ FakeBearer ops;+ ops.le_succeeds = false;+ ops.on_air = false;+ BearerSupervisor sup(ops, true);++ int64_t now = 0;+ sup.tick(now);+ sup.tick(++now);+ now += BEARER_SETTLE_SECONDS;+ sup.tick(now);++ sup.tick(now + LE_SILENT_SECONDS);+ EXPECT_NE(sup.status().reason.find("not putting the notification request on air"), std::string::npos);+ EXPECT_EQ(sup.status().reason.find("turn Bluetooth off"), std::string::npos) << "blames the phone";+}++// The advert is legitimately off air while a dial owns the radio. One tick of+// that must not turn into "your adapter is broken".+TEST(BearerSupervisor, OneMomentOffAirDoesNotBlameTheAdapter) {+ FakeBearer ops;+ ops.le_succeeds = false;+ BearerSupervisor sup(ops, true);++ int64_t now = 0;+ sup.tick(now);+ sup.tick(++now);+ now += BEARER_SETTLE_SECONDS;+ sup.tick(now);++ ops.on_air = false;+ sup.tick(now + LE_SILENT_SECONDS);+ EXPECT_NE(sup.status().reason.find("not answering on LE"), std::string::npos);+}+TEST(BearerSupervisor, RecoversAfterDisconnect) {FakeBearer ops;BearerSupervisor sup(ops, true);