Skip to content
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

Serial monitor 'No monitor available for port protocol serial` #2100

Closed
3 tasks done
m410 opened this issue Jun 15, 2023 · 4 comments
Closed
3 tasks done

Serial monitor 'No monitor available for port protocol serial` #2100

m410 opened this issue Jun 15, 2023 · 4 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project

Comments

@m410
Copy link

m410 commented Jun 15, 2023

Describe the problem

I'm not able to use the serial monitor with arduino-pico. I've only tried using 'raspberry pi pico w'. Scripts build and flash the device as expected but the serial monitor never attaches.

Error from commandline:

2023-06-15T13:58:16.718Z root ERROR Uncaught Exception: 
2023-06-15T13:58:16.718Z root ERROR Error: 3 INVALID_ARGUMENT: No monitor available for the port protocol serial
    at Object.callErrorFromStatus (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
    at Object.onReceiveStatus (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/client.js:190:52)
    at Object.onReceiveStatus (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
    at Object.onReceiveStatus (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/client.js:160:30)
    at ServiceClientImpl.enumerateMonitorPortSettings (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
    at resp (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/arduino-ide-extension/lib/node/monitor-service.js:346:20)
    at new Promise (<anonymous>)
    at MonitorService.portMonitorSettings (/Applications/Arduino IDE.app/Contents/Resources/app/node_modules/arduino-ide-extension/lib/node/monitor-service.js:345:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

To reproduce

Follow these install instructions: https://github.com/earlephilhower/arduino-pico#installation
I've tried library versions 3.2.2 & 3.2.1.

I used this basic blink sketch, but others show the same behavior. This same sketch works for me on IDE 1.8.19.

#include "Adafruit_TinyUSB.h"
#include "hardware/pio.h"


void setup() {
  Serial.begin(115200);
  
  while (!Serial);
  delay(100); 

  Serial.println("Startup");
  pinMode(LED_BUILTIN, OUTPUT);
}


void loop() {
  Serial.println("Looping...");
  digitalWrite(LED_BUILTIN, HIGH); 
  delay(1000);   
  digitalWrite(LED_BUILTIN, LOW); 
  delay(1000); 
}

Expected behavior

Serial monitor should work.

Arduino IDE version

2.1 & 2.1.1-nightly

Operating system

macOS

Operating system version

Ventura 13.4

Additional context

Under discussion at:

https://forum.arduino.cc/t/no-monitor-available/1138307

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
@m410 m410 added the type: imperfection Perceived defect in any part of project label Jun 15, 2023
@kittaakos
Copy link
Contributor

kittaakos commented Jun 16, 2023

No monitor available for the port protocol serial

Thanks for reporting it to us. Interesting one. Please check what IDE2 logs when you plug/unplug the 'raspberry pi pico w' board.

You can start IDE2 by adjusting the log level to debug. On my macOS, it looks like this:

/Applications/Arduino\ IDE\ 2.1.0.app/Contents/MacOS/Arduino\ IDE --log-level debug

When IDE2 has started, please clean the terminal, and plug/unplug the board. IDE2 will log things. Please share everything, but I am looking for such events in particular. These are the events when I plugin in the RP2040 board:

2023-06-16T13:15:40.306Z discovery-log INFO {"eventType":"add","port":{"matchingBoardsList":[{"name":"Arduino Nano RP2040 Connect","fqbn":"arduino:mbed_nano:nanorp2040connect","isHidden":false}],"port":{"address":"/dev/cu.usbmodem14301","label":"/dev/cu.usbmodem14301","protocol":"serial","protocolLabel":"Serial Port (USB)","propertiesMap":[["pid","0x005E"],["serialNumber","FFFFFFFFFFFFFFFF"],["vid","0x2341"]],"hardwareId":"FFFFFFFFFFFFFFFF"}},"error":""}

Or the Board config changed: is also very interesting in this case:

2023-06-16T13:15:40.317Z root DEBUG Board config changed:  {"selectedBoard":{"name":"Arduino Nano RP2040 Connect","fqbn":"arduino:mbed_nano:nanorp2040connect","port":{"address":"/dev/cu.usbmodem14301","addressLabel":"/dev/cu.usbmodem14301","protocol":"serial","protocolLabel":"Serial Port (USB)","properties":{"pid":"0x005E","serialNumber":"FFFFFFFFFFFFFFFF","vid":"0x2341"},"hardwareId":"FFFFFFFFFFFFFFFF"}},"selectedPort":{"address":"/dev/cu.usbmodem14301","addressLabel":"/dev/cu.usbmodem14301","protocol":"serial","protocolLabel":"Serial Port (USB)","properties":{"pid":"0x005E","serialNumber":"FFFFFFFFFFFFFFFF","vid":"0x2341"},"hardwareId":"FFFFFFFFFFFFFFFF"}}

Thank you for helping!

(Normally, I would have asked you to attach the log files, but messages with debug level are missing from the log 🤦)


Update:

but messages with debug level are missing from the log

#2101

@kittaakos kittaakos self-assigned this Jun 16, 2023
@kittaakos kittaakos added topic: code Related to content of the project itself status: waiting for information More information must be provided before work can proceed topic: serial monitor Related to the Serial Monitor labels Jun 16, 2023
@m410
Copy link
Author

m410 commented Jun 17, 2023

Hi! I’m away from my computer, I’ll rerunnwirh debug on by Monday morning EST

@m410
Copy link
Author

m410 commented Jun 19, 2023

Here's the output
arduino-ide-debug.txt

Update: I initially had the pico connected when I started Arduino IDE. disconnected then reconnected it.

@kittaakos kittaakos removed the status: waiting for information More information must be provided before work can proceed label Jun 21, 2023
@kittaakos
Copy link
Contributor

kittaakos commented Jun 21, 2023

Thanks for the logs, @m410.

I have received some internal assistance, and the problem seems to be in the platform.txt of the core. All discoveries and monitors must be specified in the platform.txt. Something like this:

# Required discoveries and monitors
# ---------------------------------
pluggable_discovery.required.0=builtin:serial-discovery
pluggable_discovery.required.1=builtin:mdns-discovery
pluggable_monitor.required.serial=builtin:serial-monitor

Here are a few PRs as an example of how people ported a legacy platform to the newer pluggable discovery and monitor:

If you wonder why the same sketch works in IDE 1.x but not in 2.x, well, I had the same question, and maintainers of the core logic explained to me that this is expected.

Since the necessary changes have to be performed in the core, I decided to close this IDE2 issue.

You know where to make the changes if you are the core maintainer. If you are a user of the core, please request a change on their GitHub page, or ask around on the Arduino forum: https://forum.arduino.cc/c/software/ide-2-x/93.

@kittaakos kittaakos closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2023
@kittaakos kittaakos added conclusion: invalid Issue/PR not valid and removed topic: code Related to content of the project itself labels Jun 21, 2023
@per1234 per1234 changed the title Serial monitor 'No monitor available for port protocal serial` Serial monitor 'No monitor available for port protocol serial` Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants