1. 环境搭建Set up Enviroment
参考网址https://mongoose-os.com/software.html,安装mos tool
2. 下载代码,在svn服务器上Svn\esp32_mongoose\google-iot-c
3. 编译:打开window cmd,进入代码根目录,输入mos build --platform esp32
4. 刷机
4.1 Esp32连接usb,查看Serial端口号,如未显示正常,需下载Driver安装,路径:https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
4.2 Serial端口显示正常后,输入mos flash开始刷机
5. 输入mos,连接Esp32并配置Wifi(如图,Flash部分省略,已在第4步进行)
6. Setup Google IoT Core,此步我已在服务器创建esp32-voice-assistant,可省略,参考https://mongoose-os.com/docs/cloud/google.md
7. Register device on Google IoT Core,在mos web界面Terminal输入如下指令(如图):
mos gcp-iot-setup --gcp-project esp32-voice-assistant --gcp-region europe-west1 --gcp-registry iot-registry
8. 登录Google IoT Core Console,将会看到设备连接状态(如图)
9. 可设置Level级别,查看更多想要的log,并Save configuration(如图)
10. 参考文献
- Mongoose Documents 和Example App参考:https://mongoose-os.com/docs/quickstart/apps.md
- Mongoose os apps source code: https://github.com/mongoose-os-apps
- Mongoose OS: https://github.com/cesanta/mongoose-os 和 https://github.com/cesanta/mongoose
- Mongoose OS lib: https://github.com/mongoose-os-libs/