diff --git a/README.cn.md b/README.cn.md new file mode 100644 index 0000000..f812036 --- /dev/null +++ b/README.cn.md @@ -0,0 +1,85 @@ +# wireless-esp32-tools 网页用户界面 + +本项目是 [wireless-esp32-tools](https://github.com/kerms/wireless-esp32-tools) 项目的网页用户界面。 + +`wireless-esp32-tools` 项目为多种ESP芯片提供了兼容CMSIS-DAP的无线调试工具,可将ESP芯片变为一个功能强大的无线调试器。 + +## 关于此网页界面 + +此Web应用程序提供了一个用户友好的仪表板,用于管理您的 `wireless-esp32-tools` 设备并与之交互。它采用 Vue.js 3、Vite 和 Element Plus 构建,并设计为直接托管在 ESP32 上。 + +通过此界面,您可以构建一个自定义的仪表板来监控目标设备并与之交互。 + +### 主要功能 + +* **Wi-Fi配置**:包括终端模式(STA)和热点模式(AP),支持静态/动态IP地址分配和DNS设置。 +* **动态组件仪表板**:一个完全灵活的基于网格的面板。 +* **实时数据可视化**:包括一个用于监控目标设备串行通信的UART数据查看器。 +* **嵌入式优先设计**:部署为单个.html文件以减少http连接数。 +* **适用于小屏幕设计**:响应式布局适配移动设备和平板电脑,具有触摸友好的控件和针对小屏幕优化的UI元素。 + +## 界面截图 + +**组件面板** + + +**UART数据显示** + + +## 使用说明 + +### 最终用户 + +1. 将您的计算机或移动设备连接到运行 `wireless-esp32-tools` 的ESP32所承载的Wi-Fi网络。 +2. 打开Web浏览器并导航到ESP32设备的IP地址(例如 `http://dap.local` 或 `http://192.168.1.1`(连接AP的情况下))。 + +### 开发人员 (针对此Web UI) + +请按照以下步骤设置项目以进行本地开发或构建以进行部署。 + +#### 环境准备 + +* [Node.js](https://nodejs.org/) (v16 或更高版本) +* [npm](https://www.npmjs.com/) + +#### 本地开发 + +1. **安装依赖:** + ```sh + npm install + ``` +2. **运行开发服务器:** + ```sh + npm run dev + ``` + 这将在本地启动一个服务器,通常地址为 `http://localhost:5173`。 + +3. **为移动/远程调试运行:** + 要从同一网络上的其他设备(如手机)访问开发服务器,请使用: + ```sh + npm run devh + ``` + 这将把服务器暴露给您的本地网络(例如 `http://192.168.X.X:5173`)。 + +#### 构建生产版本 (部署到ESP32) + +1. **构建项目:** + ```sh + npm run build + ``` + 此命令将编译和打包应用程序到 `dist/` 目录,生成 `index.html` 和 `ws.sharedworker.js`。 + +2. **压缩输出文件:** + 进入 `dist/` 目录并使用gzip压缩构建产物。 + ```sh + cd dist + gzip * + ``` + 这将生成 `index.html.gz` 和 `ws.sharedworker.js.gz`。 + +3. **部署到ESP32:** + 将压缩后的 `.gz` 文件复制到您的 `wireless-esp32-tools` ESP-IDF项目中的相应目录(例如 `project_components/html/`),然后将固件刷入您的设备。 + +## 许可证 + +根据MIT许可证分发。更多信息请参见 `LICENCE.txt` 文件。 \ No newline at end of file diff --git a/README.md b/README.md index aaa15da..46ddc3d 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,87 @@ -# 允斯无线透传器的内嵌网页版上位机 +# Web UI for wireless-esp32-tools -此项目使用`NPM`包管理, 需要先安装`node`工具。 +This is the web user interface for the [wireless-esp32-tools](https://github.com/kerms/wireless-esp32-tools) project. -# 环境准备步骤 +The `wireless-esp32-tools` project provides CMSIS-DAP compatible wireless debugging tools for various ESP chips, turning them into powerful wireless debug probes. -##### 本地测试: +## About This Web Interface -1. `npm install` -2. `npm run dev`,或用 `npm run devh` 则可以用其他设备访问,如手机调试移动界面。 -3. 根据显示的地址,使用浏览器打开,默认地址为`localhost:5173`, 或者其他设备访问`192.168.X.X:5173` +This web application provides a user-friendly dashboard to manage and interact with your `wireless-esp32-tools` device. It is built with Vue.js 3, Vite, and Element Plus, and is designed to be hosted directly on the ESP32. -##### 发布至esp32: +From this interface, you can build a customized dashboard to monitor and interact with your target device. -1. `npm install` -2. `npm run build` -> 会在`dist/`生成`index.html`和`ws.sharedworker.js` -3. 在`dist/`里执行`gzip *` -> -> 会在`dist/`生成`index.html.gz`和`ws.sharedworker.js.gz` -4. 至此,可以使用这两个文件覆盖ESP32目录中的`project_components/html`里相对应的文件了。 +### Key Features + +* **Wi-Fi Configuration**: Easily configure Wi-Fi settings including station mode (STA) and access point mode (AP), with support for static/dynamic IP addressing and DNS settings. +* **Dynamic Widget Dashboard**: A fully flexible grid-based panel. +* **Real-time Data Visualization**: Includes a UART data viewer for monitoring serial communication from your target device. +* **Embedded-First Design**: Deploy in single .html file to reduce the number of http connection. +* **Designed to be usable on small screen**: Responsive layout that adapts to mobile devices and tablets, with touch-friendly controls and optimized UI elements for small displays. + +## Screenshots + +**Widget Panel** + + +**UART Data Viewer** + + +## Getting Started + +### For End-Users + +1. Connect your computer or mobile device to the Wi-Fi network hosted by the ESP32 running `wireless-esp32-tools`. +2. Open a web browser and navigate to the IP address of the ESP32 device (e.g., `http://dap.local` or `http://192.168.1.1`(when connected to the AP)). + +### For Developers (of this Web UI) + +Follow these steps to set up the project for local development or to build it for deployment. + +#### Prerequisites + +* [Node.js](https://nodejs.org/) (v16 or later) +* [npm](https://www.npmjs.com/) + +#### Local Development + +1. **Install dependencies:** + ```sh + npm install + ``` +2. **Run the development server:** + ```sh + npm run dev + ``` + This will start a local server, typically at `http://localhost:5173`. + +3. **Run for mobile/remote debugging:** + To access the development server from other devices on the same network (like a mobile phone), use: + ```sh + npm run devh + ``` + This will expose the server to your local network (e.g., `http://192.168.X.X:5173`). + +#### Building for Production (Deploying to ESP32) + +1. **Build the project:** + ```sh + npm run build + ``` + This command compiles and bundles the application into the `dist/` directory, creating `index.html` and `ws.sharedworker.js`. + + There is some bugs on Firefox or Vue3 when embbeding sharedWorker in single file mode. So at the time, the sharedWorker are build separately. + +2. **Compress the output files:** + Navigate into the `dist/` directory and compress the build artifacts using gzip. + ```sh + cd dist + gzip * + ``` + This will generate `index.html.gz` and `ws.sharedworker.js.gz`. + +3. **Deploy to ESP32:** + Copy the compressed `.gz` files to the appropriate directory in your `wireless-esp32-tools` ESP-IDF project (e.g., `project_components/html/`) and flash the firmware to your device. + +## License + +Distributed under the MIT License. See `LICENCE.txt` for more information. diff --git a/assets/uart.png b/assets/uart.png new file mode 100644 index 0000000..3cb6f58 Binary files /dev/null and b/assets/uart.png differ diff --git a/assets/widgetPannel.png b/assets/widgetPannel.png new file mode 100644 index 0000000..ed2f51a Binary files /dev/null and b/assets/widgetPannel.png differ diff --git a/index.html b/index.html index ddb979e..013709d 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -
{{ translate('widget.loopWidgetDesc') }}
+{{ translate('widget.dataViewerDesc') }}
+{{ translate('widget.dropHere') }}
+