diff --git a/arduino-ide-extension/src/browser/boards/boards-config.tsx b/arduino-ide-extension/src/browser/boards/boards-config.tsx index 4449c5cf..b5c13d7d 100644 --- a/arduino-ide-extension/src/browser/boards/boards-config.tsx +++ b/arduino-ide-extension/src/browser/boards/boards-config.tsx @@ -335,17 +335,12 @@ export class BoardsConfig extends React.Component< ports = this.state.knownPorts; } else { ports = this.state.knownPorts.filter((port) => { - if (port.protocol === 'serial') { + if (port.protocol === 'serial' || port.protocol === 'network') { + // Allow all `serial` and `network` boards. + // IDE2 must support better label for unrecognized `network` boards: https://github.com/arduino/arduino-ide/issues/1331 return true; } - // All other ports with different protocol are - // only shown if there is a recognized board - // connected - for (const board of this.availableBoards) { - if (board.port?.address === port.address) { - return true; - } - } + return false; }); } return !ports.length ? ( diff --git a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts index 1433ee3f..542449f1 100644 --- a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts +++ b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts @@ -438,20 +438,11 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { const availableBoards: AvailableBoard[] = []; const attachedBoards = this._attachedBoards.filter(({ port }) => !!port); const availableBoardPorts = availablePorts.filter((port) => { - if (port.protocol === 'serial') { - // We always show all serial ports, even if there - // is no recognized board connected to it + if (port.protocol === 'serial' || port.protocol === 'network') { + // Allow all `serial` and `network` boards. + // IDE2 must support better label for unrecognized `network` boards: https://github.com/arduino/arduino-ide/issues/1331 return true; } - - // All other ports with different protocol are - // only shown if there is a recognized board - // connected - for (const board of attachedBoards) { - if (board.port?.address === port.address) { - return true; - } - } return false; });