Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ethernet with WIZnet w5500 #132

Open
mirek23 opened this issue Nov 15, 2024 · 5 comments · May be fixed by #41
Open

Ethernet with WIZnet w5500 #132

mirek23 opened this issue Nov 15, 2024 · 5 comments · May be fixed by #41
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@mirek23
Copy link

mirek23 commented Nov 15, 2024

Is it possible to use Arduino_ConnectionHandler with WIZnet w5500 based modules + arduino boards?

@pennam
Copy link
Contributor

pennam commented Nov 15, 2024

There is not builtin support, but it is possible. Take a look to:

@mirek23
Copy link
Author

mirek23 commented Nov 21, 2024

Hi Mattia,

Thank you for your hints:

  1. Uncomment this line:
    //#define ARDUINO_ETHERNET_SHIELD /* Uncomment this line if you want to use a ethernet shield via e.g. MKR ETH Shield */
  2. Instantiate Ethernet_ConnectionHandler in thing_properties.h:
    byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
    EthernetConnectionHandler ArduinoIoTPreferredConnection(mac);
  3. Pass to ArduinoIoTCloud (as usual):
    ArduinoCloud.begin(ArduinoIoTPreferredConnection, "mqtts-sa.iot.oniudra.cc");

I have introduced changes to the code you suggested. I use arduino nano + WIZnet W5500 Ethernet module and I get the following error which refers to ArduinoIoTCloud.h (CBORDecoder.h):

In file included from /home/mirek/Arduino/libraries/ArduinoIoTCloud/src/ArduinoIoTCloud.h:35:0,
                 from /home/mirek/Arduino/Nano_LAN/thingProperties.h:7,
                 from /home/mirek/Arduino/Nano_LAN/Nano_LAN.ino:30:
/home/mirek/Arduino/libraries/ArduinoIoTCloud/src/cbor/CBORDecoder.h:29:10: fatal error: list: No such file or directory
 #include <list>
          ^~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

@pennam
Copy link
Contributor

pennam commented Nov 21, 2024

for which board are you trying to build the sketch?

@mirek23
Copy link
Author

mirek23 commented Nov 21, 2024

I am trying to compile the sketch for Arduino Nano + WIZnet W5500. I have tested Arduino Nano + WIZnet W5500 with Ethernet and SPI libraries using Arduino IDE and developed the telnet, HTTP servers, MQTT client so this combination works but I can not integrate it with Arduino cloud.

@pennam
Copy link
Contributor

pennam commented Nov 22, 2024

The Arduino Nano and all AVR boards are not supported by ArduinoIoTCloud. The Nano in particular does not have enough RAM to complete a TLS handshake. You can find the list of supported boards here: https://github.com/arduino-libraries/ArduinoIoTCloud?tab=readme-ov-file#what

@per1234 per1234 linked a pull request Nov 22, 2024 that will close this issue
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
3 participants