-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: show board info based on the selected port #1803
Conversation
// IDE 1.x show this when cannot identify for example a ESP8266MOD although compile and upload works | ||
if (!boardListOnSelectedPort.length) { | ||
this.messageService.info( | ||
nls.localize( | ||
'arduino/board/noNativeSerialPort', | ||
"Native serial port, can't obtain info." | ||
) | ||
); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE: Fixed by 43283ba
- identified port
- unidentified port
- native port
An example of all three is shown here:
$ arduino-cli board list --format json
[
{
"port": {
"address": "/dev/ttyUSB0",
"label": "/dev/ttyUSB0",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0x6001",
"serialNumber": "AB0P8H9K",
"vid": "0x0403"
}
}
},
{
"matching_boards": [
{
"name": "Arduino Uno",
"fqbn": "arduino:avr:uno"
}
],
"port": {
"address": "/dev/ttyACM0",
"label": "/dev/ttyACM0",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0x0043",
"serialNumber": "95032303537351D0F001",
"vid": "0x2341"
}
}
},
{
"port": {
"address": "/dev/ttyS4",
"label": "/dev/ttyS4",
"protocol": "serial",
"protocol_label": "Serial Port"
}
}
]
Identified
/dev/ttyACM0
is an identified port:
Arduino IDE 1.x
Arduino IDE 2.x
🙂 Arduino IDE 2.x behavior matches 1.x
Unidentified
/dev/ttyUSB0
is an unidentified port (it is a classic Nano, which uses the manufacturer provided VID/PID pair of its general purpose FTDI FT232RL USB chip, and thus can't be identified as a specific board):
Arduino IDE 1.x
Arduino IDE 2.x
🐛 Arduino IDE 2.x behavior does not match 1.x
The behavior of the current PR code is problematic for two reasons:
- It is incorrect to call
/dev/ttyUSB0
a "native port". - It makes it so the VID and PID (which is valuable information for support/troubleshooting) can not be determined.
Native
/dev/ttyS4
is a native port:
Arduino IDE 1.x
Arduino IDE 2.x
🙂 Arduino IDE 2.x behavior matches 1.x
IDE2 will consider a port a non-serial if:
From @cmaglie:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATE: resolved
It seems to me that the only requirement now is for a port to be selected, since the information is gathered from the port and the board definition is not used at all.
To reproduce
- Select File > Quit from the Arduino IDE menus if it is running
- Rename or delete (:warning: cautiously) the following folder to produce the condition of not having a board selected:
- Windows:
C:\Users\<user name>\AppData\Roaming\arduino-ide
- Linux:
~/.config/arduino-ide
- macOS:
~/Library/Application Support/arduino-ide
- Windows:
- Start Arduino IDE.
- Select a port from the Tools > Port menu in Arduino IDE.
- Select Tools > Get Board Info from the Arduino IDE menus.
🐛 An inappropriate notification is shown:
Please select a board to obtain board info.
🐛 The "Board Info" dialog does not open.
arduino-ide-extension/src/browser/contributions/board-selection.ts
Outdated
Show resolved
Hide resolved
arduino-ide-extension/src/browser/contributions/board-selection.ts
Outdated
Show resolved
Hide resolved
Could you please take another look, Per? |
include serial number of board if available Closes #1489 Closes #1435 Signed-off-by: Akos Kitta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Akos!
Motivation
As requested in #1435, IDE2 shows the board info based on the
Tools
>Port
and notTools
>Board
.This PR makes the board's serial number (SN) available via the board details.
Change description
Expected behavioral change:
Network port, can't obtain info.
message when a network port is selected.Native serial port, can't obtain info.
message when nomatching_boards
can be found for the currently selected port. For example, I installed the core for ESP8266MOD, compiled against theNodeMCU 0.9 (ESP-12 Module)
board on the/dev/cu.usbserial-0001
serial
port, compile upload works, but as this board is not recognized as thematching_boards
of a port (board list --format json
), it cannot show the details.Examples:
1435_01.mp4
1435_02.mp4
Locally discovered boards for the examples:
Other information
Closes #1489
Closes #1435
Reviewer checklist