Skip to content

Linux + iPhone Continuity / iMessage / SMS

feat: detect ETRM disabled on Bazzite and tell user

Zack Bartel8c90c9f67b7e
diff --git a/docs/BLUETOOTH.md b/docs/BLUETOOTH.md
index 5adc31a..2256b72 100644
--- a/docs/BLUETOOTH.md
+++ b/docs/BLUETOOTH.md
@@ -932,6 +932,7 @@ checks the daemon does not make.
| `tether-btclass@hci0` fails with `Invalid Index`, having worked for months | The controller re-enumerated -- a failed firmware handshake resets it over USB and it comes back as `hci1` -- so the instance name points at an adapter that no longer exists | Update the unit -- it resolves the adapter itself now and the instance name is only a hint, see 2026-09-11 below. By hand, `ls /sys/class/bluetooth` names the live adapter |
| `tether --bt-setup` keeps printing the experimental step after the drop-in was applied and `bluetooth` restarted | Before 0.2.35 the check read `/proc`, which a Flatpak sandbox cannot see, and which `main.conf` `Experimental = true` never touches | Update. Confirm the flag itself with `busctl --system introspect org.bluez /org/bluez/hci0 \| grep AdvertisementMonitor` -- a hit means the experimental API is on, see 2026-09-20 below |
| Messages and contacts worked, then stopped, and the error mentions a service record | `bluetoothd` restarted and reset the Class of Device | `sudo systemctl enable --now tether-btclass@hci0`, then re-pair if the phone dropped the bond |
+| MAP and PBAP both stuck on `no_record` with the class right, and the `obex` journal shows `setsockopt(L2CAP_OPTIONS): Invalid argument (22)` before each `Unable to find service record` | The kernel has L2CAP ERTM disabled (`bluetooth.disable_ertm=1`, common on gaming distros as an old Xbox controller workaround). obexd connects over L2CAP in ERTM mode and reports the refusal as a missing record | `tether --bt-setup` prints `echo N \| sudo tee /sys/module/bluetooth/parameters/disable_ertm`, which lasts until reboot. To keep it, remove `disable_ertm` from the kernel command line or `/etc/modprobe.d` (rpm-ostree: `sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1`). See 2026-10-15 below |
| The phone never offers notifications / Sync Contacts | The class is wrong, or the ANCS advertisement is not running | Check for `class=ok` in `tether --bt-status`, can take minutes |
| MAP or PBAP reports `forbidden` | The matching toggle on the phone is off | Turn it on. This is not a pairing failure |
| Contacts shows no favorites | **Phone Favorites** is off under the iPhone's Bluetooth settings for this computer | Turn it on, then reconnect the phone |
@@ -3671,3 +3672,30 @@ none, and the check moves to `Adapter1.ConnectDevice`, which is `GDBUS_EXPERIMEN
and therefore absent from introspection without the flag.
Not verified here: the negative case, which needs `bluetoothd` restarted without the flag.
+
+### 2026-10-15 - `no_record` on Bazzite was the kernel refusing ERTM (#243)
+
+Two Bazzite users (#243, discussion #250) had a dual bond, `class=ok` and live ANCS, yet MAP and
+PBAP stayed on `no_record`, and the toggles never showed up. Re-pairing with the class right
+changed nothing. The `obex` journal had the same pair of lines on every attempt:
+
+```
+obexd: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
+obexd: Unable to find service record
+```
+
+The SDP fetch succeeded. In `obexd/client/bluetooth.c` (5.87), `search_callback()` takes the PSM
+from the record's GoepL2capPsm (0x0200) over the RFCOMM channel, and `transport_connect()` opens
+L2CAP with `BT_IO_MODE_ERTM`. The kernel's `L2CAP_OPTIONS` handler (`net/bluetooth/l2cap_sock.c`,
+`l2cap_sock_setsockopt_old`) returns `-EINVAL` for ERTM when `disable_ertm` is set. The connect
+fails locally, before the phone is asked anything, and obexd's shared `failed:` label reports it
+as "Unable to find service record". In #250 `bluetooth.disable_ertm=1` came from the kernel command
+line.
+
+`echo N | sudo tee /sys/module/bluetooth/parameters/disable_ertm` (the parameter is `0644`) took
+PBAP to open and MAP to `forbidden` in #250. Since obexd's error text cannot tell the two causes
+apart, the resolver reads the parameter itself: a setup step in `--bt-setup` and `--bt-status`,
+`ertm_disabled` in `--bt-diagnostics`, and the `no_record` advice names ERTM in place of the
+phone. `bt-probe.sh` checks it too.
+
+Not verified: whether the toggles show up after the fix with no re-pair.
diff --git a/po/cs.po b/po/cs.po
index d8affa2..6cb37ad 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Czech\n"
@@ -1374,6 +1374,14 @@ msgstr ""
"iPhone nenabídne svá oprávnění pro Zprávy a Kontakty, dokud se tento adaptér "
"nebude hlásit jako A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Zprávy a Kontakty potřebují L2CAP ERTM, které má jádro vypnuté (bluetooth.disable_ertm). Tímto ho zapnete do příštího restartu. Natrvalo odstraňte disable_ertm z příkazové řádky jádra nebo z /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Není dostupný žádný Bluetooth adaptér."
@@ -1556,6 +1564,15 @@ msgstr ""
"{0} není dostupné, protože relaci {1} iPhonu používá jiný počítač. Odpojte "
"ji tam a toto se připojí samo."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} se nemůže připojit, protože jádro má vypnuté L2CAP ERTM (bluetooth.disable_ertm). Spusťte tether --bt-setup; na iPhonu je vše v pořádku."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/de.po b/po/de.po
index 25074a8..a8dc1c4 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: German\n"
@@ -1403,6 +1403,14 @@ msgstr ""
"wenn sich dieser Adapter als A/V-Freisprecheinrichtung ausgibt (Major 4, "
"Minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Nachrichten und Kontakte benötigen L2CAP ERTM, das der Kernel deaktiviert hat (bluetooth.disable_ertm). Dies schaltet es bis zum nächsten Neustart wieder ein. Dauerhaft: disable_ertm aus der Kernel-Befehlszeile oder /etc/modprobe.d entfernen (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Kein Bluetooth-Adapter ist verfügbar."
@@ -1591,6 +1599,15 @@ msgstr ""
"iPhones benutzt. Trennen Sie ihn dort, dann verbindet sich das hier von "
"selbst."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} kann keine Verbindung herstellen, weil der Kernel L2CAP ERTM deaktiviert hat (bluetooth.disable_ertm). Führen Sie tether --bt-setup aus; am iPhone ist alles in Ordnung."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/es.po b/po/es.po
index acbcae2..70d875e 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: Spanish\n"
@@ -1398,6 +1398,14 @@ msgstr ""
"El iPhone no ofrecerá sus permisos de Mensajes y Contactos hasta que este "
"adaptador se presente como manos libres A/V (mayor 4, menor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Mensajes y Contactos necesitan L2CAP ERTM, que el kernel tiene desactivado (bluetooth.disable_ertm). Esto lo vuelve a activar hasta el próximo reinicio. Para mantenerlo, quita disable_ertm de la línea de comandos del kernel o de /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "No hay ningún adaptador Bluetooth disponible."
@@ -1581,6 +1589,15 @@ msgstr ""
"{0} no está disponible porque otro equipo está usando la sesión {1} del "
"iPhone. Desconéctelo allí y esto se conectará solo."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} no puede conectarse porque el kernel tiene L2CAP ERTM desactivado (bluetooth.disable_ertm). Ejecuta tether --bt-setup; no hay nada mal en el iPhone."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/fr.po b/po/fr.po
index 652a3fa..f16abd5 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-22\n"
"Last-Translator: Tether project\n"
"Language-Team: French\n"
@@ -1401,6 +1401,14 @@ msgstr ""
"L'iPhone ne proposera ses autorisations Messages et Contacts que lorsque cet "
"adaptateur se présentera comme mains libres A/V (majeur 4, mineur 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Messages et Contacts ont besoin de L2CAP ERTM, que le noyau a désactivé (bluetooth.disable_ertm). Ceci le réactive jusqu'au prochain redémarrage. Pour le conserver, retirez disable_ertm de la ligne de commande du noyau ou de /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Aucun adaptateur Bluetooth n'est disponible."
@@ -1584,6 +1592,15 @@ msgstr ""
"{0} est indisponible car un autre ordinateur utilise la session {1} de "
"l'iPhone. Déconnectez-le là-bas, et la connexion se fera d'elle-même."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} ne peut pas se connecter car le noyau a désactivé L2CAP ERTM (bluetooth.disable_ertm). Lancez tether --bt-setup ; rien ne cloche sur l'iPhone."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/it.po b/po/it.po
index cdea537..d26c846 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Italian\n"
@@ -1394,6 +1394,14 @@ msgstr ""
"L'iPhone non offrirà i permessi per Messaggi e Contatti finché questo "
"adattatore non si presenta come A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Messaggi e Contatti richiedono L2CAP ERTM, che il kernel ha disattivato (bluetooth.disable_ertm). Questo lo riattiva fino al prossimo riavvio. Per mantenerlo, rimuovi disable_ertm dalla riga di comando del kernel o da /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Nessun adattatore Bluetooth è disponibile."
@@ -1578,6 +1586,15 @@ msgstr ""
"{0} non è disponibile perché un altro computer sta usando la sessione {1} "
"dell'iPhone. Disconnettilo lì e questo si connetterà da solo."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} non riesce a connettersi perché il kernel ha disattivato L2CAP ERTM (bluetooth.disable_ertm). Esegui tether --bt-setup; sull'iPhone non c'è nulla di sbagliato."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/ja.po b/po/ja.po
index bd85b5b..d0398b9 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Japanese\n"
@@ -1365,6 +1365,14 @@ msgstr ""
"このアダプタが A/V Hands-Free (major 4, minor 8) として提示されるまで、"
"iPhone はメッセージと連絡先の許可を提示しません。"
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "メッセージと連絡先には L2CAP ERTM が必要ですが、カーネルで無効になっています (bluetooth.disable_ertm)。これで次の再起動まで有効に戻ります。恒久的にするには、カーネルコマンドラインまたは /etc/modprobe.d から disable_ertm を削除してください (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)。"
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "利用できる Bluetooth アダプタがありません。"
@@ -1547,6 +1555,15 @@ msgstr ""
"別のコンピュータが iPhone の {1} セッションを使用しているため、{0} は利用でき"
"ません。そちらで切断すれば、こちらは自動的に接続します。"
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "カーネルで L2CAP ERTM が無効になっているため (bluetooth.disable_ertm)、{}に接続できません。tether --bt-setup を実行してください。iPhone 側に問題はありません。"
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/ko.po b/po/ko.po
index 5e614a3..2cec24d 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Korean\n"
@@ -1347,6 +1347,14 @@ msgstr ""
"이 어댑터가 A/V Hands-Free(major 4, minor 8)로 표시되기 전까지 iPhone은 메시"
"지와 연락처 권한을 제공하지 않습니다."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "메시지와 연락처에는 L2CAP ERTM이 필요하지만 커널에서 비활성화되어 있습니다(bluetooth.disable_ertm). 이 명령은 다음 재부팅까지 다시 켭니다. 유지하려면 커널 명령줄이나 /etc/modprobe.d에서 disable_ertm을 제거하세요(rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "사용할 수 있는 Bluetooth 어댑터가 없습니다."
@@ -1528,6 +1536,15 @@ msgstr ""
"다른 컴퓨터가 iPhone의 {1} 세션을 사용 중이라 {0}을(를) 사용할 수 없습니다. "
"그쪽에서 연결을 끊으면 여기서 자동으로 연결됩니다."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "커널에서 L2CAP ERTM이 비활성화되어 있어(bluetooth.disable_ertm) {}에 연결할 수 없습니다. tether --bt-setup을 실행하세요. iPhone에는 문제가 없습니다."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/nl.po b/po/nl.po
index 802eaa7..dba8e86 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Dutch\n"
@@ -1389,6 +1389,14 @@ msgstr ""
"De iPhone biedt zijn machtigingen voor Berichten en Contacten pas aan als "
"deze adapter zich voordoet als A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Berichten en Contacten hebben L2CAP ERTM nodig, dat de kernel heeft uitgeschakeld (bluetooth.disable_ertm). Dit zet het weer aan tot de volgende herstart. Om het te behouden: verwijder disable_ertm van de kernel-opdrachtregel of uit /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Er is geen Bluetooth-adapter beschikbaar."
@@ -1571,6 +1579,15 @@ msgstr ""
"{0} is niet beschikbaar omdat een andere computer de {1}-sessie van de "
"iPhone gebruikt. Verbreek die daar, dan verbindt dit vanzelf."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} kan geen verbinding maken omdat de kernel L2CAP ERTM heeft uitgeschakeld (bluetooth.disable_ertm). Voer tether --bt-setup uit; er is niets mis met de iPhone."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/pl.po b/po/pl.po
index a1a398c..5e26b56 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Polish\n"
@@ -1389,6 +1389,14 @@ msgstr ""
"iPhone nie zaoferuje uprawnień do Wiadomości i Kontaktów, dopóki ten adapter "
"nie przedstawi się jako A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Wiadomości i Kontakty wymagają L2CAP ERTM, które jądro ma wyłączone (bluetooth.disable_ertm). To polecenie włącza je ponownie do następnego restartu. Aby zachować zmianę, usuń disable_ertm z wiersza poleceń jądra lub z /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Żaden adapter Bluetooth nie jest dostępny."
@@ -1571,6 +1579,15 @@ msgstr ""
"{0} jest niedostępne, ponieważ inny komputer używa sesji {1} iPhone'a. "
"Rozłącz ją tam, a to połączy się samo."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} nie może się połączyć, ponieważ jądro ma wyłączone L2CAP ERTM (bluetooth.disable_ertm). Uruchom tether --bt-setup; z iPhone'em wszystko w porządku."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/pt_BR.po b/po/pt_BR.po
index e3a20b3..4655e3e 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Brazilian Portuguese\n"
@@ -1389,6 +1389,14 @@ msgstr ""
"O iPhone não oferecerá suas permissões de Mensagens e Contatos enquanto este "
"adaptador não se apresentar como A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Mensagens e Contatos precisam do L2CAP ERTM, que o kernel desativou (bluetooth.disable_ertm). Isto o reativa até a próxima reinicialização. Para manter, remova disable_ertm da linha de comando do kernel ou de /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Nenhum adaptador Bluetooth está disponível."
@@ -1571,6 +1579,15 @@ msgstr ""
"{0} está indisponível porque outro computador está usando a sessão {1} do "
"iPhone. Desconecte-o lá e este vai conectar sozinho."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} não consegue conectar porque o kernel está com L2CAP ERTM desativado (bluetooth.disable_ertm). Execute tether --bt-setup; não há nada de errado no iPhone."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/ru.po b/po/ru.po
index 7de5457..77b9724 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Russian\n"
@@ -1389,6 +1389,14 @@ msgstr ""
"iPhone не предложит разрешения для Сообщений и Контактов, пока этот адаптер "
"не будет представляться как A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Сообщениям и Контактам нужен L2CAP ERTM, который отключён в ядре (bluetooth.disable_ertm). Эта команда включает его до следующей перезагрузки. Чтобы сохранить, удалите disable_ertm из командной строки ядра или из /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Адаптер Bluetooth недоступен."
@@ -1571,6 +1579,15 @@ msgstr ""
"{0} недоступно, потому что сеанс {1} на iPhone занят другим компьютером. "
"Отключите его там, и это подключится само."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{}: подключение невозможно, так как в ядре отключён L2CAP ERTM (bluetooth.disable_ertm). Запустите tether --bt-setup; с iPhone всё в порядке."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/sv.po b/po/sv.po
index ce1f842..d22c853 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Swedish\n"
@@ -1375,6 +1375,14 @@ msgstr ""
"iPhonen erbjuder inte sina behörigheter för Meddelanden och Kontakter förrän "
"den här adaptern presenterar sig som A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Meddelanden och Kontakter behöver L2CAP ERTM, som kärnan har inaktiverat (bluetooth.disable_ertm). Detta slår på det igen fram till nästa omstart. För att behålla det, ta bort disable_ertm från kärnans kommandorad eller från /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Ingen Bluetooth-adapter är tillgänglig."
@@ -1557,6 +1565,15 @@ msgstr ""
"{0} är otillgängligt eftersom en annan dator använder iPhonens {1}-session. "
"Koppla ner den där, så ansluter detta av sig självt."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{} kan inte ansluta eftersom kärnan har inaktiverat L2CAP ERTM (bluetooth.disable_ertm). Kör tether --bt-setup; inget är fel på iPhonen."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/tether.pot b/po/tether.pot
index 625b3e3..83f2bd6 100644
--- a/po/tether.pot
+++ b/po/tether.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: tether 0.2.36\n"
+"Project-Id-Version: tether 0.2.38\n"
"Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2026-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-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"
@@ -1235,6 +1235,14 @@ msgid ""
"adapter presents itself as A/V Hands-Free (major 4, minor 8)."
msgstr ""
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr ""
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr ""
@@ -1394,6 +1402,15 @@ msgid ""
"session. Disconnect it there, then this will connect on its own."
msgstr ""
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr ""
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/tr.po b/po/tr.po
index 4ef43bc..f2cef5d 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Turkish\n"
@@ -1374,6 +1374,14 @@ msgstr ""
"Bu bağdaştırıcı kendini A/V Hands-Free (major 4, minor 8) olarak "
"tanıtmadıkça iPhone Mesajlar ve Kişiler izinlerini sunmayacak."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Mesajlar ve Kişiler için L2CAP ERTM gerekir, ancak çekirdek bunu devre dışı bırakmış (bluetooth.disable_ertm). Bu komut onu bir sonraki yeniden başlatmaya kadar tekrar açar. Kalıcı yapmak için disable_ertm'yi çekirdek komut satırından veya /etc/modprobe.d'den kaldırın (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Kullanılabilir Bluetooth bağdaştırıcısı yok."
@@ -1556,6 +1564,15 @@ msgstr ""
"{0} kullanılamıyor; çünkü iPhone'un {1} oturumunu başka bir bilgisayar "
"kullanıyor. Bağlantıyı orada kesin, sonra bu kendiliğinden bağlanacak."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "Çekirdekte L2CAP ERTM devre dışı olduğu için (bluetooth.disable_ertm) {} bağlanamıyor. tether --bt-setup komutunu çalıştırın; iPhone'da bir sorun yok."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/uk.po b/po/uk.po
index 3ba430c..c1dac1f 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Ukrainian\n"
@@ -1386,6 +1386,14 @@ msgstr ""
"iPhone не запропонує дозволів для Повідомлень і Контактів, доки цей адаптер "
"не подаватиме себе як A/V Hands-Free (major 4, minor 8)."
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "Повідомленням і Контактам потрібен L2CAP ERTM, який вимкнено в ядрі (bluetooth.disable_ertm). Ця команда вмикає його до наступного перезавантаження. Щоб зберегти, видаліть disable_ertm з командного рядка ядра або з /etc/modprobe.d (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "Немає доступного адаптера Bluetooth."
@@ -1568,6 +1576,15 @@ msgstr ""
"{0} недоступне, бо сеанс {1} на iPhone використовує інший комп'ютер. "
"Від'єднайте його там, і це під'єднається саме."
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{}: підключення неможливе, бо в ядрі вимкнено L2CAP ERTM (bluetooth.disable_ertm). Запустіть tether --bt-setup; з iPhone все гаразд."
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/po/zh_CN.po b/po/zh_CN.po
index cc8343e..93690fd 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-10-10 13:51-0700\n"
+"POT-Creation-Date: 2026-10-15 19:09-0700\n"
"PO-Revision-Date: 2026-08-23\n"
"Last-Translator: Tether project\n"
"Language-Team: Simplified Chinese\n"
@@ -1315,6 +1315,14 @@ msgstr ""
"在此适配器将自己标识为 A/V Hands-Free(major 4, minor 8)之前,iPhone 不会提"
"供信息和通讯录权限。"
+#: src/core/src/bluetooth/objects.cpp
+msgid ""
+"Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+"(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, "
+"remove disable_ertm from the kernel command line or /etc/modprobe.d (rpm-"
+"ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."
+msgstr "信息和通讯录需要 L2CAP ERTM,但内核已将其禁用 (bluetooth.disable_ertm)。此命令会在下次重启前重新启用它。如需永久生效,请从内核命令行或 /etc/modprobe.d 中移除 disable_ertm (rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)。"
+
#: src/core/src/bluetooth/pairing.cpp
msgid "No Bluetooth adapter is available."
msgstr "没有可用的蓝牙适配器。"
@@ -1492,6 +1500,15 @@ msgstr ""
"{0} 不可用,因为另一台电脑正在使用 iPhone 的 {1} 会话。在那边断开连接后,这里"
"会自动连接。"
+#. TRANSLATORS: {} is Messages or Contacts.
+#: src/core/src/bluetooth/profile_supervisor.cpp
+#, c++-format
+msgid ""
+"{} cannot connect because the kernel has L2CAP ERTM disabled "
+"(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the "
+"iPhone."
+msgstr "{}无法连接,因为内核禁用了 L2CAP ERTM (bluetooth.disable_ertm)。请运行 tether --bt-setup;iPhone 端没有问题。"
+
#. TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
#: src/core/src/bluetooth/profile_supervisor.cpp
#, c++-format
diff --git a/scripts/bt-probe.sh b/scripts/bt-probe.sh
index 02f60b9..dc4b114 100755
--- a/scripts/bt-probe.sh
+++ b/scripts/bt-probe.sh
@@ -275,6 +275,16 @@ else
note "It is socket-activated; 'systemctl --user start obex' forces it up."
fi
+# obexd opens MAP and PBAP over L2CAP in ERTM mode; with ERTM disabled the
+# kernel refuses it and obexd reports "Unable to find service record".
+if [[ $(cat /sys/module/bluetooth/parameters/disable_ertm 2>/dev/null) == [Y1] ]]; then
+ warn "kernel has L2CAP ERTM disabled — MAP and PBAP will fail with no_record"
+ note "Fix for this boot: echo N | sudo tee /sys/module/bluetooth/parameters/disable_ertm"
+ note "Persist: remove disable_ertm from the kernel command line or /etc/modprobe.d"
+else
+ ok "L2CAP ERTM enabled"
+fi
+
# --- verdict -------------------------------------------------------------
echo
echo "Verdict"
diff --git a/src/core/include/tether/bluetooth/objects.hpp b/src/core/include/tether/bluetooth/objects.hpp
index 00b114a..9b0e84d 100644
--- a/src/core/include/tether/bluetooth/objects.hpp
+++ b/src/core/include/tether/bluetooth/objects.hpp
@@ -197,6 +197,8 @@ namespace tether::bluetooth {
bool bond_carries_ancs = false;
bool secure_connections = false;
bool secure_connections_known = false;
+ // bluetooth.disable_ertm is set; obexd's L2CAP connects fail and MAP/PBAP report no_record
+ bool ertm_disabled = false;
// Adapter the steps below apply to, e.g. "hci0". The class unit is templated on it.
std::string adapter_id;
// Human-readable explanations for anything short of full mode, shown verbatim
@@ -225,7 +227,11 @@ namespace tether::bluetooth {
Capability resolve_capability(const BluezObjects& objects,
std::optional<bool> secure_connections = std::nullopt,
- const std::string& preferred_id = {});
+ const std::string& preferred_id = {},
+ bool ertm_disabled = false);
+
+ // Reads /sys/module/bluetooth/parameters/disable_ertm. False when unreadable.
+ bool l2cap_ertm_disabled();
// Shell commands for the two setup steps, for a machine booted with or without systemd.
std::string enable_experimental_command(bool systemd);
diff --git a/src/core/include/tether/bluetooth/profile_supervisor.hpp b/src/core/include/tether/bluetooth/profile_supervisor.hpp
index 14d4020..92cab47 100644
--- a/src/core/include/tether/bluetooth/profile_supervisor.hpp
+++ b/src/core/include/tether/bluetooth/profile_supervisor.hpp
@@ -35,8 +35,9 @@ namespace tether::bluetooth {
// classification can be pinned down by tests against real message text.
ObexError classify_obex_error(const std::string& message);
- // Advice for the user, phrased so it can be shown verbatim.
- std::string obex_error_advice(ObexError error, const std::string& profile);
+ // Advice for the user, phrased so it can be shown verbatim. `ertm_disabled`
+ // names the local cause of a NoRecord that would otherwise blame the phone.
+ std::string obex_error_advice(ObexError error, const std::string& profile, bool ertm_disabled = false);
// Session operations on obexd.
class ProfileOps {
diff --git a/src/core/src/bluetooth/monitor.cpp b/src/core/src/bluetooth/monitor.cpp
index 59b8172..cd9acc6 100644
--- a/src/core/src/bluetooth/monitor.cpp
+++ b/src/core/src/bluetooth/monitor.cpp
@@ -357,7 +357,8 @@ namespace tether::bluetooth {
preferred = preferred_adapter_id;
}
Capability resolved = resolve_capability(parsed, std::nullopt, preferred);
- resolved = resolve_capability(parsed, read_secure_connections(resolved.adapter_id), preferred);
+ resolved = resolve_capability(
+ parsed, read_secure_connections(resolved.adapter_id), preferred, l2cap_ertm_disabled());
{
std::lock_guard<std::mutex> lock(mutex);
@@ -460,7 +461,7 @@ namespace tether::bluetooth {
impl_->objects = parse_managed_objects(probe);
// Secure Connections stays unknown until the watcher thread's first
// refresh: probing it here would fork btmgmt on the startup path.
- impl_->cap = resolve_capability(impl_->objects);
+ impl_->cap = resolve_capability(impl_->objects, std::nullopt, {}, l2cap_ertm_disabled());
g_variant_unref(probe);
impl_->efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
diff --git a/src/core/src/bluetooth/objects.cpp b/src/core/src/bluetooth/objects.cpp
index 794b0da..96b26d2 100644
--- a/src/core/src/bluetooth/objects.cpp
+++ b/src/core/src/bluetooth/objects.cpp
@@ -538,8 +538,10 @@ namespace tether::bluetooth {
Capability resolve_capability(const BluezObjects& objects,
std::optional<bool> secure_connections,
- const std::string& preferred_id) {
+ const std::string& preferred_id,
+ bool ertm_disabled) {
Capability cap;
+ cap.ertm_disabled = ertm_disabled;
const Adapter* adapter = preferred_adapter(objects, preferred_id);
@@ -639,10 +641,24 @@ namespace tether::bluetooth {
"adapter presents itself as A/V Hands-Free (major 4, minor 8)."),
set_class_command(cap.adapter_id, systemd_booted())});
}
+ if (cap.ertm_disabled) {
+ // obexd opens MAP and PBAP over L2CAP in ERTM mode, which the kernel refuses with EINVAL here
+ cap.setup.push_back({_("Messages and Contacts need L2CAP ERTM, which the kernel has disabled "
+ "(bluetooth.disable_ertm). This turns it back on until reboot. To keep it, remove "
+ "disable_ertm from the kernel command line or /etc/modprobe.d "
+ "(rpm-ostree: sudo rpm-ostree kargs --delete=bluetooth.disable_ertm=1)."),
+ "echo N | sudo tee /sys/module/bluetooth/parameters/disable_ertm"});
+ }
return cap;
}
+ bool l2cap_ertm_disabled() {
+ std::ifstream in("/sys/module/bluetooth/parameters/disable_ertm");
+ char value = 'N';
+ return in >> value && (value == 'Y' || value == '1');
+ }
+
nlohmann::json to_json(const Adapter& a) {
return {
{"path", a.path},
@@ -712,6 +728,7 @@ namespace tether::bluetooth {
{"bond_carries_ancs", c.bond_carries_ancs},
{"secure_connections",
c.secure_connections_known ? nlohmann::json(c.secure_connections) : nlohmann::json(nullptr)},
+ {"ertm_disabled", c.ertm_disabled},
{"adapter_id", c.adapter_id},
{"reasons", c.reasons},
{"setup", setup},
diff --git a/src/core/src/bluetooth/profile_supervisor.cpp b/src/core/src/bluetooth/profile_supervisor.cpp
index 3674dc6..5a87167 100644
--- a/src/core/src/bluetooth/profile_supervisor.cpp
+++ b/src/core/src/bluetooth/profile_supervisor.cpp
@@ -1,4 +1,5 @@
#include "tether/bluetooth/profile_supervisor.hpp"
+#include "tether/bluetooth/objects.hpp"
#include "tether/log.hpp"
#include <tether/i18n.hpp>
@@ -70,7 +71,7 @@ namespace tether::bluetooth {
return ObexError::Other;
}
- std::string obex_error_advice(ObexError error, const std::string& profile) {
+ std::string obex_error_advice(ObexError error, const std::string& profile, bool ertm_disabled) {
const bool map = profile == "map";
// TRANSLATORS: the feature name Tether shows for this profile.
const std::string label = map ? _("Messages") : _("Contacts");
@@ -91,6 +92,12 @@ namespace tether::bluetooth {
label,
profile);
case ObexError::NoRecord:
+ // obexd reports its own failed ERTM connect as a missing record too
+ if (ertm_disabled)
+ // TRANSLATORS: {} is Messages or Contacts.
+ return tr_format(_("{} cannot connect because the kernel has L2CAP ERTM disabled "
+ "(bluetooth.disable_ertm). Run tether --bt-setup; nothing is wrong on the iPhone."),
+ label);
// obexd reports a missing record whenever its SDP fetch is refused, so the real cause is usually one layer
// down.
// TRANSLATORS: {0} is Messages or Contacts, {1} is an iPhone Settings toggle name.
@@ -201,9 +208,9 @@ namespace tether::bluetooth {
status_.reason = _("Messages and contacts are connected.");
} else if (!status_.map_open && status_.map_error != ObexError::None) {
// MAP is the feature people notice, so its problem leads.
- status_.reason = obex_error_advice(status_.map_error, "map");
+ status_.reason = obex_error_advice(status_.map_error, "map", l2cap_ertm_disabled());
} else if (!status_.pbap_open && status_.pbap_error != ObexError::None) {
- status_.reason = obex_error_advice(status_.pbap_error, "pbap");
+ status_.reason = obex_error_advice(status_.pbap_error, "pbap", l2cap_ertm_disabled());
} else {
status_.reason = _("Opening messages and contacts...");
}
diff --git a/test/test_bluetooth_objects.cpp b/test/test_bluetooth_objects.cpp
index e8eafe8..53e7e9b 100644
--- a/test/test_bluetooth_objects.cpp
+++ b/test/test_bluetooth_objects.cpp
@@ -281,6 +281,19 @@ TEST(Capability, FullModeWhenBearerConfirmed) {
EXPECT_TRUE(cap.setup.empty());
}
+TEST(Capability, DisabledErtmIsASetupStep) {
+ Payload p(join(ADAPTER_FULL, IPHONE_BONDED).c_str());
+ const auto objects = parse_managed_objects(p.v);
+
+ EXPECT_TRUE(resolve_capability(objects).setup.empty());
+
+ const auto cap = resolve_capability(objects, std::nullopt, {}, true);
+ EXPECT_TRUE(cap.ertm_disabled);
+ EXPECT_EQ(cap.mode, DeliveryMode::Full);
+ ASSERT_EQ(cap.setup.size(), 1u);
+ EXPECT_NE(cap.setup[0].command.find("disable_ertm"), std::string::npos);
+}
+
TEST(Capability, SecureConnectionsStateIsInjectedRatherThanReadDuringResolution) {
Payload p(join(ADAPTER_FULL, IPHONE_BONDED).c_str());
const auto objects = parse_managed_objects(p.v);
diff --git a/test/test_bluetooth_supervisor.cpp b/test/test_bluetooth_supervisor.cpp
index a811852..ebd17dd 100644
--- a/test/test_bluetooth_supervisor.cpp
+++ b/test/test_bluetooth_supervisor.cpp
@@ -562,6 +562,15 @@ TEST(ObexErrors, ServiceRecordMissingIsNotAPermissionProblem) {
EXPECT_NE(advice.find("re-pairing is not the fix"), std::string::npos);
}
+// With bluetooth.disable_ertm set, obexd's L2CAP connect fails locally and is
+// reported as a missing record; blaming the phone toggle sends the user nowhere.
+TEST(ObexErrors, DisabledErtmIsNamedInsteadOfThePhone) {
+ const std::string advice = obex_error_advice(ObexError::NoRecord, "pbap", true);
+ EXPECT_NE(advice.find("disable_ertm"), std::string::npos);
+ EXPECT_EQ(advice.find("Sync Contacts"), std::string::npos);
+ EXPECT_EQ(advice.find("another computer"), std::string::npos);
+}
+
TEST(ObexErrors, ClassifiesUnavailableAndOther) {
EXPECT_EQ(classify_obex_error("Host is down"), ObexError::Unavailable);
EXPECT_EQ(classify_obex_error("Page Timeout"), ObexError::Unavailable);