Go Down

Topic: MKR Wifi 1010 loads of issues (Read 709 times) previous topic - next topic

Dan0

Hi All I hope you are safe and well in these bad times

I have been trying to get a small project up on the Arduino IoT cloud,

after many many problems I have done loads of research, updated the firmware, run out of web editor time, tried to run the same sketch on the native IDE, subscribed to web editor, restarted my laptop 50 times, killed McAfee, downloaded and installed the plugin 10 times etc etc and now I have managed to upload the sketch to the MKR1010

BUT

it will not connect, not sure whats happening now, there is not much information, can anyone assist please?

this is what I get in the serial monitor

***** Arduino IoT Cloud - configuration info *****
Device ID: y
Thing ID: 744d255b-42ba-45ab-ab19-cf0754002aa3
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.3.0
Connected to "BTHub5-###"
Arduino IoT Cloud Connection status: CONNECTING

this is the code

Code: [Select]
/*
  Sketch generated by the Arduino IoT Cloud Thing "Greenhouse_Automation_1"
  https://create.arduino.cc/cloud/things/744d255b-42ba-45ab-ab19-cf0754002aa3

  Arduino IoT Cloud Properties description

  The following variables are automatically generated and updated when changes are made to the Thing properties

  bool lED;

  Properties which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
#define LED_PIN 2

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500);
 
  pinMode(LED_PIN, OUTPUT);

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
 
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you'll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(3);
  delay(5000);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here
 
 
}

void onLEDChange() {
  digitalWrite(LED_PIN, lED);
    Serial.print("The light is ");
    if (lED) {
        Serial.println("ON");
    } else {
        Serial.println("OFF");
    }
}



with the other tabs

Code: [Select]
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>


const char THING_ID[] = "744d255b-42ba-45ab-ab19-cf0754002aa3";

const char SSID[]     = SECRET_SSID;    // Network SSID (name)
const char PASS[]     = SECRET_PASS;    // Network password (use for WPA, or use as key for WEP)

void onLEDChange();

bool lED;

void initProperties(){

  ArduinoCloud.setThingId(THING_ID);
  ArduinoCloud.addProperty(lED, READWRITE, ON_CHANGE, onLEDChange);

}

WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);




thanks for your help in advance

Dan0

#1
Mar 25, 2020, 11:13 pm Last Edit: Mar 25, 2020, 11:14 pm by Dan0
it did eventually look like it connected but cant get the LED to activate

Code: [Select]
***** Arduino IoT Cloud - configuration info *****
Device ID: y
Thing ID: 744d255b-42ba-45ab-ab19-cf0754002aa3
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.3.0
Connected to "BTHub5-S###"
Arduino IoT Cloud Connection status: CONNECTING
Connection to "BTHub5-S###" lost.
Attempting reconnection
WiFi.status(): 0
Current WiFi Firmware: 1.3.0
Connected to "BTHub5-S###"

pert

I can tell you that your sketch works fine for me on my MKR WiFi 1010.

While troubleshooting, I would recommend changing this line:
Code: [Select]
#define LED_PIN 2
to:
Code: [Select]
#define LED_PIN LED_BUILTIN
This will cause the on-board LED to be used. That way we eliminate the possibility that there is a problem with your external LED circuit.

In the output you posted in your last reply, I see it did a "connected, connection lost, connected" cycle. Is that cycle repeating, or did it only happen once?

Dan0

thats the full output so I think just the once, I want watching at the time so not really sure

I am fairly sure the LED works as I run a simple sketch on the circuit to verify but I will do as you suggest

Dan0

#4
Mar 26, 2020, 04:06 pm Last Edit: Mar 26, 2020, 04:07 pm by Dan0
these MKR Wifi1010 boards dont seem to work very well

I am trying to upload the sketch and getting "reset before upload: 1200bps Touch: Open Port COM11:serial port busy

with the final part of the output below

Code: [Select]
/tmp/525612140/build/libraries/arduinomqttclient_0_1_4/MqttClient.cpp.o /tmp/525612140/build/libraries/rtczero_1_6_0/RTCZero.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/ECCX08.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/ASN1Utils.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/ECCX08CSR.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/ECCX08JWS.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/ECCX08SelfSignedCert.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/PEMUtils.cpp.o /tmp/525612140/build/libraries/arduinoeccx08_1_3_3/utility/sha1.c.o /tmp/525612140/build/libraries/Wire/Wire.cpp.o /tmp/525612140/build/libraries/SPI/SPI.cpp.o /tmp/525612140/build/core/variant.cpp.o -Wl,--start-group -L/home/builder/.arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Lib/GCC/ -larm_cortexM0l_math -lm /tmp/525612140/build/../../core/core_arduino_samd_mkrwifi1010_669cd633ee959092b2fdbb3b40af8344.a -Wl,--end-group

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-objcopy -O binary /tmp/525612140/build/Greenhouse_Automation_1_mar25a.ino.elf /tmp/525612140/build/Greenhouse_Automation_1_mar25a.ino.bin

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /tmp/525612140/build/Greenhouse_Automation_1_mar25a.ino.elf /tmp/525612140/build/Greenhouse_Automation_1_mar25a.ino.hex

Using library arduinoiotcloud_0_9_3 at version 0.9.3 in folder: /home/builder/opt/libraries/latest/arduinoiotcloud_0_9_3

Using library arduinocloudthing_1_7_3 at version 1.7.3 in folder: /home/builder/opt/libraries/latest/arduinocloudthing_1_7_3

Using library arduino_debugutils_1_0_0 at version 1.0.0 in folder: /home/builder/opt/libraries/latest/arduino_debugutils_1_0_0

Using library arduino_connectionhandler_0_4_6 at version 0.4.6 in folder: /home/builder/opt/libraries/latest/arduino_connectionhandler_0_4_6

Using library wifinina_1_5_0 at version 1.5.0 in folder: /home/builder/opt/libraries/latest/wifinina_1_5_0

Using library arduinobearssl_1_4_0 at version 1.4.0 in folder: /home/builder/opt/libraries/latest/arduinobearssl_1_4_0

Using library arduinomqttclient_0_1_4 at version 0.1.4 in folder: /home/builder/opt/libraries/latest/arduinomqttclient_0_1_4

Using library rtczero_1_6_0 at version 1.6.0 in folder: /home/builder/opt/libraries/latest/rtczero_1_6_0

Using library arduinoeccx08_1_3_3 at version 1.3.3 in folder: /home/builder/opt/libraries/latest/arduinoeccx08_1_3_3

Using library Wire at version 1.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/samd/1.8.4/libraries/Wire

Using library SPI at version 1.0 in folder: /home/builder/.arduino15/packages/arduino/hardware/samd/1.8.4/libraries/SPI

/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-size -A /tmp/525612140/build/Greenhouse_Automation_1_mar25a.ino.elf

Sketch uses 143912 bytes (54%) of program storage space. Maximum is 262144 bytes.

Programming with: Serial

Restarting in bootloader mode

Get port list before reset

[COM10 COM11 COM11 COM11]

Touching port COM11 at 1200bps


ARDUINO NEWS
SASSIE helps prevent awkward gaps in conversation
1,156 LEDs make up these dual acrylic light-up panels
Arduino's response to the Covid-19 outbreak
Tune in to the official Arduino Day 2020 livestream
Work remotely with Arduino Create -- get a free upgrade now
VersaTouch brings touch localization and force sensing to everyday surfaces
Designing a low-cost, open source ventilator with Arduino
Using an Arduino/CNC shield setup for ham radio control
Thales, Telstra, Microsoft and Arduino deliver scalable trust for easy-to-deploy IoT Applications
Arduino CLI: An introduction

Arduino Web Editor


Getting Started


Arduino Project Hub


Device Manager


Digital
Store


Arduino IoT Cloud

NOW CHROME OS READY!
Chrome OS App. $0.99 month
ARDUINO CREATE IS NOW AVAILABLE ON CHROME OS!
DOWNLOAD THE APPpowered by amazon web services


Ive never know this much trouble using any other Arduino, does anyone else have the same issues? could this be my laptop? I have the most powerful fastest laptop around (allegedly), a Dell XPS with the utterly crappy Windows 10Pro, I simply hate it!!!! could Windows be the problem?


pert

Quote
Code: [Select]
[COM10 COM11 COM11 COM11]
It's very strange that there are three COM11s listed. I've never seen that before. I suspect this is related to the problem. I would try restarting your computer to see if that clears things up. I have had experiences where the COM port just got stuck in a state where I couldn't upload anymore and restarting fixed it.

Dan0

I keep on restating it, doesnt seem to make much difference, sometimes it uploads most of the time it doesnt

managed to upload again but still got this

***** Arduino IoT Cloud - configuration info *****
Device ID: y
Thing ID: 744d255b-42ba-45ab-ab19-cf0754002aa3
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.3.0
Connected to "BTHub5-S###"
Arduino IoT Cloud Connection status: CONNECTING

its most frustrating

could this be an issue with my Wifi/router?

thanks

Dan


pert

When it doesn't upload, are there always duplicate ports on that list in the output? When it does upload are there ever duplicate ports on that list in the output?

could this be an issue with my Wifi/router?
It's possible. If you can, try connecting through a different network like the WiFi hotspot on your phone.

Dan0

it looks like there are multiple ports yes

I will try ant use my car router, thats a good idea thanks

Dan0

#9
Mar 26, 2020, 10:04 pm Last Edit: Mar 26, 2020, 10:04 pm by Dan0
tried with another router, looks the same but seem that it is connected, I think the issue is with the cloud

***** Arduino IoT Cloud - configuration info *****
Device ID: y
Thing ID: 744d255b-42ba-45ab-ab19-cf0754002aa3
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.3.0
Connection to "Evoque WiFi 2" failed
Retrying in  "500" milliseconds
Connected to "Evoque WiFi 2"
Arduino IoT Cloud Connection status: CONNECTING


interestingly I see this


Dan0

#10
Mar 26, 2020, 10:08 pm Last Edit: Mar 26, 2020, 10:08 pm by Dan0
should these ID's match?


pert

should these ID's match?
No. They are two separate things, so they won't match. On my working replica of your Thing, the two IDs are also different.

Dan0

its a shame that wasn't the problem, so now I have no idea and there is no way to check, it just doesnt talk to the cloud....

Go Up