All ESP32 iPhone Agent notes
Project-specific notes

These instructions concern ESP32 iPhone Agent by Henry Yuan. Other projects in this index use different firmware, apps and protocols.

View the project profile

Troubleshoot setup & agent runs

Isolate the failed connection instead of starting the whole setup again.

Work through the system in order: firmware → app → Bluetooth → hotspot → mirroring → pointer → model. A successful check at one layer does not prove the next layer is working.

Recent reports: keyboard, idle video and Windows

  • Check the build: #173 has landed. Verify dual input in 1.0.8, older-phone support in 1.0.9 and result saving in 1.0.10 against your installable build.
  • App connected, pointer missing: app commands and AssistiveTouch HID pairing are separate links. Check the antenna, separate power, AssistiveTouch and mouse pairing. Restart mirroring and calibrate after switching inputs. Web reinstalls erase pairing; forget the old device in iOS and pair again.
  • Picture stuck after a long Bluetooth session: the official guide recommends restarting Screen Mirroring. The idle/GOP report #169 still needs logs from both ends; larger buffers do not prove every freeze fixed.
  • Windows scan still fails: #170 is open. On November 20 the maintainer said a Windows device check was still to come. Include CLI build, board, firmware and scan output; #155 is not a universal fix.
  • Actions loop without effect: #166 remains open. New guards cannot guarantee completion; stop and inspect unchanged screens and actions.

1.0.10 holds a Send / Reply / Post tap once after incomplete input; another tap can still proceed. This is neither content review nor a guaranteed block. These are source and report findings, not this site’s reproduction. See model setup for model-list loading.

The board does not appear over USB

Use a known USB data cable and check arduino-cli board list. Confirm the connection reaches the S3’s native USB port. If necessary, use the vendor’s bootloader procedure and retry the firmware script.

If the script complains about its path, move your project checkout to a path without spaces. Its compiler include flag requires this.

Older scripts could switch even an explicit port to the first board after reset. Fix #21 reached main on October 19, 2026; update to source containing commit 133ead5. Explicitly select the target when several devices are connected. If the script reports a missing port or several new ports, disconnect other devices and check the target before retrying. With older source, leave only the intended board connected. See the flashing guide.

Xcode cannot sign the app

Verify DEVELOPMENT_TEAM and IA_BUNDLE_ID in ios/Config/Local.xcconfig, then read Xcode’s actual provisioning message.

For a free team, optional capabilities can prevent provisioning. The example config supports blank IA_ENTITLEMENTS and IA_WIDGET_ENTITLEMENTS values to build without the optional entitlement files. You then join the hotspot manually. Follow the app installation guide rather than copying another developer’s signing settings.

If a previously installed free-account build stops launching after seven days, re-sign and reinstall it from Xcode.

The app crashes repeatedly at launch

Distinguish an expired signature from a crash after launch. Logs mentioning EXC_BREAKPOINT, MainActor.assumeIsolated, DebugLog.relay, or CrashReports.didReceive may match a fixed MetricKit callback bug: forwarding a diagnostic log from a background thread triggered a main-thread assertion on repeated launches.

Upstream merged fix #16 on October 17, 2026, as commit 6dec6a6. Update to source containing that commit, retain your signing configuration, and rebuild and install the app. This app fix does not require reflashing the board. The contributor reported verification on an iPhone 16 Pro; this site has not repeated that device test. Investigate other crashes from their actual logs.

If the app closes right after a board restart or firmware update with usage statistics enabled, 1.0.6 build 17 fixes that crash in #161. It corrects the board-restart event and drops invalid statistics events. This fix does not diagnose other launch crashes.

Bluetooth scanning or pairing times out

  • Confirm the app has Bluetooth permission and the board has power.
  • Keep the board near the phone and avoid shielding it with metal objects.
  • Use the app’s scan/retry controls. Allow the connection check to finish.
  • Check for another app or debugging tool holding a board connection; disconnect it while isolating the issue.

USB enumeration is not a Bluetooth health check. Repeated failures need logs, not an assumption that a powered board must be paired.

CLI 0.1.5 includes #155, which updates tinygo Bluetooth to read full service UUIDs. #170 remains unresolved; the Windows 11/MediaTek report in #114 is a contributor’s environment, not a compatibility matrix. Pair within three minutes of power-on and record the CLI build, firmware, adapter and scan output if devices remain absent.

The phone cannot join the hotspot

Use the current SSID and password shown in your app. If automatic joining is unavailable, open Wi-Fi settings and join manually. Confirm that the phone stays on the board’s network.

The default hotspot has no internet. Check cellular data separately for model access. If using a router, configure the board via the CLI or source build, put the phone on the same network, and check 2.4 GHz support, client isolation and mDNS discovery.

ESP32 Agent is missing from Screen Mirroring

Confirm the hotspot connection first, then reopen Control Center → Screen Mirroring. Verify board connectivity in the app. Keep the phone unlocked; locking stops mirroring.

If the receiver appears but the app receives no useful screen, report the firmware version and logs. Avoid treating a BLE pairing success as proof that the video transport is healthy.

If mirroring is enabled but you see err no video (start screen mirroring) or a preview stuck on the home screen, change screens manually and check whether the preview updates live. In Settings → Diagnostics, record AirPlay kbps, AirPlay fps, and GOP buffered under Video, plus the Snap latency test result. Try disconnecting and reconnecting Screen Mirroring, then scrolling the screen. Keep the diagnostics if the problem persists.

Use the matching TestFlight app and target firmware. In build 17, a start with no fresh image reopens the stream once before asking you to restart Screen Mirroring. If the board has USB but this iPhone does not see a mouse, connect it directly to the target phone and allow the accessory if prompted. Unlock the phone if the app says the USB link is asleep. For a persistent stall, record both versions, preview behavior, the app’s Export trace and board logs from power-on. A source build can enable serial diagnostics with hardware/flash.sh --debug.

Firmware v0.2.5 includes the diagnostics from #132 and #133. A running AirPlay stream waiting for a decodable H.264 keyframe can report err waiting for keyframe; before mirroring starts, an empty buffer still reports err no video. err video frozen is separate. Check ap, fz, ovf and the new lost packet count from #147. Those signals help isolate the cause; they do not guarantee any particular stall is fixed.

The maintainer also linked the reported slow, repeatedly failing runs in issue #29 to a stale preview. Verify that the screen is updating before comparing model latency. Include an error screenshot, preview behavior, board type, flashing method, app/firmware versions, connection distance, and VPN or Low Data Mode settings in your report. Those settings are diagnostic details, not established general causes.

If the preview works but is slow, check Local Network permission in iOS Settings → Privacy & Security. Denying it can make the app fall back from Wi-Fi video to BLE. Enable ESP32 Agent there, reopen the app and restart Screen Mirroring.

A Mac connects to AirPlay but sends no video

Current board firmware supports an iPhone as the AirPlay source, not macOS Screen Mirroring. In issue #46, the contributor compared macOS 26.3.1 on a MacBook Air with an iPhone 14 on iOS 26 using firmware 680d227: only the iPhone delivered video. This is that contributor’s report, not our device test or a compatibility matrix; the FairPlay explanation in the discussion is not an established root cause.

Merged on October 28, #50 and the wording follow-up #51 add a one-time diagnostic after roughly five seconds without a valid H.264 codec configuration following a mirror data connection:

mirror: no video 5s after connect (AirPlay source must be an iPhone; macOS mirroring is not supported)

The final code tests for a valid SPS/PPS configuration, not every possible video packet; a malformed configuration or unsupported codec can also leave that flag unset. The log is a diagnostic, not a repair or proof of the source device. To get it, rebuild and reflash firmware containing d986bed; an app-only update is insufficient. Test mirroring from the iPhone and record kbps/fps and the board log. This change does not fix the separately reported iPhone keyframe issue.

Taps miss their targets

Enable AssistiveTouch and repeat the app’s pointer calibration without touching the screen. Use portrait orientation and start with a large target such as a Settings row.

If the pointer moves correctly but the chosen target is wrong, inspect the screenshot and model action in the run replay. That may be a perception or planning error rather than a calibration error.

If a calibration fails, set AssistiveTouch tracking speed to the middle and turn Pointer Animations off before trying again. The 1.0.4 release includes #125: a check tap off by more than 6% discards the new calibration and restores the previous one. If taps still miss, include the AssistiveTouch settings and failing trace.

The model test fails

Check the base URL, API key, exact model ID, and image support. Model-list access does not prove that a model can process images. While on the board’s hotspot, the endpoint must be reachable through cellular data.

For a 401 response, check for leading or trailing spaces in the key, enter it accurately, save, and test again. If it persists, check account permissions and the endpoint address. Keep keys out of public reports and screenshots. If a cleared key reappears when you switch providers, see saved key removal and affected versions.

Use model setup to separate authentication errors, missing models, rejected images, and network timeouts.

For a computer-hosted legacy server, see the separate temperature rejection and 429 retry behavior. Those October 21 fixes do not establish the same behavior in the current iPhone app.

If HTTP 400 names temperature, check the iOS parameter fix and affected versions. If the optional free line returns busy/503, retry later or select your own image-capable API in Settings → Model.

Chinese candidates or Japanese input fail

1.0.13 now treats system 9-key Pinyin hardware letters as full pinyin, rather than switching it away as in 1.0.11. It commits composing pinyin before Return in Spotlight and stops treating a still-open Spotlight as a successful app launch. Chinese typed while the source is English is checked again instead of leaving raw pinyin. Older 1.0.11 builds may try ctrl+space once and stop if system Pinyin is unavailable. This does not establish third-party IME, Japanese, emoji or general Unicode HID support. Check the editor and final text; #141’s acknowledged clipboard path remains a separate pending proposal.

Old main ASCII-only descriptions and independent VoicePilot experiments remain version-specific; they do not mean 1.0 lacks a Chinese path. The legacy Universal Clipboard change #24 instead needs a Mac, the same Apple Account and Handoff. It is separate from 1.0 Pinyin; see architecture and versions.

Report a reproducible problem

Include your board variant, iPhone and iOS version, source revision, signing setup, and the exact failed step. For model problems, include the provider and model ID, never your API key.

Export a relevant run trace or log and inspect it for personal content before attaching it. Use the upstream security policy for security reports.

Startup and landscape changes in 1.0.11

1.0.11 stops startup when mirroring is connected but the board receives no picture for 30 seconds (GOP 0, 0 fps), with a prompt to restart mirroring. Source recognizes a board joined to this iPhone’s own Personal Hotspot, but upstream says iOS sends no mirrored picture on that route; use another router network. This differs from ordinary LAN mode and does not prove all video freezes are fixed.

1.0.11 corrects landscape target mapping on iPhone and learns landscape landings separately; use portrait first on older builds. iPad calibrates per orientation and needs full screen. In 1.0.11, Let Me Use the Pointer lists AssistiveTouch, mouse pairing and mirroring checks separately and offers a likely cause after 20 seconds on a step. It does not grant system permissions automatically.

1.0.13 Check Up and remaining CLI failures

In 1.0.13, Settings › Check Up checks board, firmware, power, Bluetooth mouse, mirroring, visible pointer and model. Can You See the Pointer? moves the board’s pointer around a card and asks whether you see it. A USB-input board on a charger still needs a data connection to the phone, or a switch to Bluetooth and mouse pairing. Send Report sends check results and the app log to the developer; inspect diagnostic content before sharing. Source fixes an iOS 16 Home list crash and Home-button iPhone Bluetooth navigation, without establishing universal compatibility.

CLI 0.1.5 / #194 keeps calibration per phone and marks fallback taps verified: false; esp32agent io tap X,Y --aim --strict refuses a tap when the pointer is not found. #200 remains open: a contributor on Windows 10, iPhone XS Max/iOS 18.7.10 and firmware 0.2.9 reports CLI calibration failure although app calibration works. The captured calibration error preceded the switch to hotspot mode; collected hotspot diagnostics were not a new calibration test. Record fresh screenshot age (vage), pointer visibility, input mode and matching logs. ap=streaming, fz=0 or hid=ok alone do not prove fresh video or working calibration. 0.2.10 addresses #199 Mac HID slot capture; it does not prove #200 resolved.

New firmware, OTA and long tasks

0.2.13–0.2.16 address different faults: computers no longer bond as keyboards, the CLI can take over after the app closes, the web Playground gains a USB serial link, 0.2.15 enlarges the BLE send stack after a heap-corruption reboot, and 0.2.16 moves AirPlay task stacks to PSRAM to leave more internal heap. The heap figures come from the maintainer’s Manina04 / iPhone 13 Pro sample, not this site or a device matrix. They do not establish that open video reports are fixed.

An early dual board without ota: 1 needs one USB reinstall before app updates; check the update conditions before clearing pairings. For USB absolute input after landscape apps, or experimental BLE absolute input, see pointer limits. Relative input remains the default.

1.0.14 removes the 12-step cutoff for unbounded saved-intent parts and hands stalled work to the model. It also records Safari/Spotlight rereads, notification-aware text verification, feed-loop and repair-progress fixes. Build 30 is still under review; these are source/release claims, not device results reproduced here. Unicode PR #141 and the new CLI coordinate/gesture PRs #229–232 remain unmerged.

macOS CLI launch failure and unreleased fixes

#224 reports CLI 0.1.5 failing before MCP initialization on an older Mac. Main now sets a macOS 12 deployment target, but the public CLI manifest still serves 0.1.5 with the same checksums. Likewise, #212 pins Go 1.26.11 for standard-library security fixes and #213 updates the Python server lockfile. These merged source fixes do not rebuild already published binaries or prove their findings cleared. Use the release checksum and version; a source build is a separate choice.

Project sources

cli/internal/pointer/pointer.gocli/internal/app/app.goios/IPhoneAgent/App/HealthCheck.swiftREADME.mdhardware/flash.shhardware/hid_bridge/video_link.cppdocs/ble-protocol.mdios/Config/Local.xcconfig.exampleios/IPhoneAgent/App/AppModel.swiftios/IPhoneAgent/Agent/HanTyper+InputSource.swiftCHANGELOG.mdios/IPhoneAgent/UI/DiagnosticsView.swiftSECURITY.mdios/IPhoneAgent/Services/Analytics.swift