Go Down

Topic: cloud.connect() never returns true with mkr1000 (Read 2730 times) previous topic - next topic


Apr 05, 2016, 12:42 am Last Edit: Apr 05, 2016, 01:44 am by ransomhall
I used the online wizard to generate a sketch for my MKR1000.  I uploaded the sketch with the online Arduino Editor successfully.  The serial monitor stops at connecting...  and jut displays more periods as long as I want to stare at them.

Code: [Select]
  // attempt to connect to the MQTT server
  while (!client.connect(deviceName, deviceId, devicePsw)) {
    // connection failed, print '.' and retry

never returns true. I also got the same behavior uploading the sketch with v1.6.8 of the IDE.


Did you use the correct wifiname and wifipsw to connect to the wifi?


you can't get to the client.connect call without first successfully connecting to wifi...


which version of the samD core are you using?
which version of the wifi101 library are you using?

try updating both to the latest version. (0.9.0 for wifi101 library and 1.6.4 for the SamD core)


already updated... using 1.6.5 for SAMD and 0.9.0 for Wifi101


Additionally, I'm able to publish and subscribe to MQTT messages on shiftr.io with the same hardware. Some sort of authentication issue maybe?


In that case I guess you don't have the necessary https certificates.
try following this guide to update them



Apr 07, 2016, 02:51 am Last Edit: Apr 07, 2016, 03:14 pm by ransomhall
What domain or IP are the certificates on? I tried https://cloud.arduino.cc with no luck.  This step is missing from your getting started instructions (at least the ones I've read :) )

I did find the instructions on using a Go Daddy certificate with Mosquitto, which works fine, but did not find any way to upload a certificate to the MKR1000 from a file. 


For the MKR1000 and Wifi101 shield you can follow this guide to add the *.arduino.cc certificate to your board.


i have some problem . what i should i do ? can some one help me

Go Up