GoogleCloudPlatform / google-cloud-iot-arduino

Google Cloud IOT Example on ESP8266
Apache License 2.0
351 stars 157 forks source link

Google library and ethernet shield Enc28J60 #242

Open simogaspa84 opened 2 years ago

simogaspa84 commented 2 years ago

Hi ..

I would like to use your library instead that with the wifi network using an ethernet cable. The Ethernet shield is Enc28J60... Can you provide some code examples about where modify and where to switch from wifi to the ethernet shield..? Thanks a lot

gguuss commented 2 years ago

You would need to initialize the library with a compatible network client.

simogaspa84 commented 2 years ago

Thanks @gguuss ... Are you going to provide some examples of a compatible network client ?

`

 netClient = new WiFiClientSecure();

  ((WiFiClientSecure *)netClient)->setCACert(root_cert);

  mqttClient = new MQTTClient(buffer_size);

`

Everything is based on WiFiClientSecure.cpp... I guess if you car create a similar class for Ethernet...

I found this example on github but it is not working...

https://github.com/stevenlianyi/EthernetClientSecure

I believe it would be nice to make an example also with the ethernet hw ... maybe based on this lib..

https://github.com/simogaspa84/EthernetENC

Thanks a lot

gguuss commented 2 years ago

I am not actively contributing to or maintaining the library as I'm no longer at Google. You may want to look at the MKR1000 example because the Arduino WiFiSSLClient library shares capabilities with their ethernet library and you may be able to port the MKR example to Arduino Ethernet.

simogaspa84 commented 2 years ago

Hi @gguuss thanks for your reply... We have all the boards with ethernet shield Enc28J60. How feasible is in your opinion starting from MKR1000 example and make it work for shield Enc28J60 ? Do you know someone that I can contact to do this job (paying for sure) Currently I am using this lib for working with shield Enc28J60.

https://github.com/simogaspa84/EthernetENC

Thanks again for your kind support