【问题标题】:Connecting ESP32 to Google Cloud IoT Core (using Google Cloud IoT Device SDK and ESP-IDF)将 ESP32 连接到 Google Cloud IoT Core(使用 Google Cloud IoT Device SDK 和 ESP-IDF)
【发布时间】:2020-03-24 07:14:22
【问题描述】:

我正在尝试将数据从 Google Cloud Firestore(通过 Google Cloud IoT Core)发送到 ESP32 设备。我已经关注this guide,使用谷歌批准的谷歌云物联网设备SDK和ESP-IDF方式的选项。 the linked Github readme 对此进行了介绍。

我已经安装了 Cloud IoT Device SDK 和 ESP-IDF,并且已经让 ESP-IDF 的 hello-world 示例正常工作。但是我在尝试配置 wifi 设置时遇到了困难(在“自述文件中的编译时间常数”标题下)。 make menuconfig 在 ESP-IDF 项目文件夹中有效,例如hello-world 示例,即打开菜单。但我找不到 Wifi(“WiFi SSID”、“WiFi 密码”)或 Google Cloud IoT Core(“项目 ID”、“位置”、“注册表 ID”和“设备 ID”)的设置。是否甚至在 ESP-IDF 中也能找到这些设置?

我应该补充一点,我没有像指南中那样使用 BME280 传感器,而只是想确保首先在设备和 Google Cloud 之间建立某种连接。

我也没有做任何事情来让 ESP32 连接到 wifi,如果这与它有关(在指南中没有明确说明,所以我认为它可能完全一样)。

任何想法我做错了什么?

【问题讨论】:

    标签: google-cloud-firestore esp32 google-cloud-iot


    【解决方案1】:

    为了查看 wifi 的设置,您需要有一个包含变量的 Kconfig 文件。如果添加以下代码,您应该会在 Menuconfig -> Example Configuration 中看到 wifi 设置

    menu "Example Configuration"
    
    config ESP_WIFI_SSID
        string "WiFi SSID"
        default "myssid"
        help
        SSID (network name) for the example to connect to.
    
    config ESP_WIFI_PASSWORD
        string "WiFi Password"
        default "mypassword"
        help
        WiFi password (WPA or WPA2) for the example to use.
    
    endmenu
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-27
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-11
      • 1970-01-01
      • 2018-09-26
      相关资源
      最近更新 更多