Arduino Uno R4 WIFI OFFLINE

Hello,
I've recently got my hands on an Arduino Uno R4 Wifi and would like to try out the things in the IoT Cloud. I've looked everywhere, but after trying several thing my board remains ofline.

I've tried updating the firmware (and unplug my cable at the end and reconnect it). I don't know if this matters but I have firmware version 0.4.1, using different cabels, but nothing.

I can upload via the cloud and at the end it tells me to reset. I reset the board and it tells me it was succesfull. I've also uploaded the code maby some of you can find something that doesn't work.

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/c538c7a9-89c6-425f-b3cc-4b4c90118c96 

  Arduino IoT Cloud Variables description

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

  bool led_Rood;

  Variables 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"


const int LED = 2;


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

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
}

void onLedRoodChange()  {
  // Add your code here to act upon LedRood change
  Serial.println("de status van de led = ");
  if(led_Rood)
  {
    Serial.println(led_Rood);
    digitalWrite(LED, HIGH);
  }
  else
  {
    digitalWrite(LED, LOW);
    Serial.println(led_Rood);
  }
}






Hi @niels-j. Please try this troubleshooting procedure and then then report back here with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Connect the Arduino board to your computer with a USB cable.
  2. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  3. Click the following link to open the list of your Arduino Cloud Things in the web browser:
    https://app.arduino.cc/things
  4. Click the name of the Thing.
    The "Setup" page for the Thing will open.
  5. Select the "Sketch" tab at the top of the page.
    The "Sketch" page for the Thing will open.
  6. Make sure the serial port of the Arduino board is selected on the sketch editor toolbar.
    Some Devices produce an "Over-the-Air" port and a serial port. In this case, there will be a menu on the toolbar that allows you to select either one. The serial port must be used for this procedure.
  7. Click the icon that looks like a magnifying glass ("Open Serial Monitor") on the sketch editor toolbar.
    A new browser window will open.
  8. Make sure the correct port is shown on the toolbar in the window.
  9. Select "9600" from the menu at the bottom of the window.
  10. Press and release the reset button on the Arduino board.

You should now see information about the progress of the Thing initialization printed in the window.

If the board is able to connect to your Wi-Fi access point, you should see a message like this:

Connected to "some-ssid"

After that, if the board is able to connect through the Internet to the Arduino Cloud servers, you should see this message:

Connected to Arduino IoT Cloud

Was the Thing initialization successful as I described?

Hi there,

sorry for the late response. I've done as you told me and I got some new data.

The sketch gets trough the verification but it gives an error.
1
I don't really know what this means but I tried putting the Arduino in bootloader mode (by pressing the reset 2 times). And then I got this error. It also gave an error in the serial monitor.


I really don't know what this means, but I hope you can help me with this.

1 Like

I've also tried different usb ports but I get the same error's in the black screen and the serial monitor.

Unfortunately the Arduino Cloud Serial Monitor interferes with the upload. You must close the serial monitor window before doing an upload.

If you find that inconvenient, close the serial monitor window, click the "</> Open full editor" button on the Thing sketch editor toolbar. The Thing sketch will open in Arduino Cloud Editor (AKA "full editor"). Then open Serial Monitor from the button on the Cloud Editor toolbar and use Cloud Editor to do any sketch development and uploads. Cloud Editor is smart enough to close the serial port connection in its serial monitor when doing an upload so that it doesn't interfere with the upload, then open the connection again after the upload finishes.

This definitely shows why the board remains offline. It is never connecting to the network.

I think this line of the Serial Monitor output is the important one:

Although the "instruction access violation" stuff that comes after looks very alarming, my hypothesis is this is only a side effect of the inability to read the device ID.

The inability to read the device ID indicates that something is wrong with the configuration of the Arduino Cloud Device. It might be possible to fix it by recreating the device. I'll provide instructions you can follow to do that:

  1. Click the following link to open the list of your Arduino Cloud Devices in your web browser:
    https://app.arduino.cc/devices
  2. Click the checkbox next to the device for your UNO R4 WiFi board.
  3. A box will appear at the bottom of the page with the message "1 selected rows". Click the trash can icon ("Delete") at the right side of that bar.
    The "Delete device" dialog will open.
  4. Click the "YES, DELETE" button in the dialog.
    The "Delete device" dialog will close.
  5. Click the "+ DEVICE" button at the top right corner of the "Devices" page.
    The "Setup Device" dialog will open.
  6. Click the "Arduino board" section in the dialog.
  7. Wait for the device creation system to recognize the UNO R4 WiFi:

    Arduino UNO R4 WiFi found

    An Arduino UNO R4 WiFi has been detected on port ...

  8. Click the "CONFIGURE" button in the dialog.
    An automatic configuration operation will start.
  9. Wait for the configuration process to finish.
    The dialog will prompt you to configure the Device name:

    Give your device a name

  10. Click the "NEXT" button in the dialog.
    Another automatic configuration operation will start.
  11. Wait for the configuration process to finish:

    Congratulations! You are all set

  12. Click the "DONE" button in the dialog.
  13. Click the following link to open the list of your Arduino Cloud Things:
    https://app.arduino.cc/things
  14. Select your Thing from the list.
    The "Setup" page for the Thing will open.
  15. Click the "Select Device" button under the "Associated Device" section of the page.
    The "Associate Device" dialog will open.
  16. Select the newly created UNO R4 WiFi device from the dialog.
    The "Associate Device" dialog will close.
  17. Click the "Configure" button under the "Network" section of the page.
    The "Configure network" dialog will open.
  18. Enter the SSID and password for your Wi-Fi access point in the fields of the dialog.
  19. Click the "SAVE" button in the dialog.
    The "Configure network" dialog will close.
  20. Select the "Sketch" tab of the Thing page.
    The Thing sketch editor page will open.
  21. Click the rightward pointing arrow button ("Verify and upload") on the Thing sketch editor toolbar.
  22. Wait for the upload to finish successfully.
  23. Click the icon that looks like a magnifying glass ("Open Serial Monitor") on the sketch editor toolbar.
    A new browser window will open.
  24. Make sure the correct port is shown on the toolbar in the window.
  25. Select "9600" from the menu at the bottom of the window.
  26. Press and release the reset button on the Arduino board.

You should now see information about the progress of the Thing initialization printed in the window.

If the board is able to connect to your Wi-Fi access point, you should see a message like this:

Connected to "some-ssid"

After that, if the board is able to connect through the Internet to the Arduino Cloud servers, you should see this message:

Connected to Arduino IoT Cloud

Was the Thing initialization successful as I described?

1 Like

Hi,

the thing initialized and is uploaded to my board. But now I have a new problem. In the serial monitor i get those lines:

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8883

ArduinoIoTCloudTCP::handle_ConnectMqttBroker 1 connection attempt at tick time 5470

I've let this run for about 10 minutes but it constantly gives me somthing along these lines.

I've also found out I could not connect to the 5.0 network but it worked when I tried the 2.4 network. I hope this is good information.

2 Likes

The code works so I hope the messages it sends me via the serial monitor aren't bad.

Unfortunately I am not sure what could cause this new problem.

I just tried following the instructions I provided in post 5 with my UNO R4 WiFi board and it connected to the Arduino Cloud server as expected. So it is not a matter of a universal service outage (or if it was one, it has since resolved). Does the problem still occur if you check it again now? You don't need to go through the whole device creation and upload instructions I provided, just open serial monitor and check whether it is still printing that "ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8883" error message.

If it still isn't connecting, I can suggest the troubleshooting experiment of creating a new Thing and then checking to see if the problem occurs for that Thing as well. I don't have any specific reason to think that there is something wrong with your current Thing's configuration, but it is worth a try at least. I'll give an overview of what I am proposing you try:

  1. Create a new Thing.
  2. Associate the existing UNO R4 WiFi Device with the Thing
  3. Upload the Thing sketch to your UNO R4 WiFi board.
  4. Open Serial Monitor and check to see whether it indicates that it was able to connect to the Arduino Cloud server.

I'm happy to provide more detailed instructions for that procedure if needed.

1 Like

thank you for helping me. By just reuploading the sketch the error is away now.

You are welcome. I'm glad it is working now.

Regards,
Per

1 Like

A post was split to a new topic: Me aparece Device OFFLINE

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.