cesanta / mDash

Arduino / ESP-IDF library for mdash.net IoT service
https://mdash.net
Other
35 stars 18 forks source link

event.c:18:mg_error 0x36 DNS timeout #13

Closed sandikodev closed 2 years ago

sandikodev commented 3 years ago

try little MinimalApp.ino

#define MDASH_APP_NAME "MinimalApp"
#include <mDash.h>

#include <WiFi.h>

#define WIFI_NETWORK "ls"
#define WIFI_PASSWORD "oke1234612"
#define DEVICE_PASSWORD "jaCDxQea7t90BOSqGNR5Xfw"

void setup() {
  Serial.begin(115200);
  WiFi.begin(WIFI_NETWORK, WIFI_PASSWORD);
  mDashBegin(DEVICE_PASSWORD);
}

void loop() {
  delay(100);
}

here for ➜ mos console

Using port /dev/ttyUSB0
[Jun  7 12:27:29.030] ets Jun  8 2016 00:22:57
[Jun  7 12:27:29.043] 
[Jun  7 12:27:29.043] rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[Jun  7 12:27:29.043] configsip: 0, SPIWP:0xee
[Jun  7 12:27:29.043] clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[Jun  7 12:27:29.047] mode:DIO, clock div:1
[Jun  7 12:27:29.049] load:0x3fff0018,len:4
[Jun  7 12:27:29.051] load:0x3fff001c,len:1216
[Jun  7 12:27:29.053] ho 0 tail 12 room 4
[Jun  7 12:27:29.055] load:0x40078000,len:9720
[Jun  7 12:27:29.057] ho 0 tail 12 room 4
[Jun  7 12:27:29.059] load:0x40080400,len:6352
[Jun  7 12:27:29.061] entry 0x400806b8
[Jun  7 12:27:29.570] 1970-01-01 00:00:00  I log.c:18:mg_log_set       Setting log level to 1
[Jun  7 12:27:29.577] 1970-01-01 00:00:00  E sock.c:117:ll_write       0x37 tUc -1/27 118
[Jun  7 12:27:29.583] 1970-01-01 00:00:00  E sock.c:117:ll_write       0x37 tUc -1/33 118
[Jun  7 12:27:32.581] 1970-01-01 00:00:03  E event.c:18:mg_error       0x36 DNS timeout
[Jun  7 12:27:34.588] 1970-01-01 00:00:05  E event.c:18:mg_error       0x39 DNS timeout

how can i reach dnsresolv ?

maxgerhardt commented 3 years ago

The DNS timeout is occurring for as long as it doesn't have internet connectivity. I had this error too, but only because I entered the wrong WiFi credentials. As soon as I corrected those, after a short amount of time (8 seconds until the WiFI connect), the errors stopped appearing and my device appeared in the console.

cpq commented 2 years ago

thank you @maxgerhardt