Skip to content

Commit 63e683d

Browse files
committed
expose serial number for App-Lab in network mode
1 parent 5be93c5 commit 63e683d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/board/board.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,9 @@ func FromFQBN(ctx context.Context, fqbn string) ([]Board, error) {
182182
if len(port.GetMatchingBoards()) > 0 {
183183
boardName = port.GetMatchingBoards()[0].GetName()
184184
}
185-
185+
serial := strings.ToLower(port.GetPort().GetHardwareId()) // in windows this is uppercase.
186186
switch port.GetPort().GetProtocol() {
187187
case SerialProtocol:
188-
serial := strings.ToLower(port.GetPort().GetHardwareId()) // in windows this is uppercase.
189-
190188
// TODO: we should store the board custom name in the product id so we can get it from the discovery service.
191189
var customName string
192190
if conn, err := adb.FromSerial(serial, ""); err == nil {
@@ -215,6 +213,7 @@ func FromFQBN(ctx context.Context, fqbn string) ([]Board, error) {
215213
boards = append(boards, Board{
216214
Protocol: NetworkProtocol,
217215
Address: port.GetPort().GetAddress(),
216+
Serial: serial,
218217
BoardName: boardName,
219218
CustomName: customName,
220219
})

0 commit comments

Comments
 (0)