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

Connect the board, screen & pointer

Complete the four setup checks in the iPhone app.

After flashing the firmware and installing the app, connect the board to your iPhone. The phone powers the board. Keep the phone unlocked throughout setup and your first run.

Start below with USB and the default hotspot. App 1.0.7+ offers home Wi-Fi setup in the app; this is no longer only a developer test build. Join the phone and board to the same 2.4 GHz network to use Wi-Fi for model traffic too.

Source steps are pinned to v1.0.14 (4786f42). On December 3 the official changelog lists 1.0.13 build 29 in TestFlight and 1.0.14 build 30 in Beta App Review; check the build offered on your phone. TestFlight XIAO firmware is v0.2.16. Default flash.sh now builds USB and Bluetooth in one image; USB starts with the relative pointer, with optional absolute input. See installation and firmware for OTA and older-board limits.

1. Pair over Bluetooth

Open ESP32 Agent and follow Plug Me In. Allow Bluetooth access when iOS asks, select the board, and complete pairing.

Wait for the app to confirm the connection. A powered board or a visible USB device does not prove the app has established its encrypted Bluetooth link. If scanning or pairing fails, move the phone and board closer and use the retry controls in the app.

1.0.8 / dual-input v0.2.7 incorporates #94. On a standard XIAO, choose USB or Bluetooth in Settings › Board › Input. The board restarts; start Screen Mirroring again. Bluetooth mode powers the board separately from a USB charger or power bank, with nothing plugged into the phone. Lightning phones need no camera adapter in this mode, and the phone’s charging port stays free.

Check two links: select the board in the app and accept iOS pairing, then pair it as a mouse/keyboard under Settings › Accessibility › Touch › AssistiveTouch › Devices › Bluetooth Devices. An app connection does not prove pointer readiness. Keep AssistiveTouch on and recalibrate. Bluetooth Home uses a gesture or the system AssistiveTouch path; video still uses Wi-Fi. See the official Bluetooth guide.

2. Join the board’s Wi-Fi hotspot

Follow Let Me See the Screen. With the required Hotspot Configuration capability, the app can request the connection. Otherwise, open iOS Wi-Fi settings and join manually with the hotspot name and password shown by the app.

Use the credentials from your own board; there is no universal password in this guide. A “no internet” indication is expected for the board’s hotspot. Model traffic needs cellular data.

3. Start screen mirroring

Open Control Center → Screen Mirroring → ESP32 Agent. In 1.0, the board forwards AirPlay video to the app over Wi-Fi TCP (7201); BLE carries commands and status.

Confirm that the phone is still on the board’s hotspot. For a router setup, configure the board and join the same Wi-Fi on the phone. The hardware guide covers both the source option and the CLI network command.

1.0.7 adds iPad support and firmware v0.2.6 fixes stale frames after rotation. Use LAN mode for a Wi-Fi-only iPad. macOS mirroring remains unsupported. Old invitation wording does not override newer source or prove beta distribution.

4. Enable and calibrate the pointer

Open Settings → Accessibility → Touch → AssistiveTouch and turn on AssistiveTouch. Return to the setup flow and follow Let Me Use the Pointer.

Let automatic calibration finish without touching the screen. The system uses a mouse pointer rather than a direct touchscreen interface, so accurate calibration matters for small targets. 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.

5. Connect the model

In Give Me a Brain, supply your endpoint, API key, and model. Use the model setup guide to check that the selected model actually accepts images.

Run and recover

Try a small task such as opening the Wi-Fi settings page. Watch the screen, and stop from the Dynamic Island when available or return to the app.

The agent pauses if it loses the board, hotspot, or mirror. Restore the missing connection and follow the app’s recovery controls. A repeated failure should be investigated as a specific link problem; see troubleshooting.

Mirroring connects but no picture arrives

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.

Check the visible pointer before a task

1.0.13 adds Check Up and Pointer Check; build 29 is listed in TestFlight. A green Bluetooth link is not proof of a visible pointer. In Settings › Board use Can You See the Pointer?, confirm the moving dot, then calibrate. Firmware 0.2.10 restricts the keyboard target to bonded phones previously identified through the app, preventing a Mac keyboard pairing from occupying the slot; an upgraded board with no recorded phone initially retains the old bonded-peer fallback. Connect the intended phone through the app and pair its Bluetooth mouse. Restart mirroring after changing input mode.

USB absolute pointer and recording are optional

App 1.0.13 build 29 and firmware 0.2.11 add Settings › Board › Pointer for a unified XIAO in USB mode. Since 0.2.12, USB starts Relative; an existing choice is kept. Choosing Absolute restarts the board and skips calibration, but AssistiveTouch and a visible-pointer check remain necessary. Bluetooth keeps relative input: #203 records stuck input with experimental absolute BLE. USB calibration and Bluetooth calibration are separate; switching links requires a matching calibration. #209 reports wrong-way USB absolute gestures after landscape apps in build 29. The changelog says a later build fixes it, but the issue remains open and this site has not verified a device fix. Choose Relative if affected.

For iOS 27+ Screen Recording, check the build and sharing conditions before skipping the AirPlay steps. Ordinary source builds and unsupported devices keep mirroring.

Project sources

hardware/hid_bridge/ble_link.cppios/IPhoneAgent/App/HealthCheck.swiftREADME.mdCHANGELOG.mdios/IPhoneAgent/App/AppModel.swiftios/IPhoneAgent/App/HotspotJoin.swift