# Micropython SmartConfig CModule
**Repository Path**: im623/micropython-smartconfig-cmodule
## Basic Information
- **Project Name**: Micropython SmartConfig CModule
- **Description**: 为 MicroPython 提供 SmartConfig 相关功能
- **Primary Language**: C
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 2
- **Created**: 2024-02-09
- **Last Updated**: 2024-02-09
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
MicroPython SmartConfig CModule

### 项目介绍
为`MicroPython`提供`SmartConfig`相关功能
### 添加模块
* 将`ports/`文件夹复制到`MicroPython`项目对应位置
* 使用如下命令编译固件:
```bash
cd micropython/ports/esp32
make USER_C_MODULES=../cmodules/micropython.cmake
```
### 如何使用
参考项目目录下`main.py`文件中的代码,同时还可以 [前往B站](https://www.bilibili.com/video/BV1N34y1971S/) 观看配网演示视频
### 模块方法列表
* `start()`:开启配网功能
* `success()`:获取配网信息状态
* `True`:表示已获取配网信息
* `False`:表示未获取到配网信息
* `info()`:获取配网信息,返回值包含如下信息:
```python
('ssid', 'password', 'sc_type', 'token')
```
### 模块常量列表
* `TYPE_UNKNOWN`:配网类型`未知`
* `TYPE_ESPTOUCH`:配网类型为`ESPTouch`
* `TYPE_AIRKISS`:配网类型为`AirKiss`
### 参考资料
* [smartconfig Example](https://github.com/espressif/esp-idf/tree/master/examples/wifi/smart_config)
* [ESP32-C3 MicroPython 固件编译环境搭建教程](https://gitee.com/walkline/esp32-c3_micropython_firmware)
* [WSL 下加速 Github 克隆速度](https://walkline.wang/blog/archives/263)
### 合作交流
* 联系邮箱:
* QQ 交流群:
* 走线物联:[163271910](https://jq.qq.com/?_wv=1027&k=xtPoHgwL)
* 扇贝物联:[31324057](https://jq.qq.com/?_wv=1027&k=yp4FrpWh)

