You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thankq so much for this library.
Hi, I have used the Mdash with WiFi & PPP in ESP32 Arduino, it is working perfectly. Recently I have integrated with Ethernet W5500. The Ethernet connection is working with MQTT PubSub module, but not with the Mdash. It is not able to connect. Kindly help me on the integration of Mdash with Ethernet.
Code:
void Com::Ethernet_Reconnect(){
byte Eth_link = Ethernet.linkStatus();
if(Eth_link == 1){ // If link is connected
if(Eth_flg == 0){ // If not connected
uint8_t mac[6];
esp_read_mac(mac, ESP_MAC_WIFI_STA);
Serial.print("\n Ethernet Mac Address : ");
Mac_Disp(mac);
Serial.print("\n Ethernet Connecting..");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
Eth_flg = 0;
// You can try a static IP if DHCP fails.
// Ethernet.begin(mac, ip);
}
else{
Serial.print("\n DHCP comfigured Successfully");
Eth_flg = 1;
}
}
}
else{
Serial.print("\n Link is not connected");
Eth_flg = 0;
}
}
Com COM;
OTA OT;
WiFiClient *Wifi;
EthernetClient *EthClient;
COM.WiFi_Connect("Service", "12345678", 10000); // For 10 sec, timeout
COM.WiFi_Range(); // Wifi Range Display
/*
Wifi = new WiFiClient();
COM.MQTT_SetClient(*Wifi); // Pubsub default as Wifi Client
*/
COM.Ethernet_init(LAN_cs);
COM.Ethernet_Reconnect();
EthClient = new EthernetClient();
COM.MQTT_SetClient(*EthClient); // Pubsub default as Wifi Client
OT.Mdash_Begin("8bHnIEYfB3AlzrTVMoWeTQ");
COM.TCP_Connect("broker.hivemq.com", 1883); // Wifi based TCP connect
while(1){
COM.MQTT_Connect("Therm1");
//COM.CheckIP_Reconnect("Therm1", "NBST1");
uint8_t Pub_stat = COM.MQTT_Publish("thermelgy", "{Hello}");
if (Pub_stat == 1)
Serial.printf("Successfully sent to cloud\n");
else
Serial.println("\n Failed sent to Cloud");
delay(10000);
}
}
Dear @cpq @novlean ,
Thankq so much for this library.
Hi, I have used the Mdash with WiFi & PPP in ESP32 Arduino, it is working perfectly. Recently I have integrated with Ethernet W5500. The Ethernet connection is working with MQTT PubSub module, but not with the Mdash. It is not able to connect. Kindly help me on the integration of Mdash with Ethernet.
Code:
Debug log:
PlatformIO .ini file:
The text was updated successfully, but these errors were encountered: