Teach droidplug to indicate and to ask for a bigger MTU
Two Android-only BLE defects, both of which BlueZ hides and both of which made a working Click pod look like broken hardware. droidplug writes ENABLE_NOTIFICATION_VALUE to the CCCD whatever the characteristic supports. A characteristic that indicates but does not notify rejects that write, so the Click's Sync TX channel (00000004-19ca-…, read/indicate) failed to subscribe on every pod with "Unable to write descriptor". The patch picks the value from the characteristic's properties. droidplug also never calls requestMtu, so Android stayed at the 23-byte default and a notification carried 20 bytes. The pods send up to 106. Anything longer arrived truncated mid-field and failed to parse, which looks exactly like a pod that has gone quiet — the frames were being cut off, not withheld. Requesting 517 settles at 251 against this hardware, and a 105-byte frame now arrives whole. Both are applied by the sync script after it lifts the Java out of the crate, each guarded by a grep that fails the sync loudly if upstream moves the line rather than silently producing an unpatched build. Also ignore the .gradle cache that IDE Gradle daemons drop into src-tauri/android/app, which they mistake for a project root because of the build.gradle.kts template living there. Verified on the tablet: no subscribe failures, longest Click frame 105 bytes where the cap was 20, and both paddles shifting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,12 @@ src-tauri/target/
|
||||
# scripts/sync-android-sources.sh after every init.
|
||||
src-tauri/gen/
|
||||
|
||||
# src-tauri/android/ is source, but it holds a build.gradle.kts with no
|
||||
# settings.gradle beside it, so any Gradle daemon that scans the tree — an IDE's,
|
||||
# not the wrapper's — mistakes that directory for a project root and drops a
|
||||
# cache in it. Nothing it writes is ours.
|
||||
src-tauri/android/**/.gradle/
|
||||
|
||||
# Android signing material. A keystore in the repo is a signing key given away;
|
||||
# CI writes both of these from secrets.
|
||||
*.jks
|
||||
|
||||
Reference in New Issue
Block a user