From 93ca4e79f7d3d373e84839fde861e2a3cf88a974 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Fri, 13 Nov 2026 09:04:15 -0600 Subject: [PATCH] Drop the untested data-length suggestion from the MTU advice LE Write Suggested Default Data Length was offered for a 4.2+ radio that still negotiates an ATT MTU of 185, which nobody has run into. The one Pi 4 that reported a radio older than its board was missing BCM4345C0.hcd, and installing the firmware is what fixed it. Point the runtime error at the firmware note instead, and leave the dongle and -transport impossible as the advice that has actually worked. --- README.md | 9 +-------- pkg/bluetooth/bluetooth.go | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 82c4b53..88c9ad7 100644 --- a/README.md +++ b/README.md @@ -222,14 +222,7 @@ hciconfig # find the dongle, usually hci1 ./pod -mode o5 -fresh -hci 1 ``` -On a 4.2+ radio that still settles on 185, telling the controller to offer a long data -length at connection setup is worth a try (the command does not exist before 4.2): - -``` -sudo hcitool -i hci0 cmd 0x08 0x0024 fb 00 48 03 # LE Write Suggested Default Data Length -``` - -Failing all of that, `-transport impossible` serves an app in the iOS Simulator over a +Failing that, `-transport impossible` serves an app in the iOS Simulator over a socket, which carries whole packets and has no ATT MTU, so the radio stops mattering — see [Run against the iOS Simulator](#run-against-the-ios-simulator). diff --git a/pkg/bluetooth/bluetooth.go b/pkg/bluetooth/bluetooth.go index 22e5f73..6314fc6 100644 --- a/pkg/bluetooth/bluetooth.go +++ b/pkg/bluetooth/bluetooth.go @@ -372,9 +372,9 @@ func (b *Ble) MTUShortfall() error { return fmt.Errorf("the phone negotiated an ATT MTU of %d, below the %d an %s packet needs, "+ "so its writes would be truncated. A phone asks for more only of a Bluetooth 4.2 or "+ "later radio: check this one with `hciconfig hci0 version`, and if it is older, plug "+ - "in a 4.2+ dongle and name it with -hci (it will not be hci0). On a 4.2+ radio, "+ - "`sudo hcitool -i hci0 cmd 0x08 0x0024 fb 00 48 03` is worth a try. Or run the app in "+ - "the iOS Simulator over -transport impossible, which has no MTU", + "in a 4.2+ dongle and name it with -hci (it will not be hci0). A Pi that reports "+ + "older than it should be is usually missing its Bluetooth firmware: see the README. "+ + "Or run the app in the iOS Simulator over -transport impossible, which has no MTU", mtu, needed, b.profile.Mode.Description()) }