Skip to content

Network available devices (ESP*, MKR) are only listed with IP. label should be visible from the mdns-discovery #567

Closed
@ubidefeo

Description

@ubidefeo

Describe the bug

When deploying more than a single Local OTA enabled board, the mdns-discovery finds as many as available, and exposes the correct fields, but the label field is not transferred to / used by the IDE, hence listing the board as just an IP.
Once the board type is manually selected, it become associated.
(this connection seems to also be hard to break, needs investigation)

sample output of mdns-discovery for an ESP32 and a MKR1000

{
  "eventType": "remove",
  "port": {
    "address": "10.0.1.25",
    "label": "Arduino\\ MKR1000\\ v2 at 10.0.1.25",
    "protocol": "network",
    "protocolLabel": "Network Port",
    "properties": {
      ".": "mkr1000",
      "auth_upload": "yes",
      "board": "mkr1000",
      "hostname": "Arduino\\ MKR1000\\ v2.local.",
      "port": "65280",
      "ssh_upload": "no",
      "tcp_check": "no",
      "ttl": "4500"
    }
  }
}
{
  "eventType": "add",
  "port": {
    "address": "10.0.1.26",
    "label": "FeatherESP32 at 10.0.1.26",
    "protocol": "network",
    "protocolLabel": "Network Port",
    "properties": {
      "hostname": "FeatherESP32.local.",
      "port": "3232",
      "ttl": "120"
    }
  }
}
{
  "eventType": "add",
  "port": {
    "address": "10.0.1.24",
    "label": "MKRWiFi1010 at 10.0.1.24",
    "protocol": "network",
    "protocolLabel": "Network Port",
    "properties": {
      ".": "arduino",
      "auth_upload": "yes",
      "board": "arduino",
      "hostname": "MKRWiFi1010.local.",
      "port": "65280",
      "ssh_upload": "no",
      "tcp_check": "no",
      "ttl": "4500"
    }
  }
}

the last item is a MKR WiFi 1010 which as per the ArduinoOTA library (3rd party) returns arduino as a generic fallback, rendering the CLI unable to reverse-identify the board based on the board filed in boards.txt

To Reproduce

  1. upload an OTA Sketch to one of the supported boards (MKR1000, ESP*)
  2. MDNS Discovery will offer the newly available board in the Port menu
  3. in Java IDE this item will also include the user-specified hostname
  4. in IDE 2 this association is not created

Expected behavior

the label field returned by the Discovery should be used in place of address

Screenshots

IDE 1.8.16:

Screenshot 2021-10-21 at 15.46.57.png


IDE 2.0 beta 12:

Screenshot 2021-10-21 at 15.45.51.png

Desktop

  • OS: any

Additional context

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions