Connect Opta PLC to Arduino Cloud with its Ethernet Port

Can I use use a 4G router and connect to ethernet port (instead of Wifi) of the Opta PLC, to allow Opta PLC connect to Arduino cloud?

Thanks!

Hello lijp99, I connect the Opta trough a normal ethernet connection. Works very reliably. So, I don't think you will have any issues using a 4G modem with a normal ethernet cable connection.

Hi! I am jumping in as I am interested in doing the same.

Are you using any specific library to connect to arduino IoT Cloud using an OPTA through ethernet instead of Wifi? I am not able to find much information about the code itself on the internet.

My project would be either an MKR+Ethernet shield or an OPTA Lite, as when boxed, wired and everything, the MKR cost almost the same as an OPTA Lite.

Hello Daniel,

Just configure the OPTA or MKR as being connected using an Ethernet cable.

I assume you are familiar with the Arduino IoT Cloud?

  1. Connect the OPTA or MKR to any working ethernet connection using an ethernet cable;
  2. Connect the OPTA or MKR to the Arduino IoT Cloud as usual;
  3. Connect your G4 modem to the internet;
  4. connect the OPTA or MKR to the G4 modem using an ethernet cable.
2 Likes

Hi!

Did you ever get this working? Using the example sketch I get "ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8883 Error: -2" in the monitor.

Thanks

Hi @daboombcn ,

On Arduino Cloud, you can configure Opta to connect via Ethernet as shown in the following tutorial:

1 Like

Thanks, @Hm_pro.

However, it turns out I just needed to follow the memory partitioning guide https://docs.arduino.cc/tutorials/opta/memory-partitioning/

I didn't realise this was an essential step!

1 Like

@daboombcn Perfect, thanks for the update! :slight_smile:

I spoke a bit too soon...

It does connect to iot.arduino.cc sometimes but sometimes not! It's very random with absolutely no changes between each attempt. If it fails, I simply tap the reset button to restart the Opta to try again. Sometimes it'll connect and sometimes not. I'm going to check this against my own MQTT server before I can be sure that it's an Arduino Cloud or device authentication problem.