Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

mDNS error: failing to create listerner

edited May 17 in Mongoose OS

This is on an ESP32

Console is repeatedly showing:

mgos_mdns_init       Listening on udp://:5353
mgos_mdns_init       Failed to create listener

conf4.json

{
  "http": {
    "enable": true
  },
  "mqtt": {
    "enable": false
  },
  "wifi": {
    "sta": {
      "enable": true, 
      "ssid": "*************", 
      "pass": "*************", 
      "ip": "", 
      "netmask": "", 
      "gw": "", 
      "nameserver": "", 
      "dhcp_hostname": ""
    },
    "ap": {
      "enable": false
    }
  },
  "dns_sd": {
    "enable": true
  }
}

Possibly relating to this line? https://github.com/cesanta/mongoose-os/blob/master/fw/src/mgos_mdns.c#L82

I'm trying to get mDNS working so that my ZeroConf Browser can find the device.

Comments

  • SergeySergey Dublin, Ireland

    Increase debug.level to 3 and show full boot log, please

  • Part 1:

    rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0008,len:8
    load:0x3fff0010,len:4436
    load:0x40078000,len:11564
    load:0x40080000,len:252
    entry 0x40080034
    I (30) boot: ESP-IDF v1.0-1290-gc66b4fb 2nd stage bootloader
    I (30) boot: compile time 07:33:48
    I (56) boot: Enabling RNG early entropy source...
    I (56) boot: SPI Speed      : 40MHz
    I (58) boot: SPI Mode       : DIO
    I (71) boot: SPI Flash Size : 4MB
    I (83) boot: Partition Table:
    I (94) boot: ## Label            Usage          Type ST Offset   Length   Flags
    I (119) boot:  0 nvs              WiFi data        01 02 00009000 00004000 00000000
    I (144) boot:  1 otadata          OTA data         01 00 0000d000 00002000 00000000
    I (170) boot:  2 app_0            OTA app          00 10 00010000 00180000 00000000
    I (196) boot:  3 fs_0             SPIFFS           01 82 00190000 00020000 00000000
    I (221) boot:  4 app_1            OTA app          00 11 001b0000 00180000 00000000
    I (247) boot:  5 fs_1             SPIFFS           01 82 00330000 00020000 00000000
    I (273) boot: End of partition table
    I (286) boot: OTA data 0: seq 0x00000001, st 0x10, CRC 0x157a2b85, valid? 1
    I (309) boot: OTA data 1: seq 0x00000000, st 0x00, CRC 0x00000000, valid? 0
    I (333) boot: Disabling RNG early entropy source...
    I (350) boot: Loading app partition at offset 00010000
    I (1344) boot: segment 0: paddr=0x00010018 vaddr=0x00000000 size=0x0ffe8 ( 65512)
    I (1344) boot: segment 1: paddr=0x00020008 vaddr=0x3f400010 size=0x14ff0 ( 86000) map
    I (1361) boot: segment 2: paddr=0x00035000 vaddr=0x3ffc0000 size=0x022b4 (  8884) load
    I (1391) boot: segment 3: paddr=0x000372bc vaddr=0x40080000 size=0x00400 (  1024) load
    I (1414) boot: segment 4: paddr=0x000376c4 vaddr=0x40080400 size=0x12800 ( 75776) load
    I (1476) boot: segment 5: paddr=0x00049ecc vaddr=0x400c0000 size=0x00000 (     0) load
    I (1477) boot: segment 6: paddr=0x00049ed4 vaddr=0x00000000 size=0x06134 ( 24884)
    I (1499) boot: segment 7: paddr=0x00050010 vaddr=0x400d0018 size=0x7b054 (503892) map
    I (1525) cpu_start: Pro cpu up.
    I (1536) cpu_start: Single core mode
    I (1551) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
    I (1574) heap_alloc_caps: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
    I (1594) heap_alloc_caps: At 3FFB3000 len 00005000 (20 KiB): DRAM
    I (1615) heap_alloc_caps: At 3FFBBB28 len 00002000 (8 KiB): DRAM
    I (1636) heap_alloc_caps: At 3FFC9A80 len 00016580 (89 KiB): DRAM
    I (1656) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
    I (1678) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
    I (1699) heap_alloc_caps: At 40092C00 len 0000D400 (53 KiB): IRAM
    I (1720) cpu_start: Pro cpu start user code
    I (1776) cpu_start: Starting scheduler on PRO CPU.
    m W W-      +   $$HH  x3ffc5bd0 Mongoose init
    esp32_mgos_init      esp32 1.0 (20170518-073400/???)
    esp32_mgos_init      Mongoose OS Firmware 2017051807 (20170518-073400/master@518aa891)
    esp32_mgos_init      ESP-IDF v1.0-1290-gc66b4fb
    esp32_mgos_init      Boot partition: app_0, Task ID: 0x3ffbc840, RAM: 215860 free
    esp32_fs_mount       Mounting SPIFFS from fs_0 (131072 @ 0x190000)
    esp32_fs_mount       Total: 113201, used: 21084, free: 92117
    mgos_sys_config_init MAC: 240AC405C714
    mgos_sys_config_init WDT: 30 seconds
    E (2741) wifi: esp_wifi_get_mode 781 wifi is not init
    mgos_wifi_set_mode   WiFi mode: STA
    E (2751) wifi: esp_wifi_set_mode 774 wifi is not init
    I (2761) wifi: wifi firmware version: 384bc4e
    I (2761) wifi: config NVS flash: enabled
    I (2771) wifi: config nano formating: disabled
    I (2781) wifi: Init dynamic tx buffer num: 32
    I (2791) wifi: Init dynamic rx buffer num: 64
    I (2791) wifi: wifi driver task: 3ffbd5b0, prio:23, stack:3584
    I (2801) wifi: Init static rx buffer num: 10
    I (2811) wifi: Init dynamic rx buffer num: 0
    I (2811) wifi: Init rx ampdu len mblock:7
    I (2821) wifi: Init lldesc rx ampdu entry mblock:4
    I (2821) wifi: wifi power manager task: 0x3ffd1d9c prio: 21 stack: 2560
    E (2831) wifi: esp_wifi_connect 813 wifi not start
    I (2841) wifi: wifi timer task: 3ffd2e08, prio:22, stack:3584
    I (2901) phy: phy_version: 350, Mar 22 2017, 15:02:06, 1, 0
    I (2901) wifi: mode : sta (24:0a:c4:05:c7:14)
    event_handler        event: 2
    mgos_wifi_setup_sta  WiFi STA: Connecting to LE GRENIER
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_hal_join_g Joining multicast group 224.0.0.251
    mgos_dns_sd_init     MDNS initialized, host mOS_esp32_??????, ttl 120
    mgos_sys_config_init HTTP server started on [80]
    mg_rpc_channel_mqtt  0x3ffd38d4 esp32_05C714/rpc/#
    mg_rpc_add_channel_i 0x3ffd38d4 '*' MQTT, trusted
    mg_rpc_channel_uart  0x3ffd399c UART0
    mg_rpc_add_channel_i 0x3ffd399c '' UART, trusted
    mg_rpc_add_channel_i 0x3ffd3a10 'RPC.LOCAL' loopback, trusted
    mgos_init            Init done, RAM: 178664 free, 178664 min free
    mgos_upd_boot_finish 1 0
    
  • Part 2:

    mg_rpc_ev_handler    0x3ffd3a10 CHAN OPEN (loopback)
    I (3161) wifi: n:2 0, o:1 0, ap:255 255, sta:2 0, prof:1
    I (4001) wifi: state: init -> auth (b0)
    I (4011) wifi: state: auth -> assoc (0)
    I (4021) wifi: state: assoc -> run (10)
    mongoose_poll        New heap free LWM: 175888
    I (4041) wifi: connected with LE GRENIER, channel 2
    mgos_wifi_on_change_ Wifi: connected
    dns_sd_wifi_ev_handl ev 1, data 0x0, mdns_listener 0x3ffd347c
    dns_sd_wifi_ev_handl ev 2, data 0x0, mdns_listener 0x3ffd347c
    dns_sd_advertise     advertising types
    dns_sd_advertise     sending adv as M, size 399
    mgos_sntp_query      SNTP query to pool.ntp.org
    mgos_sntp_retry      SNTP next query in 2021 ms
    dns_sd_timer_cb      arg 0x0, mdns_listener 0x3ffd347c
    dns_sd_advertise     advertising types
    dns_sd_advertise     sending adv as M, size 399
    mgos_sntp_ev         SNTP query sent
    mgos_sntp_ev         SNTP reply from 91.198.87.118: time 1495095535.131725, local 3.232670, delta 1495095531.899055
    mgos_sntp_ev         SNTP close
    mgos_sntp_retry      SNTP next query in 7024937 ms
    mqtt_global_connect  MQTT connecting to broker.hivemq.com:1883
    mongoose_poll        New heap free LWM: 175676
    mgos_mqtt_ev         MQTT Connect (1)
    mgos_mqtt_ev         MQTT event: 202
    mgos_mqtt_ev         MQTT CONNACK 0
    mgos_mqtt_ev         Subscribing to 'esp32_05C714/rpc'
    mgos_mqtt_ev         Subscribing to 'esp32_05C714/rpc/#'
    mgos_mqtt_ev         MQTT event: 209
    mgos_mqtt_ev         MQTT event: 209
    mg_rpc_ev_handler    0x3ffd38d4 CHAN OPEN (MQTT)
    handler              ---- DNS packet from 192.168.1.23 (0 questions, 4 answers)
    handler              not sending reply, closing
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    I (14021) wifi: pm start, type:0
    handler              ---- DNS packet from 192.168.1.23 (1 questions, 0 answers)
    handler                -- Q type 12 name _sleep-proxy._udp.local (QM) from 192.168.1.23, unicast: 0
    handler               --- ignoring: name=_sleep-proxy._udp.local, type=12
    handler              not sending reply, closing
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    handler              ---- DNS packet from 192.168.1.20 (0 questions, 1 answers)
    handler              not sending reply, closing
    handler              ---- DNS packet from 192.168.1.20 (0 questions, 2 answers)
    handler              not sending reply, closing
    handler              ---- DNS packet from 192.168.1.20 (0 questions, 2 answers)
    handler              not sending reply, closing
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    mongoose_poll        New heap free LWM: 175424
    handler              ---- DNS packet from 192.168.1.23 (0 questions, 4 answers)
    handler              not sending reply, closing
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    handler              ---- DNS packet from 192.168.1.23 (0 questions, 8 answers)
    handler              not sending reply, closing
    mgos_mdns_init       Listening on udp://:5353
    mgos_mdns_init       Failed to create listener
    
  • SergeySergey Dublin, Ireland
  • SergeySergey Dublin, Ireland

    Yes, found an issue in mdns code, made a change. Please update firmware and re-check.

Sign In or Register to comment.