GithubHelp home page GithubHelp logo

Comments (6)

nrmka avatar nrmka commented on August 31, 2024

Hi @cheezum , I have the same issue. Which branch in esp-idf do you stay at? At the latest master I get this error. Otherwise, release/v3.3 or v3.2 works fine for me. I tried to investigate the problem and stopped somewhere at the socket level:

getsockopt(fd, SOL_SOCKET, SO_ERROR, &sock_errno, &optlen);

returns zero (the newest version) instead EAGAIN (release version), so the program stops to wait/try-again-to-read response from the server and fails handshake.

from esp-azure.

cheezum avatar cheezum commented on August 31, 2024

I'm using the master (v4.0-dev-1434).
I'll try to revert and let you know what happened.

UPDATE: My code won't compile anymore on v3.3. I probably changed too much. I'll try another older v4.0 dev version.

from esp-azure.

chhajedji avatar chhajedji commented on August 31, 2024

try compiling on v3.3 only as support for any release of v4.0 is not yet added. For reference you can check this. Generally these steps solves many issues

from esp-azure.

cheezum avatar cheezum commented on August 31, 2024

Does it mean I have to revert back to 'make' instead of CMake?
It was pretty much a pain to switch to CMake and I don't want to go back to Make.
Now when I try to build (with CMake) on v3.3 with the latest esp-azure it gives me a lot of missing header files.

from esp-azure.

chhajedji avatar chhajedji commented on August 31, 2024

Support for CMake is not added yet. It will be added in future versions. So currently you will have to use make only.

from esp-azure.

cheezum avatar cheezum commented on August 31, 2024

Yes I did.
My folder structure is like this:
~/esp
~/esp/Interface2/
~/esp/esp-idf/
~/esp/esp-idf/components/
~/esp/esp-idf/components/esp-azure

To fetch the v3.3 I did:
git clone --single-branch --branch release/v3.3 https://github.com/espressif/esp-idf.git --recursive
After that I cloned the esp-azure into components/
~/esp/esp-idf/components > git clone --recursive https://github.com/espressif/esp-azure

After cloning, I need to copy the CMakelists.txt file from esp-azure/port to esp-azure/ and modify it to:

set (AZURE_IOT_SDK "${CMAKE_CURRENT_LIST_DIR}/azure-iot-sdk-c")

set (COMPONENT_ADD_INCLUDEDIRS
"port/inc"
"${AZURE_IOT_SDK}/certs"
"${AZURE_IOT_SDK}/c-utility/inc"
"${AZURE_IOT_SDK}/c-utility/inc/azure_c_shared_utility"
"${AZURE_IOT_SDK}/c-utility/pal/inc"
"${AZURE_IOT_SDK}/c-utility/pal/freertos"
"${AZURE_IOT_SDK}/c-utility/pal/generic"
"${AZURE_IOT_SDK}/iothub_client/inc"
"${AZURE_IOT_SDK}/serializer/inc"
"${AZURE_IOT_SDK}/umqtt/inc"
"${AZURE_IOT_SDK}/umqtt/inc/azure_umqtt_c"
"${AZURE_IOT_SDK}/deps/parson"
"${AZURE_IOT_SDK}/provisioning_client/inc"
"${AZURE_IOT_SDK}/provisioning_client/adapters"
"${AZURE_IOT_SDK}/provisioning_client/deps/utpm/inc"
)

set (COMPONENT_SRCS
"port/src/agenttime_esp.c"
"port/src/platform_esp.c"
"port/src/tlsio_esp_tls.c"
"${AZURE_IOT_SDK}/certs/certs.c"
"${AZURE_IOT_SDK}/c-utility/pal/freertos/lock.c"
"${AZURE_IOT_SDK}/c-utility/pal/dns_async.c"

Here, I removed the ../ from the CMAKE_CURRENT_LIST line and place port/ in front of the src and inc folder.

After this I try to compile but then the compiler is unable to find nvs_flash.h, nvs.h and iothub_client.h.
The files are all referenced by custom code (~/esp/Interface2/main/helpers/)

The examples from both ESP-IDF and ESP-AZURE do compile.

from esp-azure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.