Rainmaker setup for Visual Studio on Mac

colinives
Posts: 37
Joined: Tue Mar 03, 2020 2:53 pm

Rainmaker setup for Visual Studio on Mac

Postby colinives » Wed Mar 03, 2021 4:23 pm

I'm trying to get example code running on Visual Studio Code on my MacBook (M1, Big Sur).

Clean install of ESP-IDF and runs ok via VS Code
================
.profile:
export IDF_PATH=~/esp/esp-idf
export PATH="$IDF_PATH/tools:$PATH"
PATH=$PATH:/esp/esp-idfx/esp-rainmaker/cli
================
C/C++ Configurations
${config:idf.espIdfPath}/components/**
${config:idf.espIdfPathWin}/components/**
${workspaceFolder}/**
${config:idf.espIdfPath}/esp-rainmaker/components/**
${config:idf.espIdfPathWin}/esp-rainmaker/components/**
================

eep-rainmaker clones to:

esp/esp-idf/esp-rainmaker

================

esp-rainmaker examples added to the esp/esp-idf/examples folder
Example but from one of these using the ESP-IDF-how examples utility and stored under documents.

================

When compiling the builder can't find any of the rainmaker files - bombs out at:
../main/app_main.c:17:10: fatal error: esp_rmaker_core.h: No such file or directory
#include <esp_rmaker_core.h>

which is on the paths (see above)

Any ideas on what environment variable I'm missing??

Thank you

ESP_Piyush
Posts: 259
Joined: Wed Feb 20, 2019 7:02 am

Re: Rainmaker setup for Visual Studio on Mac

Postby ESP_Piyush » Wed Mar 03, 2021 5:31 pm

The default CMakeLists.txt file in RainMaker examples have the relative paths for the RainMaker components. Since you have moved the example to esp-idf examples, the build system can no more find these. Please modify this line in your example's CMakeLists.txt appropriately

Code: Select all

set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../../components ${CMAKE_CURRENT_LIST_DIR}/../common)
Most probably, you will have to change the line as below

Code: Select all

set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/../esp-rainmaker/components ${CMAKE_CURRENT_LIST_DIR}/../esp-rainmaker/examples/common)
Please also check if the discussion on this github issue helps.

colinives
Posts: 37
Joined: Tue Mar 03, 2020 2:53 pm

Re: Rainmaker setup for Visual Studio on Mac

Postby colinives » Wed Mar 03, 2021 6:00 pm

Thanks very much for that - it's now running on my ESP32 Wrover but I'm getting QR Code invalid from the IOS App - had to use the URL via a browser to get a clean image but get "Error: QR Code is Invalid"

Th image looks clean. I'm assuming I can't post the QR code or payload due to secrecy issues? I'd provision via BLE/AP but I'd like to get the QR code working.

IS the issue that I'm not using an ESP32-S2??

ESP_Piyush
Posts: 259
Joined: Wed Feb 20, 2019 7:02 am

Re: Rainmaker setup for Visual Studio on Mac

Postby ESP_Piyush » Wed Mar 03, 2021 7:00 pm

It is perfectly fine to use ESP32 Wrover, you need not have an ESP32-S2. For ESP32, BLE provisioning gets used by default.

The error message could actually be misleading (and will be fixed shortly). Even if the QR code is correct, you may get this error if the BLE device is not found. Have you tried the manual workflow? Do you find the device in the BLE scan list?

If you do not find it in the scan list, please double check that the device is not already connected to the phone. Even a simple reboot of the device will disconnect it, and then you can retry.

Who is online

Users browsing this forum: No registered users and 39 guests