Comp-490-SeniorProject / site

MIT License
0 stars 1 forks source link

Configure AWS IoT Core with ESP8266 WifiBee #23

Open AyeZian opened 3 years ago

AyeZian commented 3 years ago

The tutorial to connect the AWS with the ESP8266 can be found here. You'll need to create an AWS account, as well as download the Arduino IDE and prepare it to download code to the ESP8266. The tutorial uses a different model of the ESP8266, however, the process to connect the two should still be similar.

AyeZian commented 3 years ago

Making the AWS account was pretty straight forward. First year is free to make an account, there's only a $1 fee so that AWS can verify the card being used is valid. The $1 charge does not go through, so it should go away after 3-5 business days. There were a few things I thought the group should decide on. Mainly if we were going to create a certificate, what permissions we were going to allow, and how we would manage the account.

As for the setup of the WifiBee-ESP8266, there are some libraries that need to be installed which are found here. After running however, there are some compiling errors that popped up that pertained to the code from one of the packages that needed to be installed. This is something I still need to look into.

AyeZian commented 3 years ago

These are the errors that pop up for me.

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Users\zyrel\OneDrive\Documents\Arduino\libraries\aws-mqtt-websockets\AWSWebSocketClient.cpp: In member function 'char* AWSWebSocketClient::generateAWSPath(uint16_t)':

C:\Users\zyrel\OneDrive\Documents\Arduino\libraries\aws-mqtt-websockets\AWSWebSocketClient.cpp:210:16: error: no match for 'operator+=' (operand types are 'String' and 'char [( + 1)]')

210 | key_credential+=credentialScope;

  |  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

In file included from C:\Users\zyrel\OneDrive\Documents\ArduinoData\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:286,

             from C:\Users\zyrel\OneDrive\Documents\Arduino\libraries\aws-mqtt-websockets\AWSWebSocketClient.h:4,

             from C:\Users\zyrel\OneDrive\Documents\Arduino\libraries\aws-mqtt-websockets\AWSWebSocketClient.cpp:1:

C:\Users\zyrel\OneDrive\Documents\ArduinoData\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/WString.h:133:17: note: candidate: 'template String& String::operator+=(const T&)'

133 | String &operator +=(const T &rhs) {

  |                 ^~~~~~~~

C:\Users\zyrel\OneDrive\Documents\ArduinoData\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/WString.h:133:17: note: template argument deduction/substitution failed:

C:\Users\zyrel\OneDrive\Documents\Arduino\libraries\aws-mqtt-websockets\AWSWebSocketClient.cpp:210:18: note: variable-sized array type 'char [( + 1)]' is not a valid template argument

210 | key_credential+=credentialScope;

  |                  ^~~~~~~~~~~~~~~

exit status 1

Error compiling for board NodeMCU 0.9 (ESP-12 Module).

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.