Skip to content

Conversation

@aentinger
Copy link
Contributor

@aentinger aentinger commented Aug 8, 2019

This pull request adds support for the ESP8266 to be used with the Arduino IoT Cloud utilizing user/password authentification with the cloud.

If you want to try this feature out you must follow the following steps:

  • Checkout the corresponding branch of Arduino_ConnectionHandler which contains the necessary changes to support ESP8266 user/pass login git clone https://github.com/arduino-libraries/Arduino_ConnectionHandler -b esp8266-user-pass-login
  • A example sketch is available under examples/ArduinoIoTCloud_ESP8266
    • Set your ARDUINO_CLOUD_DEVICE_ID, ARDUINO_CLOUD_DEVICE_PASS and THING_ID as well as your WIFI data SECRET_SSID and SECRET_PASS

Requires arduino-libraries/Arduino_ConnectionHandler#1

@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the esp8266-user-pass-login branch from bc6843c to 3275bff Compare August 8, 2019 09:21
@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the esp8266-user-pass-login branch from a3b08b0 to c32fcad Compare August 12, 2019 06:39
@TravisBuddy

This comment has been minimized.

@aentinger
Copy link
Contributor Author

I don't know how the codacy/PR quality review was added to the CI build (maybe @per1234 or @gvarisco can shed some light on that) but I strongly suggest to remove it. I've got no intention of working through the useless formatting suggestions for README.md, with the value of those suggestions nearing zero.

@TravisBuddy

This comment has been minimized.

@gvarisco
Copy link

I don't know how the codacy/PR quality review was added to the CI build (maybe @per1234 or @gvarisco can shed some light on that) but I strongly suggest to remove it. I've got no intention of working through the useless formatting suggestions for README.md, with the value of those suggestions nearing zero.

Removed it.

@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the esp8266-user-pass-login branch from 2a5ed56 to 42aed61 Compare August 13, 2019 04:40
@TravisBuddy

This comment has been minimized.

@aentinger aentinger force-pushed the esp8266-user-pass-login branch from e943d5e to 9b70fbe Compare August 13, 2019 05:00
@TravisBuddy

This comment has been minimized.

@TravisBuddy

This comment has been minimized.

@aentinger
Copy link
Contributor Author

Branch successfully tested with ESP8266 based board and MKR1000. @ubidefeo Can you please try it out with a MKRGSM1400?

@arduino-libraries arduino-libraries deleted a comment from TravisBuddy Aug 19, 2019
ubidefeo and others added 9 commits September 16, 2019 14:33
… now handled by 'Arduino_ConnectionHandler' and 'Arduino_DebugUtils'
…l function for ArduinoCloudBearSSL. The ArduinoCloudBearSSL function for getting the time is set within 'ArduinoIoTCloud::begin' already.
…ble for the static non-member 'getTime' function by exploiting the fact that ArduinoIoTCloudClass is anyway a global variable within the file
…lass::setIoTConnectionState' since it served mostly the purpose of printing debug messages
…ficate without verification and therefore susceptible to MITM attacks. This has been a mgmt decision since the other option would have been that the ESPs will not be able to connect to the ArduinoIoTCloud anymore when the leaf certificate is exchanged (which happens once/year or even sooner than that). Unfortunately the ESP8266 does not have the capability to verify the whole chain of trust which is the reason why the verification of the leaf certificate has been the option used in the first place - despite breaking minimum once/year.
@aentinger aentinger force-pushed the esp8266-user-pass-login branch from e77a048 to 6d0d5ed Compare September 16, 2019 12:33
@eclipse1985
Copy link
Contributor

eclipse1985 commented Sep 24, 2019

Branch successfully tested with ESP8266 based board and MKR1000. @ubidefeo Can you please try it out with a MKRGSM1400?

Just tested with a GSM 1400 and a NANO 33 IoT, it works

@AlbyIanna
Copy link

I tested the example sketches used in the Getting Started and it worked very well, but there is just a little problem on my side: the message printed on the serial monitor when the board connects to the cloud has changed from "Connected to Arduino IoT Cloud" to "Arduino IoT Cloud Connection status: CONNECTED". This caused the Getting Started to fail on the first try. It's not a big issue to me to change a string, obviously, but I'd really like to make sure that when an important string like that changes, I get informed so that I can change it accordingly on the front-end. Maybe there are other strings that I missed.
A simple solution could be to add some tests to check that the strings I rely don't change, so that when they do, you would that the front-end need to change accordingly.
@lxrobotics what do you think?

@AlbyIanna
Copy link

AlbyIanna commented Sep 24, 2019

Here is a list of the strings I'm checking during the Getting Started:

  • "WiFi Hardware failure"
  • "GPRS attach failed"
  • "No Ethernet chip connected"
  • "Connected to Arduino IoT Cloud"
  • "Connected to", the first time I receive this string, to me it means that the board successfully connected to the network (GSM or WiFi)

@aentinger
Copy link
Contributor Author

Hi @AlbyIanna 👋 sorry for messing with your string evaluation, I was not aware you are using that to determine system state. I've checked the strings you've provided in the above comment against the current implementation:

  • "WiFi Hardware failure" ✔️
  • "GPRS attach failed" ✔️
  • "No Ethernet chip connected" ❌ - Currently there is no support for boards connected via Ethernet, therefore there is no such error message. If that should change we can of course reintroduce this exact error message.
  • "Connected to Arduino IoT Cloud" ❌ As you already found out this message reads now "Arduino IoT Cloud Connection status: CONNECTED".

@aentinger
Copy link
Contributor Author

aentinger commented Sep 25, 2019

Rebased the changes of branch arduinobearssl on top of this branch, therefore eliminating the need to maintain 2 different branches what will become one release in any case.

@TravisBuddy
Copy link

Travis tests have failed

Hey @lxrobotics,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 22aa9f00-e365-11e9-b752-11f331f20c85

@eclipse1985 eclipse1985 merged commit 1f241e5 into master Oct 15, 2019
@aentinger aentinger deleted the esp8266-user-pass-login branch October 15, 2019 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants