0

Feather M0 WiFi + AdafruitIO Failure to Connect to AIO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by cschmitz on Sun Jan 07, 2018 6:18 pm

I am working on a project to integrate control via AdafruitIO into a lighting system. I have been working with the raw MQTT support on the Feather M0 with success via another broker where the data is currently housed. I ported my code over to use AdafruitIO using the MQTT calls directly and was having trouble. I then decided to use the AdafruitIO libraries directly to make things easier. While it compiles fine, it won't connect to AdafruitIO. I have learned my lesson over the years, and I decided to load up some example code. I loaded the example code adafruitio_00_publish (from library v2.6) via my arduino IDE (v1.8.4). I updated config.h with my details (WiFi and AIO username and keys). I push it to the feather and I get the same behavior. WiFi is connected (the DHCP REQ (static reservation) is fulfilled and I can ping it from my local network). The connect() is called, but the status shows not connected.

I am at a loss. There are no connected pins and no added code (I changed the four lines in the config.h and that's it). I know the board is OK as it was being used for other purposes and the network is responding.

Anyone have thoughts on what I am missing?

Anything I left out that would help?

I scoured the forum as best I could and didn't find anything that wasn't attributable to other causes (IDE, library or more complicated code).

Thanks.

corby

cschmitz
 
Posts: 9
Joined: Mon Jun 02, 2014 8:14 am

Re: Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by cschmitz on Mon Jan 08, 2018 1:09 pm

I don't know that I ran into any firmware requirements for the ATWINC1500. This was purchased 28-JAN-2016 and I don't believe that I have updated the firmware. I know that working with the breakout board with other devices, I ran through the firmware check, but I have not done that with this board. If there is a hard requirement for a firmware version, that would certainly be a starting point.

Thanks again.

corby

cschmitz
 
Posts: 9
Joined: Mon Jun 02, 2014 8:14 am

Re: Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by abachman on Mon Jan 08, 2018 5:26 pm

Hi corby,


If you can log into https://io.adafruit.com and use any of the dashboard blocks to send and receive data, then that means your account is active and our MQTT service is up and running. I'm running this code on a Feather M0 WiFi (ATWINC1500) and seeing the expected output on IO: https://gist.github.com/abachman/c6b6c0c98666f28542939fa3f48131fb

Screen Shot 2018-01-08 at 4.16.24 PM.png
Screen Shot 2018-01-08 at 4.16.24 PM.png (17.57 KiB) Viewed 354 times


I don't know about necessary firmware version, but it's possible that yours is out of date. For reference, this is what I see with the WiFi101 firmware check sketch:
Code: Select all | TOGGLE FULL SIZE
WiFi101 firmware check.

WiFi101 shield: DETECTED
Firmware version installed: 19.4.4
Latest firmware version available : 19.5.4

Check result: NOT PASSED
 - The firmware version on the shield do not match the
   version required by the library, you may experience
   issues or failures.
And it's working for me. So I can at least say if you're at 19.4.4 it should work.

Also make sure you have the most recent Adafruit IO and Adafruit MQTT libraries. Those keep up to date with changes to the IO MQTT API and have our current SSL cert info, which has changed in the last year.


- adam

abachman
 
Posts: 212
Joined: Mon Feb 01, 2010 12:48 pm

Re: Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by cschmitz on Mon Jan 08, 2018 8:23 pm

Adam,
Just checked the firmware and I have 19.4.4, and it warns me that I should be running 19.5.4 (just like your output). I verified that I am running the latest (v0.17.0) Adafruit MQTT library (loaded via the library manager) and the latest (v2.6.0) Adafruit IO Arduino library (also loaded via the library manager).
I am currently updating other feeds at AIO from a raspberry pi on the same network using the same key and username, so I know that my network can reach AIO.
I loaded up the example sketch again and I get connected to wifi, but not to AdafruitIO.

I tried one last run through the documentation to see if there was anything I could have missed ... and of course there was. I was verifying I had supported hardware, due to the age of the board on the library repo:
https://github.com/adafruit/Adafruit_IO ... /README.md

Sure enough I am supported, but there is an extra line at the end:
"You will also need to add the SSL certificate for io.adafruit.com using the ..."

The firmware is up to date, but the certs have certainly changed in the last 24-months due to the SHA1 cutover. I ran through the handy directions here:
https://learn.adafruit.com/adafruit-fea ... rtificates

The demo sketch worked like and charm and I am in business.

Thank you for your time and patience.

corby

Thanks.

corby

cschmitz
 
Posts: 9
Joined: Mon Jun 02, 2014 8:14 am

Re: Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by abachman on Mon Jan 08, 2018 8:29 pm

Woo hoo! That's great news.

I wish I had pointed you directly at the SSL cert update process, but I'm glad you tracked it down. Hopefully this will be helpful for anyone else hitting this issue.


- adam

abachman
 
Posts: 212
Joined: Mon Feb 01, 2010 12:48 pm

Re: Feather M0 WiFi + AdafruitIO Failure to Connect to AIO

by pi_guy on Sat Feb 03, 2018 5:25 pm

Hi, I have been using 2016 vintage Feather M0 WiFi modules for some time with no problem. As of 31 Jan 2018, they no longer connected to Adafruit.IO.

After a firmware update 19.4.4 to 19.5.4 and an upload of SSL certs including io.adafruit.io things are working again.

This was a little difficult to track down because there were also changes in the libraries and board support that caused initial build problems.

But again, If I had looked the answer was waiting for me here in the Forums!

pi_guy
 
Posts: 25
Joined: Fri Oct 26, 2012 6:36 pm

Please be positive and constructive with your questions and comments.