Repository navigation
ESP32 touch box 1.1.0
ESP32 触控盒 community.esp32 1.1.0 是 GameScrcpy 的社区扩展:把一块 ESP32 开发板变成手机的外接触摸屏、键盘、鼠标和手柄,手机不需要打开 USB 调试。它原是 GameScrcpy 2.0 内置的 ESP32 触控盒,从 GameScrcpy 2.1 起搬出主程序,只用 GameScrcpy 公开的扩展接口。这是它作为社区扩展的第一个版本,以 Apache-2.0 许可发布。
下载
| 文件 | 说明 |
|---|---|
community.esp32-1.1.0.gsext |
扩展包:扩展本身(esp32.dll)、面板、帮助,以及六种芯片的 1.1.0 固件 |
扩展包没有签名,安装框会提示“没有签名的原生代码”;扩展用 CreateFile 打开串口、读自带的固件镜像,安装框也可能提示它的代码会读写文件。它不读写你的其它文件。
需要什么
- Windows 10 / 11(x64)上的 GameScrcpy 2.1 或更新的版本(原生扩展接口第 2 版)。GameScrcpy 2.0 用不了这个扩展。
- 一块至少 4 MB 闪存的开发板:ESP32-S3、S2、P4 经 USB 接手机;经典 ESP32、C3、C6 经蓝牙接手机。
- 电脑经蓝牙连板子时:电脑要有低功耗蓝牙(自带或 USB 适配器),板子是经典 ESP32、C3、C6 或 S3,固件 1.1 或更新。
这一版有什么
- 作为扩展的触控盒:找到的板子作为触控盒出现在 GameScrcpy 的设备页:“控制”不看画面直接操作手机,“设置”打开这块板子的窗口(试一下、固件、Wi-Fi、蓝牙、名称、诊断),“更多”里有刷写固件、诊断和断开。板子也可以和采集卡配对。
- 固件 1.1.0:给 ESP32-S3、S2、P4、经典 ESP32、C3、C6 六种芯片,随扩展附带,在扩展里就能刷写;扩展带着更新的固件时,板子的窗口会提示升级。
- 电脑经低功耗蓝牙连板子(新):经典 ESP32、C3、C6 与 S3 装上固件 1.1 后,板子不用再接电脑的数据线。在板子的窗口里“经蓝牙配对”一次,再把连接方式选成蓝牙;设备页显示蓝牙图标和信号,往返太慢时窗口提示“蓝牙延迟较高”。
- 闲置后不再断开:盒子不出声时会重新询问,必要时切回握手波特率再升回高速,闲置几分钟后的第一下触控不再失败;日志写明触控为什么没到板子、串口为什么出错。
- 给逻辑与面板用的接口
ext.community.esp32:节点boards()、bluetooth()、ports()、firmware()等,长任务flash、wifi、rename、diagnose、scan、pair、unpair,以及board.added、flash.progress、bluetooth.changed等事件。 - 帮助:接线、什么时候按 BOOT、各种提示的意思,都在 GameScrcpy 帮助页的“扩展”一组里。
怎么安装
- 下载
community.esp32-1.1.0.gsext,在 GameScrcpy 的“扩展”页选“从文件安装”,同意它要的权限:使用你选的设备(串口、蓝牙与刷写)、在设备页加设备、使用网络(只用于在局域网里经 Wi-Fi 找板子)。 - 把板子的串口接到电脑,它作为触控盒出现在“设备”页。
- 新板子或旧固件的板子:在扩展卡片的“设置”里选它的串口,点“刷写固件”。
- 想让投屏中的手机经板子触控:在那台手机的设置里把触控方式选成 ESP32,并在这个扩展的手机设置里选串口、Wi-Fi 或蓝牙,以及地址。
- 想用 Wi-Fi 或蓝牙:板子接在串口上时,在它的窗口里保存 Wi-Fi 或点“经蓝牙配对”,再改连接方式。
从 GameScrcpy 2.0 的内置 ESP32 换过来
- 2.0 的设置不迁移:手机的触控方式“ESP32”与
esp32.*设置在 2.1 里都不再认(手机回到普通触控,采集卡的触控回到不触控)。装好这个扩展后,重新为手机(和采集卡)选触控方式,并在扩展里重新设置一次板子的 Wi-Fi。 - 板子上 1.0.x 的固件照常能用;电脑经蓝牙连板子要固件 1.1,板子窗口的“固件”里可以升级。
还没有在真板子上核对的
- 固件 1.1.0 里电脑与板子之间的低功耗蓝牙连接。
- 刷写 1.1.0 固件。
- S3 与 C6 板子。
- 经典 ESP32 同时开着 Wi-Fi 与蓝牙时的稳定性(这块芯片的内存余量最小)。
遇到问题请到 https://github.com/NuoRan/GameScrcpy-ESP32 报告,附上 GameScrcpy “设置 › 关于 › 导出诊断包”生成的文件。
English
The ESP32 touch box community.esp32 1.1.0 is a GameScrcpy community extension: it turns an ESP32 development board into the phone's plugged-in touch screen, keyboard, mouse and gamepad, so the phone needs no USB debugging. It used to be the ESP32 touch box built into GameScrcpy 2.0; from GameScrcpy 2.1 on it lives outside the program and uses only GameScrcpy's public extension interfaces. This is its first release as a community extension, under Apache-2.0.
Download
| File | What it is for |
|---|---|
community.esp32-1.1.0.gsext |
The extension package: the extension itself (esp32.dll), its panels and help, and firmware 1.1.0 for six chips |
The package is not signed, so the install dialog warns about unsigned native code; the extension opens serial ports with CreateFile and reads its own firmware images, so the dialog may also say that its code reads and writes files. It touches no other files.
Requirements
- GameScrcpy 2.1 or later on Windows 10 / 11 (x64), for native extension interface 2. GameScrcpy 2.0 cannot run this extension.
- A board with at least 4 MB of flash: an ESP32-S3, S2 or P4 on the phone's USB port, or a classic ESP32, C3 or C6 on the phone's Bluetooth.
- For the computer to reach the board over Bluetooth: Bluetooth LE on the computer (built in or a USB adapter) and a classic ESP32, C3, C6 or S3 with firmware 1.1 or later.
What is in it
- The touch box as an extension: boards show up on GameScrcpy's Devices page as touch boxes: Control works the phone without a picture, Settings opens the board's window (Try it, firmware, Wi-Fi, Bluetooth, name, diagnosis), and More holds Flash firmware, Diagnose and Disconnect. A board can also be paired with a capture card.
- Firmware 1.1.0 for six chips (ESP32-S3, S2, P4, classic ESP32, C3, C6), shipped with the extension and flashed from it; when the extension brings newer firmware, the board's window offers the upgrade.
- Bluetooth LE between the computer and the board (new): a classic ESP32, C3, C6 or S3 with firmware 1.1 no longer needs a cable to the computer. Choose Pair over Bluetooth once in the board's window, then choose Bluetooth as the connection; the Devices page shows a Bluetooth icon and the signal, and the window says "Bluetooth delay is high" when round trips get slow.
- No more drops after idling: when the box goes quiet it is asked again, at the handshake speed if needed, and the fast speed is negotiated back, so the first touch after a few idle minutes no longer fails; the log says why a touch did not reach the board and why a serial port failed.
- An interface for logic and panels,
ext.community.esp32: nodes such asboards(),bluetooth(),ports()andfirmware(), the jobsflash,wifi,rename,diagnose,scan,pairandunpair, and events such asboard.added,flash.progressandbluetooth.changed. - Help: wiring, when to hold BOOT and what the messages mean, in the Extensions group of GameScrcpy's Help page.
Installing
- Download
community.esp32-1.1.0.gsext, choose Install from file on GameScrcpy's Extensions page and allow what it asks for: the devices you choose (serial ports, Bluetooth and flashing), adding devices to the Devices page, and the network (only to reach boards over Wi-Fi on your local network). - Plug the board's serial port into the computer; it shows up on the Devices page as a touch box.
- For a new board or one with old firmware, pick its serial port in the extension card's Settings and click Flash firmware.
- To touch a mirrored phone through the board, choose the touch method ESP32 in that phone's settings, and the serial port, Wi-Fi or Bluetooth, with the address, in this extension's settings for that phone.
- For Wi-Fi or Bluetooth, save the Wi-Fi or choose Pair over Bluetooth in the board's window while it is on the serial port, then change the connection.
Coming from the built-in ESP32 of GameScrcpy 2.0
- The settings of 2.0 are not carried over: the touch method "ESP32" and the
esp32.*settings are no longer known in 2.1 (phones go back to normal touches, and a capture card's touches to none). Once this extension is installed, choose the touch method again for each phone (and capture card) and set up the board's Wi-Fi once more in the extension. - Boards with firmware 1.0.x keep working; Bluetooth between the computer and the board needs firmware 1.1, which Firmware in the board's window can install.
Not yet checked on a real board
- Bluetooth LE between the computer and the board in firmware 1.1.0.
- Flashing firmware 1.1.0.
- S3 and C6 boards.
- A classic ESP32 with Wi-Fi and Bluetooth on at the same time (the chip with the least memory to spare).
Please report problems at https://github.com/NuoRan/GameScrcpy-ESP32 and attach the file made by GameScrcpy's "Settings › About › Export diagnostics".
SHA-256
bd3b285e54d4f43a6c50f9cd6d3bbc826c299a472ce53d8e3dc925c061fed3c0 community.esp32-1.1.0.gsext