Skip navigation
Updated: A $7 ESP32 lets an AI agent control a stock iPhone. THAT'S ALL.
0:00 / 1:40

Updated: A $7 ESP32 lets an AI agent control a stock iPhone. THAT'S ALL.

Henry

@iamhenryyuan1.7K followers

Visit on X
813 likesDownloadOriginal post

64,604 views

Updated: A $7 ESP32 lets an AI agent control a stock iPhone. THAT'S ALL. New version, no Linux box, no laptop. The ESP32 takes the iPhone's AirPlay screen and taps back over USB. We also built a very cute agent app that works together with the ESP32 to automate any iPhone. Use your own model. Fully open source.

44 Comments

Comments from the original post on X (Twitter)

  • Henry's profile picture

    @iamhenryyuan

    Setup is just: plug in the chip, join its Wi-Fi from the app, tap Screen Mirroring.

    26 likes

  • Henry's profile picture

    @iamhenryyuan

    Code and setup guide: The old computer version is still there: tag v0.1.0 and the legacy branch. It's the first version, so expect some bugs. Issues and PRs welcome.

    61 likes

  • Chris Reynolds's profile picture

    @ChrisByBoston

    Nice!!! I’ve been doing so much hardware hacking recently. Time to order more ESP32. My clanker found these 3 packs for $18, or $6 a piece:

    11 likes

  • Henry's profile picture

    @iamhenryyuan

    LFG🔥

    1 like

  • E1ev3n.'s profile picture

    @harden_369741

    $7 to automate a stock iPhone is absurd in the best way. I have burned entire weekends on janky Appium setups and this little board just sidesteps all of it.

    8 likes

  • Henry's profile picture

    @iamhenryyuan

    Thanks! Funny thing: while building this, the AI kept telling me it couldn't be done. Then I pushed the board to its limits and it turned out it could. The goal is that you don't need extra hardware or an "AI phone": with one chip, most iOS devices can be made smart.

    14 likes

  • E1ev3n.'s profile picture

    @harden_369741

    The funniest part is the AI telling you it couldn't be done, because that's exactly the moment I'd normally believe it and quit. I've burned weekends trusting the model when it said no, and half the time the fix was just pushing past its confidence. One chip and no AI phone is the right pitch, hardware lists kill momentum.

  • MrRobot's profile picture

    @haozige5

    你好,请问手机负责屏幕数据处理和大模型处理,这个通过airplay和esp32通讯的意义在哪

    4 likes

  • Henry's profile picture

    @iamhenryyuan

    iOS 沙盒下,一个 App 看不到也点不了别的 App。所以走外设通道: 看:屏幕镜像投给 ESP32。BLE 只有几百 kbps,所以让 iPhone 直接按 480×1040、≤5fps 编码,ESP32 不解码,H.264 码流原样经 BLE 转给 App。板子用 4MB PSRAM 缓存最近一组画面,丢包就从关键帧重发,不花屏。 点:ESP32 是 USB HID 鼠标键盘,配合辅助触控。点击和视频共用一条 BLE,固件按控制器发送额度给视频限流,点击永远插队。 鼠标是相对移动,App 自己记坐标,定期推回角落归零,精细点击前先晃一下指针找偏差。每步用板子的采集时间戳判断画面是否停稳,再告诉模型“刚才屏幕有没有变”,点空了会重试。 板子自己开热点,镜像直连,模型走蜂窝,不用越狱。

    19 likes

  • MrRobot's profile picture

    @haozige5

    牛逼!跪了大佬,这思路,这门槛,太JB牛逼了!

    1 like

  • Tekholms.aptm's profile picture

    @adsilva264

    Bot farms are going to go crazy over this

    4 likes

  • SunsetSyntax's profile picture

    @sunsetsyntax

    With the mirror capped at 480x1040 and 5 fps, have you tried a small local vision model as the actor and a bigger one as the planner? Curious if tap accuracy holds on tiny targets like the Clock wheel at that resolution.

    2 likes

  • Henry's profile picture

    @iamhenryyuan

    Yes, the app already has separate planner and actor slots, so you can point each at a different model (any OpenAI-compatible endpoint). At 480x1040 the model reads most of the screen fine, and small targets like the Clock wheel work best with pointer calibration and checking whether the screen changed after each tap.

    1 like

  • David Schainker's profile picture

    @schainks

    Huh, this is cool! You should be able use my fork of and iPhone control from Mac OS to do this too. Gonna try now! Also, if I’m not mistaken, Apple lets us build apps that do phone control for accessibility, but not as a general use case, hence your app.

    1 like

  • catman's profile picture

    @catmanyau

    The neat part is the ESP32 bridges AirPlay video from the iPhone with USB taps back to it, so there’s no Linux box or laptop in the loop.

    1 like

  • Henry's profile picture

    @iamhenryyuan

    Exactly, that's the whole trick. Thanks for putting it so cleanly. If you try it on an old iPhone, tell me how it goes.

  • catman's profile picture

    @catmanyau

    what role does the old iPhone play here—running the copies or just monitoring them?

  • Crazyox🌶️(微微辣版)'s profile picture

    @crazyox

    下单了,太想玩了,拼多多涨价了70🤣

    1 like

  • Bruce 聊 AI's profile picture

    @xx0602440222838

    冲着你讲英语,关注

    1 like

  • Isaac's profile picture

    @IsaacLatterell

    You can just do this on your mac with iphone control

    1 like