# esp32_firmware **Repository Path**: cndisk/esp32_firmware ## Basic Information - **Project Name**: esp32_firmware - **Description**: 自定义 ESP32 固件下载仓库 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2021-12-04 - **Last Updated**: 2021-12-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ESP32 自定义固件下载 ### 项目介绍 主要用于集成一些常用的模块,减少占用用户存储并增加一些功能 ### 固件说明 ```docs 编译日期:2021-05-10 MicroPython 版本:v1.15-83-g9eea51b73 ESP-IDF 版本:v4.1.1 引导日志级别:info 默认日志级别:info 输出调试信息:否 集成模块列表: ble: \profile \services \characteristics \descriptors \const.py \tools.py umqtt: \simple.py \robust.py MicroWebSrv2(v2.0.6) MicroWebSrv.py microDNSSrv.py mqtt_async.py logging.py urequests.py ``` * `MicroWebSrv2`和`MicroDNSSrv`模块使用方法[代码片段](https://gitee.com/walkline/esp32_firmware/blob/code_snippet/MicroWebSrv2&MicroDNSSrv.py) * `MicroWebSrv`模块使用方法[代码片段](https://gitee.com/walkline/esp32_firmware/blob/code_snippet/MicroWebSrv_snippet.py) * `mqtt_async`模块使用方法[代码片段](https://gitee.com/walkline/esp32_firmware/blob/code_snippet/mqtt_async_snippet.py) * `logging`模块使用方法[代码片段](https://gitee.com/walkline/esp32_firmware/blob/code_snippet/logging_snippet.py) * `urequests 模块`增加超时参数,使用方法如下: ```python import urequests result = urequests.get("www.baidu.com", timeout=3.0) print(result.text) ``` > 集成模块代码自动补全文件访问 [Code-Completion for RT-Thread plugin](https://gitee.com/walkline/code-completion-for-rtt-plugin) 查看详情 ### 扇贝物联新用户专用固件 [20200313 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_bigiot_esp32_idf3_20200313_v1.12.bin): * 固件版本`1.12-256` * 集成的模块除`固件说明`中提到的,还包含了 [WeatherStation](https://gitee.com/walkline/WeatherStation/tree/feature%2Fbigiot_beginning/) 项目用到的一些模块 ### 实验性固件下载 * [20201021 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_test_esp32_idf3_ble_logw_core0_20201021_v1.13.bin): * 根据此[commit](https://github.com/micropython/micropython/pull/6447/commits/5590395343176c75374a3a0cf7340b6fe8e77f60)给`ble`增加了`gap_pair()`配对函数,测试中 * [20200508 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200508_v1.12.bin): * 基于`20200506 固件`生成 * 为`ubluetooth.BLE`增加`start_pairing()`函数,参数为`conn_handle` * 只提供了配对绑定功能,未提供保存绑定凭据功能 | 状态 | 预览 | | :-: | :-: | | 配对 | ![](images/pairing.png) | | 已绑定 | ![](images/bonded.png) | ### 固件下载 * [20210510 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf4_ble_logw_core0_20210510_v1.15.bin): * 更新`MicroPython`版本到`v1.15` * 更新`IDF`版本到`v4.1.1` * [20201016 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20201016_v1.13.bin): * 修改固件分区表,在偏移量`0x3ff000`划分一个`4k`大小分区,以备后用 * [20200907 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200907_v1.13.bin): * `MicroPython`版本更新到`v1.13` * 增加`mqtt_async`模块,一个新的[MQTT 客户端](https://github.com/tve/mqboard) * 增加`logging`模块,配合`mqtt_async`模块使用的`log`模块 * [20200721 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200721_v1.12.bin): * 更新了`ubluetooth`的`irq`常量 * [20200718 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200718_v1.12.bin): * 更新`MicroWebSrv2`模块 * 增加`MicroWebSrv`模块,解决`MicroWebSrv2`占用资源过多的问题 * [20200506 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200506_v1.12.bin): * `IDF`更新到`3.3.2` * 文件系统更换为`VfsLfs2` * [20200320 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200320_v1.12.bin): * 新增集成模块`ble\profile`:`profile`模块,用于封装 BLE 服务,下同 * 新增集成模块`ble\services`:`services`模块 * 新增集成模块`ble\characteristics`:`characteristics`模块 * 新增集成模块`ble\descriptors`:`descriptors`模块 * [20200315 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200315_v1.12.bin): * 删除集成模块`ble_advertising` * 新增集成模块`ble\const`:`ble`相关的一些常量 * 新增集成模块`ble\tools`:`ble`相关的一些工具 * [20200312 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200312_v1.12.bin): * 更新固件到`1.12-256`,官方更新了`ble.gap_scan()`回调函数返回值 * [20200304 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200304_v1.12.bin): * 去掉`ble`默认的 2 个`Generic Access Service` * [20200301 编译(2)](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_core0_20200301_v1.12.bin): * 再次将`ble`绑定改到`Core 0`,原因是和其它模块的`schedule`有冲突,并且可以提升`ble`开启速度 * `ble.set_device_name()`确定无效,目前只能通过修改源文件进行修改设置 * [20200301 编译(1)](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_20200301_v1.12.bin): * 将`ble`绑定改回`Core 1`默认值 * `ble`增加`set_device_name()`函数用于修改蓝牙显示固定名称,默认为`'ESP32'` * 更新固件到`1.12-210` * 更改`log 级别`为`info` * [20200220 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_20200220_v1.12.bin): * 将`ble`绑定到`Core 0`,预期目的不明,可能后果不详,谨慎下载,后续可能会改回`Core 1`默认值 * [20200216 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_20200216_v1.12.bin): * 更新固件到`1.12-169` * [20200214 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_20200214_v1.12.bin): * 增加 BLE 辅助模块`ble_advertising.py` * 删除无用文件 * [20200207 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_logw_20200207_v1.12.bin): * 更改`log 级别`为`info`,不显示上电启动信息 * [20200202 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_ble_20200202_v1.12.bin): * 更新固件到`1.12-120` * 增加`BLE`支持,详情参考 [官方文档](http://docs.micropython.org/en/latest/library/ubluetooth.html) * [20200103 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_20190103_v1.12.bin): * 更新固件到`1.12-35` * [20191217 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_idf3_20191217_v1.11.bin): * 编译文件修改为从 [官方项目](https://github.com/micropython/micropython) 克隆,之前为第三方分支 * [20191203 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_20191203_v1.11.bin): * 更新`MicroWebSrv2`到`2.0.6`,修复了 WebSocket 接收字符串长度的 bug * [20191126 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_20191126_v1.11.bin): * 更新`MicroWebSrv2`到`2.0.5` * 增加`MicroDNSSrv`模块 * [20191125 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_20191125_v1.11.bin): * 集成`MicroWebSrv2`模块 * 修改`urequests`增加超时参数 * [20191122 编译](https://gitee.com/walkline/esp32_firmware/raw/master/firmware/wh_esp32_20191122_v1.11.bin): * 测试集成模块编译,修改固件启动显示名称等 ### MicroPython Change Log [Change Log](https://micropython.org/resources/micropython-ChangeLog.txt) ### 附录1:如何刷写固件 推荐使用:[esp_pyflasher](https://github.com/youxinweizhi/esp_pyflasher)([下载地址](https://github.com/youxinweizhi/esp_pyflasher/releases/download/windows/FlashTool.exe),[备用下载](https://gitee.com/walkline/esp_pyflasher/releases)) ![screenshot_01](images/screenshot_01.png) #### 刷写固件 将`固件文件`和`FlashTool`下载后放到同一个文件夹,运行`FlashTool`,并按照如下设置: * Board: `esp32` * Com Port: 板子对应的串口号 * Firmware: 下拉选择最新固件 * 勾选`Erase` 最后点击`Flash`按钮等待完成即可 > **提示:** 有些开发板不支持自动下载,点击按钮后则需要手动按住开发板上的`Flash`或`Boot`按钮进入下载模式,连接成功后即可松开按钮 ### 附录2:部署`MicroPython`开发环境 访问 [一键部署 MicroPython 开发环境](https://gitee.com/walkline/one-key-deployment-micropython) 查看部署开发环境说明