Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

AzureIoTSocket_WiFi library is missing #102

Closed
Saleh-Elhalaby opened this issue Jan 13, 2020 · 12 comments
Closed

AzureIoTSocket_WiFi library is missing #102

Saleh-Elhalaby opened this issue Jan 13, 2020 · 12 comments
Assignees

Comments

@Saleh-Elhalaby
Copy link

Hi guys
I was trying to connect my esp32 to azure iot hub.
but when installing AzureIoTSocket_WiFi from the library manger in arduino i couldn't find it
as this guid said https://github.com/azure/azure-iot-arduino
and on compiling of course this error pops up "fatal error: AzureIoTSocket_WiFi.h: No such file or directory".
i tried to search for the missing library but i had no luck finding it.

@blueish4
Copy link

It seems like the repo isn't available any more, but there is a copy of the library at https://github.com/Azure/azure-iot-pal-arduino/tree/master/build_all/base-libraries/AzureIoTSocket_WiFi

I'm pretty sure this is just an issue with the ESP32 platform, since the ESP8266 and SAMD code in the AzureIoTUtility library (which fails to compile here) doesn't reference it - probably because it only acts as an include for the platform appropriate wifi library.

@jbobotek
Copy link
Contributor

jbobotek commented Jan 23, 2020

Yes, the current process to obtain this library is to do so manually, by running the make_sdk.py to build the libraries and add them to your Arduino libraries folder.

Instructions are here: https://github.com/Azure/azure-iot-pal-arduino/blob/master/build_all/base-libraries/AzureIoTHub/README.md#prerequisites

@jbobotek jbobotek self-assigned this Jan 23, 2020
@Saleh-Elhalaby
Copy link
Author

Thanks guys
i will go and try your solutions

@ReneHezser
Copy link

ReneHezser commented Mar 31, 2020

Yes, the current process to obtain this library is to do so manually, by running the make_sdk.py to build the libraries and add them to your Arduino libraries folder.

Instructions are here: https://github.com/Azure/azure-iot-pal-arduino/blob/master/build_all/base-libraries/AzureIoTHub/README.md#prerequisites

@jbobotek Can we make the libraries available through the library manager? It is an extra hassle to go though building them manually :-(
And you can easily forget this step which is frustrating :-(

@Tintin4000
Copy link

Hi, would you please be able to assist with a step by step description on how to build the library? I have downloaded the repo, went into build_all as described in the Prerequisites, however there is no make_sdk.py file so I am a little stuck. Thank you for your help.
This issue is closed so I am not sure if it makes sense to comment on it?

@jbobotek
Copy link
Contributor

Did you git clone the pal-Arduino repo linked above?

@Tintin4000
Copy link

Tintin4000 commented Apr 21, 2020

Hi jbobotek, I did git clone the pal-arduino now. While trying to build I got the following error:

File "make_sdk.py", line 196, in
run()
File "make_sdk.py", line 106, in run
dir_util.copy_tree(azure_iot_sdk_path + 'iothub_client/src/', sdk_path)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python38\lib\distutils\dir_util.py", line 123, in copy_tree
raise DistutilsFileError(
distutils.errors.DistutilsFileError: cannot copy tree 'C:\Users\xxxxx\Documents\Arduino\azure-iot-pal-arduino/sdk/iothub_client/src/': not a directory.

I presume I need to git clone the entire sdk at some specific location? As I said first time doing this, so not that experienced.

@jbobotek
Copy link
Contributor

Yes. Call git submodule update --init --recursive.

@jbobotek
Copy link
Contributor

or git clone --recursive <this-repo.git>

@Tintin4000
Copy link

Hi jbobotek, I am maybe one step further but still not there. After using git clone --recursive https://github.com/Azure/azure-iot-pal-arduino.git, I have now a combination of the repo here above and the sdk. However when I run python make_sdk.py -o C:\Users\xxxxx\Documents\Arduino\Azure-iot-arduino, I still get the following error, since there is no such "inc" dir in the iothub_client.
File "make_sdk.py", line 196, in
run()
File "make_sdk.py", line 107, in run
dir_util.copy_tree(azure_iot_sdk_path + 'iothub_client/inc/', sdk_path)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python38\lib\distutils\dir_util.py", line 123, in copy_tree
raise DistutilsFileError(
distutils.errors.DistutilsFileError: cannot copy tree 'C:\Users\xxxx\Documents\Arduino\azure-iot-pal-arduino/sdk/iothub_client/inc/': not a directory

@jbobotek
Copy link
Contributor

This means that the submodules weren't actually downloaded. The folder exists: https://github.com/Azure/azure-iot-sdk-c/tree/master/iothub_client/inc Try the other command while in the git repo.

@Tintin4000
Copy link

After cloning a second time, the "inc" directory appeared and I could compile the library. Thank you so much for your help, I learned a lot. Now my code is breaking but one thing at the time ;-). I will try the example and get started again from there. Thx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants