# WmsPrinter **Repository Path**: mao-chonghao/wms-printer ## Basic Information - **Project Name**: WmsPrinter - **Description**: 个人物品管理系统配套的二维码标签打印终端 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-17 - **Last Updated**: 2025-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WmsPrinter #### 介绍 个人物品管理系统配套的二维码标签打印终端 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) # ESP32 WiFi管理器 这是一个基于ESP32的WiFi管理器,使用WiFiManager库和LittleFS文件系统实现配网功能。 ## 功能特点 - 首次启动时自动进入配网模式 - 配网信息保存在LittleFS文件系统中 - 支持通过按钮重置WiFi设置 - 自动重连WiFi - 简单易用的API ## 硬件要求 - ESP32开发板 - 重置按钮(可选,默认使用GPIO0/BOOT按钮) ## 软件依赖 - Arduino框架 - [WiFiManager库](https://github.com/tzapu/WiFiManager) - [ArduinoJson库](https://arduinojson.org/) - [LittleFS_esp32库](https://github.com/lorol/LITTLEFS) ## 使用方法 ### 基本使用 ```cpp #include "WifiManager.h" void setup() { Serial.begin(115200); // 初始化WiFi管理器 WifiManager.init(); // 连接到WiFi WifiManager.connect(); } void loop() { // 处理WiFi事件(自动重连等) WifiManager.handleEvents(); } ``` ### 配网流程 1. 首次启动时,ESP32会创建一个名为"ESP32_WMS_Printer"的WiFi接入点 2. 使用手机或电脑连接到该接入点,密码为"12345678" 3. 连接成功后,浏览器会自动打开配置页面(或手动访问192.168.4.1) 4. 在配置页面中选择要连接的WiFi网络并输入密码 5. 点击保存,ESP32会连接到指定的WiFi网络 6. 配置信息会保存在LittleFS文件系统中,下次启动时自动连接 ### 重置WiFi设置 长按BOOT按钮(GPIO0)可以重置WiFi设置,ESP32会重启并进入配网模式。 ## 文件结构 - `include/WifiManager.h` - WiFi管理器头文件 - `src/WifiManager.cpp` - WiFi管理器实现文件 - `src/main.cpp` - 示例主程序 ## 自定义配置 可以在`WifiManager.h`文件中修改以下配置: - `AP_NAME` - 配网模式下的WiFi名称 - `AP_PASSWORD` - 配网模式下的WiFi密码 - `PORTAL_TIMEOUT` - 配网模式超时时间(毫秒) - `WIFI_CONFIG_FILE` - 配置文件在LittleFS中的路径 ## 许可证 MIT 测试时修改了print.cpp 屏蔽了蓝牙打印的两个if判断