Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only the IP address is shown for unrecognized network boards #1331

Closed
3 tasks done
kittaakos opened this issue Aug 17, 2022 · 7 comments · Fixed by #1335
Closed
3 tasks done

Only the IP address is shown for unrecognized network boards #1331

kittaakos opened this issue Aug 17, 2022 · 7 comments · Fixed by #1335
Assignees
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Aug 17, 2022

Describe the problem

This is the follow-up of #1327.

Arduino IDE 2.x shows only the IP address of connected but unrecognized boards. Before #1327, network boards not recognized by the Arduino CLI were not listed in the "Board Selector" menu. See the changes here and here.

#1327 will remove the above-mentioned filtering, and the Arduino IDE will show all network boards. Unfortunately, the IDE receives insufficient information from the CLI, so the IDE has no chance to show anything else but the IP.

Screen Shot 2022-08-17 at 14 41 58

Screen Shot 2022-08-17 at 14 41 40

Screen Shot 2022-08-17 at 14 41 23

The mdns-discovery is aware of these additional things; hence the Arduino IDE 1.x can enhance the label of an unrecognized network board:

HELLO "ciao" 1
{
  "eventType": "hello",
  "message": "Invalid HELLO command",
  "error": true
}
HELLO 1 "ciao"
{
  "eventType": "hello",
  "message": "OK",
  "protocolVersion": 1
}
START_SYNC
{
  "eventType": "start_sync",
  "message": "OK"
}
{
  "eventType": "add",
  "port": {
    "address": "10.0.1.25",
    "label": "esp32s2 at 10.0.1.25",
    "protocol": "network",
    "protocolLabel": "Network Port",
    "properties": {
      ".": "esp32s2usb",
      "auth_upload": "yes",
      "board": "esp32s2usb",
      "hostname": "esp32s2.local.",
      "port": "3232",
      "ssh_upload": "no",
      "tcp_check": "no"
    }
  }
}

The same information is missing from the Arduino CLI board watch (board list -w --format json):

{
  "type": "add",
  "address": "/dev/cu.usbmodem03",
  "protocol": "serial",
  "protocol_label": "Serial Port (USB)"
}
{
  "type": "add",
  "address": "10.0.1.25",
  "protocol": "network",
  "protocol_label": "Network Port"
}

So the IDE fails to show esp32s2 at 10.0.1.25 and falls back to Unknown 10.0.1.25.

To reproduce

The simplest way is to try it with Arduino CLI:

./arduino-cli board list -w --format json

Expected behavior

Arduino IDE should receive the properties from the CLI discovered by the mdns-discovery.

{
    "properties": {
      ".": "esp32s2usb",
      "auth_upload": "yes",
      "board": "esp32s2usb",
      "hostname": "esp32s2.local.",
      "port": "3232",
      "ssh_upload": "no",
      "tcp_check": "no"
    }
}

Or the IDE should receive the "label": "esp32s2 at 10.0.1.25", from the CLI.

Arduino IDE version

9e2b73a

Operating system

macOS

Operating system version

12.3.1

Additional context

Related (if not the same): #567

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: CLI Related to Arduino CLI labels Aug 17, 2022
@kittaakos kittaakos self-assigned this Aug 17, 2022
@kittaakos
Copy link
Contributor Author

kittaakos commented Aug 17, 2022

Expected behavior

IDE should receive the properties from the CLI

Looks like the IDE needs the properties. See here #740 (comment)

@kittaakos
Copy link
Contributor Author

kittaakos commented Aug 18, 2022

IDE should receive the properties

It's all available 🤦 So the CLI does not block this task.

@kittaakos kittaakos removed the topic: CLI Related to Arduino CLI label Aug 18, 2022
@kittaakos
Copy link
Contributor Author

There is one issue: the mdns-discovery response has the expected label: "label": "esp32s2 at 10.0.1.25". The CLI does not provide the desired label. Only the properties and the properties does not contain the label the IDE (1.x) users got used to.

{
  "properties": {
      ".": "esp32s2usb",
      "auth_upload": "yes",
      "board": "esp32s2usb",
      "hostname": "esp32s2.local.",
      "port": "3232",
      "ssh_upload": "no",
      "tcp_check": "no"
    }
}

@kittaakos kittaakos added the topic: CLI Related to Arduino CLI label Aug 18, 2022
kittaakos pushed a commit that referenced this issue Aug 18, 2022
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>

#1331
@per1234 per1234 changed the title IDE2 must show more than the IP address of unrecognized network boards Only the IP address is shown for unrecognized network boards Aug 19, 2022
kittaakos pushed a commit that referenced this issue Aug 23, 2022
Closes #1331

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 24, 2022
 - for the boards dropdown, and
 - for the `Tools` > `Port` menu.

Closes #1331

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 24, 2022
 - for the boards dropdown, and
 - for the `Tools` > `Port` menu.

Closes #1331

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 25, 2022
 - for the boards dropdown, and
 - for the `Tools` > `Port` menu.

Closes #1331

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 25, 2022
@MarkSDS
Copy link

MarkSDS commented Aug 26, 2022

Hi,
I'm experiencing this issue (including the error message 'espota.exe: error: option -p: invalid integer value: '{upload.port.properties.port}'') with ESP32. Only bare IP adres is shown in dropdown Tools/Ports.
My IDE:
Version: 2.0.0-rc9.2
Date: 2022-08-10T13:03:18.962Z
CLI Version: 0.26.0-rc.1 [fc2ea723]

No updated IDE availlable, it says.

Will the issue expected to be solved with next update, you think?
Thank you!

@kittaakos
Copy link
Contributor Author

Version: 2.0.0-rc9.2
Date: 2022-08-10T13:03:18.962Z
CLI Version: 0.26.0-rc.1 [fc2ea723]

Please get and try the nightly build: https://github.com/arduino/arduino-ide#nightly-builds

Let us know if the upload still does not work or if you see the IP only. Thank you!

@MarkSDS
Copy link

MarkSDS commented Aug 26, 2022

Some progress certainly! Thnx for that.
In dropdown from Tools @ Port it's just the plain IP adress yet. Hoovering that address shows esp-32-c4d...370 at 192...126:

2022-08-26 13_16_06-Greenshot (3)

In board selector dropdown the name as defined in my sketch is displayed:

2022-08-26 13_04_25-Greenshot (2)

Uploading the sketch OTA unfortunately hangs with these messages:

Sketch uses 792510 bytes (60%) of program storage space. Maximum is 1310720 bytes. Global variables use 42556 bytes (12%) of dynamic memory, leaving 285124 bytes for local variables. Maximum is 327680 bytes. Sending invitation to 192.168.2.26 Uploading.............
followed by A LOT of dots thereafter. No clue as for the reason for this hanging.

@kittaakos
Copy link
Contributor Author

Uploading.............

No clue as for the reason for this hanging.

Thank you for your feedback. I moved your upload problem to a new dedicated issue. Please continue the conversation there. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants