0

Feather M0 Wifi - Cannot connect to Adafruit IO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 Wifi - Cannot connect to Adafruit IO

by marsicop on Mon Jan 28, 2019 10:59 am

I have a Feather M0 model (3044) and am experiencing a problem while trying to run the simple "servo" example posted in the Adafruit IO Learn section. I have confirmed / re-entered my IO credentials several times, as well as my network access credentials. I have also checked/updated firmware & SSL certificates, as per the earlier advice in related/similar threads. I can get the "Simple Wifi Client" example to run ... so I'm pretty sure that the Feather is able to connect to my network.

I'm a newbie ... on hour #3 of trying to figure out the IO connection problem ... wouldn't turn down any help / suggestions. :-)

Also, in case it is helpful ... I inserted a few debug serial.print lines in the example code (below), as well as a screenshot of the corresponding console. Doesn't appear to make it inside the while loop?? ... just hangs.

Thanks in advance for assistance / advice.

- Peter

****** modified sketch code **********************************
// connect to io.adafruit.com
Serial.println("(1) Calling io.connect ");

io.connect();
Serial.print("(2) This is the AIO_CONNECTED value: ");
Serial.println(AIO_CONNECTED);
// set up a message handler for the 'servo' feed.
// the handleMessage function (defined below)
// will be called whenever a message is
// received from adafruit io.
servo_feed->onMessage(handleMessage);

Serial.print("(3) Before WAIT loop ... io.status = ");
Serial.println(io.statusText());
// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.print("(4) Waiting in loop io.status = ");
Serial.println(io.statusText());
delay(500);
}
*************************************************

******** Corresponding console output *******************
(1) Calling io.connect
AdafruitIO::connect()
(2) This is the AIO_CONNECTED value: 21
(3) Before WAIT loop ... io.status = Idle. Waiting for connect to be called...
**********************************************************************

marsicop
 
Posts: 5
Joined: Sun Jan 13, 2019 11:21 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by adafruit_support_carter on Mon Jan 28, 2019 1:54 pm

Try working with a more simple example and see if you get the same issue. Try the basic digital example:
https://learn.adafruit.com/adafruit-io- ... ital-input

adafruit_support_carter
 
Posts: 11941
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by marsicop on Sun Feb 03, 2019 10:39 pm

Finally got a chance to give your advice a try ... and the simpler example worked fine. Not sure what I was doing wrong in the Servo Example, but am on the way to figuring it out.
Thanks very much for the assistance.

marsicop
 
Posts: 5
Joined: Sun Jan 13, 2019 11:21 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by marsicop on Wed Feb 06, 2019 6:45 pm

Back to the IO Basics Servo example @ IO.

Same problem. I'm running the vanilla 16_Servo example sketch code. No substantial changes (just added a few extra print lines to try to figure out why it hangs. Get the same behavior that I described in the original post. (The IO & Wifi credential information in the config.h file is identical to that in the simpler digital example that you pointed me to earlier). I can also see that the Feather shows up as a connected device on my Wifi when I run the 06_Digital In example, ... but never shows up when I run the 16_Servo example. Any additional thoughts / advice?

Thanks in advance for the assistance.

marsicop
 
Posts: 5
Joined: Sun Jan 13, 2019 11:21 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by adafruit_support_carter on Thu Feb 07, 2019 12:11 am

AIO_CONNECTED is just a constant:
https://github.com/adafruit/Adafruit_IO ... ons.h#L100
so printing that will just print 21 everytime. To check the status of the connection, add a call to status() after connect():
Code: Select all | TOGGLE FULL SIZE
  io.connect();
  Serial.print("Status = "); Serial.println(io.status());

See what that returns. You can compare to the values linked above.

adafruit_support_carter
 
Posts: 11941
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by marsicop on Tue Feb 12, 2019 6:45 pm

Added your println statements. Same behavior as originally seen. Makes a call to io.connect and then hangs. Here is the serial monitor output:

17:32:59.317 -> (1) Calling io.connect
17:32:59.317 -> AdafruitIO::connect()
17:33:04.234 -> Status =

Again, it makes the io.connect call successfully in the "06 digital in" example sketch.

Is it possibly a home firewall/router issue? ... or would that make no sense?

marsicop
 
Posts: 5
Joined: Sun Jan 13, 2019 11:21 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by adafruit_support_carter on Wed Feb 13, 2019 3:43 pm

17:33:04.234 -> Status =

It printed nothing for the actual status code?

adafruit_support_carter
 
Posts: 11941
Joined: Tue Nov 29, 2016 2:45 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by marsicop on Wed Feb 13, 2019 4:04 pm

nothing ... just hangs (forever)

marsicop
 
Posts: 5
Joined: Sun Jan 13, 2019 11:21 pm

Re: Feather M0 Wifi - Cannot connect to Adafruit IO

by adafruit_support_carter on Wed Feb 13, 2019 4:44 pm

It's acting like the call to status() is hanging. But that get's used a lot internally. It's off that the basic example works, but this doesn't. When you hit this issue, can you go back to the example that worked and it still works?

adafruit_support_carter
 
Posts: 11941
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.