Skip to content

ATL-837: board serial number #276

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class BoardSelection extends SketchContribution {
const { VID, PID } = boardDetails;
const detail = `BN: ${selectedBoard.name}
VID: ${VID}
PID: ${PID}`;
PID: ${PID}
S/N: ${selectedBoard.serialNumber}`;
await remote.dialog.showMessageBox(remote.getCurrentWindow(), {
message: 'Board Info',
title: 'Board Info',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ export interface Board {
readonly name: string;
readonly fqbn?: string;
readonly port?: Port;
readonly serialNumber?: string;
}

export interface BoardWithPackage extends Board {
Expand Down
4 changes: 3 additions & 1 deletion arduino-ide-extension/src/node/board-discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ export class BoardDiscovery {
// const label = detectedPort.getProtocolLabel();
const port = { address, protocol };
const boards: Board[] = [];
const serialNumber = detectedPort.getSerialNumber();

for (const item of detectedPort.getBoardsList()) {
boards.push({ fqbn: item.getFqbn(), name: item.getName() || 'unknown', port });
boards.push({ fqbn: item.getFqbn(), name: item.getName() || 'unknown', port, serialNumber });
}

if (eventType === 'add') {
Expand Down