Description
Describe the problem
The Arduino pluggable discovery system allows the use of any communication channel between an Arduino board and the Arduino development software. This means that, in addition to the traditional "serial" and "network" protocols supported by Arduino IDE 1.x, Arduino IDE 2.x supports any arbitrary protocol which may be implemented by a package developer.
These are presented to the user via the same interfaces as serial and network ports:
- Tools > Port menu
- "Board Selector" menu on the toolbar
- "Select Other Board and Port" dialog
🐛 Ports of protocols other than "serial" and "network" are not shown in the latter two.
To reproduce
Equipment
- Any Teensy board
ⓘ The issue is not specific to Teensy hardware. However, I am not aware of any other boards that currently use alternative port protocols.
Steps
- Disconnect the Teensy board from your computer if it is currently connected.
- Select File > New from the Arduino IDE menus.
ⓘ These first two steps are required to ensure there isn't a preexisting user-created board association for the port. - Connect the Teensy board to your computer.
- Open the Tools > Port menu in the Arduino IDE.
🙂 Theteensy
protocol port is shown on the menu, and identified as the appropriate board:
- Open the "Board Selector" menu in the Arduino IDE.
🐛 The identifiedteensy
protocol port is not shown on the menu:
- Select "Select other board and port..." from the "Board Selector" menu.
🐛 The identifiedteensy
protocol port is not shown on the "PORTS" menu:
Expected behavior
Protocol is not a factor in whether a port is shown in the "Board Selector" menu and "Select Other Board and Port" dialog. The same criteria should be applied to all ports.
Arduino IDE version
2.0.0-rc9.2.snapshot-34a7fdb
Operating system
Windows, Linux
Operating system version
Windows 10, Ubuntu 20.04
Additional context
I bisected the introduction of the bug to #1332 (it does not occur when using the build from d674ab9)
Even though the stated purpose of that PR was only to cause unidentified network ports to be shown in the "Board Selector" menu, the PR also changed the code so that even identified ports of any other protocol are no longer shown.
All is as expected in the Arduino CLI output (note that the Teensy board's port has a matching_boards
object):
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 63f1e185 Date: 2022-08-28T21:55:54Z
$ arduino-cli board list --format json
[
{
"matching_boards": [
{
"name": "Teensy 4.1",
"fqbn": "teensy:avr:teensy41"
}
],
"port": {
"address": "usb:0/1A0000/0/1/5/1/1/3",
"label": "hid#vid_16c0\u0026pid_0486 RawHID",
"protocol": "teensy",
"protocol_label": "Teensy Ports",
"properties": {
"modelID": "0x25",
"name": "Teensy 4.1",
"serialNumber": "808372",
"usbtype": "USB_RAWHID"
}
}
},
{
"port": {
"address": "COM1",
"label": "COM1",
"protocol": "serial",
"protocol_label": "Serial Port"
}
},
{
"matching_boards": [
{
"name": "Arduino Mega or Mega 2560",
"fqbn": "arduino:avr:mega"
}
],
"port": {
"address": "COM7",
"label": "COM7",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0x0042",
"serialNumber": "754393136373518111D2",
"vid": "0x2341"
}
}
},
{
"port": {
"address": "COM254",
"label": "COM254",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0x6001",
"serialNumber": "A9VD4GXEA",
"vid": "0x0403"
}
}
},
{
"port": {
"address": "COM3",
"label": "COM3",
"protocol": "serial",
"protocol_label": "Serial Port"
}
},
{
"port": {
"address": "COM52",
"label": "COM52",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0xFA78",
"serialNumber": "6",
"vid": "0x0403"
}
}
},
{
"port": {
"address": "192.168.254.127",
"label": "esp32-b4e62dbf693d at 192.168.254.127",
"protocol": "network",
"protocol_label": "Network Port",
"properties": {
".": "node32s",
"auth_upload": "no",
"board": "node32s",
"hostname": "esp32-b4e62dbf693d.local.",
"port": "3232",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
]
This is an example of the problems that can be caused by the current practice of treating ports of specific protocols differently than others in the Arduino IDE codebase: #1334
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