The SparkFun ProMicro does not have a pin 13 so we can't use it for a e.g. heart beat. Therefore the RX LED can be used as an indication that a sketch is not hanging as demonstrated in below code.
However, the polling by serial monitor to see if a board is connected will result in odd behaviour of the RX LED. Expected behaviour is a signal with roughly 500 ms on / 500ms off. This is the case with serial monitor closed; with serial monitor open, the behaviour varies with additional pulses caused by the polling.
Note: I had to use an additional pin as directly working on pin 17 with a logic analyser is not possible for me.
// RX led on ProMicro
const uint8_t ledPin = 17;
const uint8_t copyPin = 10;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(copyPin, OUTPUT);
}
void loop() {
bwod();
digitalWrite(copyPin, digitalRead(ledPin));
}
void bwod() {
static uint32_t lastUpdateTime;
if (millis() - lastUpdateTime > 500) {
lastUpdateTime = millis();
digitalWrite(ledPin, !digitalRead(ledPin));
}
}
If one knows the root cause (serial monitor polling), it's not a major issue. But even if the sketch hangs, the blinking of the RX LED can be confusing if one does not notice the different timing.
Note that the behaviour on a Leonardo is identical, but there we have a pin 13 that can be used for the heart beat.
Thanks @sterretje . I agree this is problematic. The bug is being tracked by the Arduino IDE developers here:
opened 04:26AM - 16 May 21 UTC
closed 10:13AM - 01 Dec 22 UTC
conclusion: resolved
topic: code
type: imperfection
topic: serial monitor
## Describe the bug
🐛 Spurious data is sent by the Serial Monitor over the co… nnected serial port.
## To Reproduce
### Equipment
- One of the following Arduino boards:
- Arduino Uno
- Arduino Mega
- Arduino Due
### Steps
1. Paste the following simple serial echo sketch into the Arduino IDE:
```cpp
void setup() {
Serial.begin(115200);
}
void loop() {
if(Serial.available()){
Serial.println(Serial.read());
}
}
```
1. Upload to the Arduino board.
1. Open Serial Monitor
1. Set the baud rate menu to 115200.
🐛 The Serial Monitor's output field shows unexpected data is being received by the Arduino board and echoed back by the sketch. Something like this:
```text
240
240
240
240
240
240
```
... and so on
## Expected behavior
Data is only sent over the serial port by Serial Monitor when the user sends it via the input field.
## Desktop
- OS: Windows 10
- Version: Version: 2.0.0-beta.6-nightly.20210515
Date: 2021-05-15T03:10:15.375Z
CLI Version: 0.18.2 alpha [7b5a22a4]
## Additional context
I have only been able to reproduce this on my Arduino Mega, Arduino Uno, and Arduino Due (via Programming Port only). Based on the commonality of their ATmega16U2 USB chip, I expected to also be able to reproduce it on my Arduino Uno Mini LE, but I was not able to.
On my Leonardo and Micro boards, the RX LED flashes at 1 Hz while the Serial Monitor is connected, indicating unexpected data is being received, but I don't get any output from the echo sketch.
---
I notice that the ~1 Hz frequency of the spurious data appears to match the frequency of the notification displayed repeatedly after the board is disconnected while Serial Monitor is open (https://github.com/arduino/arduino-ide/issues/314):
> Reconnecting Arduino Mega or Mega 2560 to COM18 in 1 seconds...
This makes me wonder if already open ports are constantly being reopened at 1 Hz the whole time Serial Monitor is running. Further evidence supporting this is that I get the RX blink on the Leonardo whenever I do a manual [`StreamingOpen` gRPC request](https://arduino.github.io/arduino-cli/latest/rpc/monitor/#cc.arduino.cli.monitor.v1.StreamingOpenRequest) to the port.
---
It appears the data is sent at 115200 baud.
---
As reported at at https://github.com/arduino/arduino-ide/issues/1297, changing the selection in the line ending menu triggers the immediate sending of additional spurious data in addition to the regular periodic data reported above.
I notice the same happens when you toggle the "**Toggle Autoscroll**" or "**Toggle Timestamp**" icons.
None of these should result in any data being sent to the board.
---
Originally reported at: https://forum.arduino.cc/t/serial-monitor-sends-random-f0/850819
I did see that one; it did not quite look like it was the same issue as the data does not show in the Serial monitor.
I think you have quite a collection of boards. Are the three that you mentioned the only ones in your collection that show the behaviour? I did test your sketch on a SparkFun RedBoard (FTDI232) and a clone Nano (CH340) as well and with both there wasn't any activity of the RX LED and nothing in serial monitor.
// Edit
I left a reply in the github link
I observed the same with my ATmega32u4-based boards, and reported it in the issue:
On my Leonardo, the RX LED flashes at 1 Hz while the Serial Monitor is connected, indicating unexpected data is being received, but I don't get any output from the echo sketch.
Those are the only three that produce the Serial Monitor output. All my ATmega32U4 based boards (Leonardo, Micro, Pro Micro) have the unexpected RX LED blink.
I have not done a comprehensive survey , but the following boards do not show any unexpected echo or blinking:
Derivative Nano w/ CH340 chip
Nano Every
Nano 33 BLE
Nano 33 IoT
Nano RP2040 Connect
I do have another Serial Monitor-related bug which does affect those:
opened 02:10PM - 02 Nov 21 UTC
closed 08:01AM - 13 Dec 22 UTC
conclusion: resolved
topic: code
type: imperfection
topic: serial monitor
### Describe the problem
🐛 When Serial Monitor is used to display characters … past the ASCII range printed by a non-native USB board, corruption occurs at various non-fixed positions in the output.
### To reproduce
1. Upload a sketch that prints characters past the ASCII range to serial:
```cpp
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("ASCII: !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
Serial.println("> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ");
delay(200);
}
```
1. Open Serial Monitor.
🐛 Some of the characters are replaced by `�`:
```text
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡��£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»��½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ��ÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´��¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌ��ÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬��¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅ��ÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦��¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿��ÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×��ÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸��º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐ��ÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²��´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊ��ÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª��¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃ��ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤��¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½��¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕ��רÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶��¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎ��ÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯��±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ��ÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨��ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁ��ÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙ��Û
```
### Expected behavior
All characters to be printed correctly by Serial Monitor all the time:
```
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~
> ASCII: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛ
```
### Arduino IDE version
#### Original report
2.0.0-beta.12-nightly.20211028
#### Last verified with
d6a4b0f (with [**serial-monitor** 0.11.0](https://github.com/arduino/serial-monitor/releases/tag/v0.11.0))
### Operating system
Windows
### Operating system version
10
### Additional context
I originally suspected the corruption might be caused by https://github.com/arduino/arduino-ide/issues/375, but this bug persists even though that one has been resolved.
---
The delay duration has an influence on the position of the corruption and the manifestation is different from one board to another (less corruption on Leonardo and MKR, more on Nano Every).
---
The issue does not occur when using the Arduino IDE 1.8.19 Serial Monitor, even when the board is running the binary that produced the corrupted output in Arduino IDE 2.x (i.e., it's not related to the sketch having been compiled in Arduino IDE 2.x).
---
Originally reported at https://forum.arduino.cc/t/serial-monitor-difficulties-with-german-umlauts/870541
---
Additional reports:
- https://github.com/arduino/arduino-ide/issues/1405
- https://forum.arduino.cc/t/serial-monitor-difficulties-with-german-umlauts/870541/7
- https://forum.arduino.cc/t/serial-read-and-serial-available-are-working-not-as-expected-in-the-code/925823
- https://forum.arduino.cc/t/using-v-2-0-serial-monitor-print/1034093
- https://forum.arduino.cc/t/question-marks-in-serial-monitor/1023531
- https://forum.arduino.cc/t/serial-monitor-detect-interferes-with-sketch-on-promicro/1017659
- https://forum.arduino.cc/t/degree-symbol-on-serial-monitor/1015370
- https://forum.arduino.cc/t/serial-monitor-produces-gibberish/950416/1
- https://forum.arduino.cc/t/serial-monitor-produces-gibberish/950416/15
- https://forum.arduino.cc/t/serial-monitor-issues-with-arduino-due/975247
- https://forum.arduino.cc/t/test-ide-2-0-rc2-the-serial-port-is-garbled/935697
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
The periodic nature of both made me suspect they might be related.
Apologies for missing that. So my only useful addition is the FTDI (SparkFun RedBoard).
Totally unrelated to this, but are there issues raised on github for the following (native USB related).
What happened with the PORTS lines when uploading to the boards with native USB? They were useful to determine if the board was responding to a reset.
If an upload fails, it now simply states something inthe line of "upload fails"; in 1.8.x there was a little more information like "could not open port", "port not found", "port busy" or "port in use". Again, they were useful at occasion. This might also apply to boards that don't have native USB.
Upload to Arduino Micro while an external terminal program has the port open
1.8.5
...
...
Caused by: jssc.SerialPortException: Port name - COM10; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
2.0
Waiting for upload port...
No upload port found, using address:"COM10" label:"COM10" protocol:"serial" protocol_label:"Serial Port (USB)" as fallback
"C:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega32u4 -cavr109 "-PCOM10" -b57600 -D "-Uflash:w:C:\Users\sterretje\AppData\Local\Temp\arduino-sketch-01EB9DBF40D9D8E78576219EC346AA06/sketch_jul31a.ino.hex:i"
Failed uploading: uploading error: exit status 1
Upload with no board connected
1.8.5
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
2.0 (one has to fake it a bit by disconnecting the board while the compilation is in progress
No upload port found, using address:"COM10" label:"COM10" protocol:"serial" protocol_label:"Serial Port (USB)" as fallback
Failed uploading: uploading error: exit status 1"C:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega32u4 -cavr109 "-PCOM10" -b57600 -D "-Uflash:w:C:\Users\sterretje\AppData\Local\Temp\arduino-sketch-01EB9DBF40D9D8E78576219EC346AA06/sketch_jul31a.ino.hex:i"
Thanks so much for bringing this to my attention. I did an investigation and determined this was a recent regression in Arduino CLI. I submitted a formal report here:
opened 10:26AM - 31 Jul 22 UTC
closed 08:17AM - 28 Apr 23 UTC
topic: code
type: imperfection
topic: gRPC
### Describe the problem
The `cc.arduino.cli.commands.v1.ArduinoCoreService.U… pload` method of Arduino CLI's [gRPC interface](https://arduino.github.io/arduino-cli/dev/integration-options/#the-second-pillar-grpc-interface) has a [streaming response](https://arduino.github.io/arduino-cli/dev/rpc/commands/#uploadresponse) that contains the output from the upload process.
🐛 Under some conditions, this stream is truncated, resulting in information essential for troubleshooting upload failures not being available to the user.
### To reproduce
#### Set up
```text
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 5332ffda Date: 2022-07-31T06:55:13Z
$ arduino-cli sketch new /tmp/FooSketch
Sketch created in: C:\Users\per\AppData\Local\Temp\FooSketch
$ arduino-cli compile --fqbn arduino:avr:uno /tmp/FooSketch
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Used platform Version Path
arduino:avr 1.8.5 C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
$ arduino-cli board list
Port Protocol Type Board Name FQBN Core
COM1 serial Serial Port Unknown
COM15 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr
$ arduino-cli monitor --port COM15 # Produce conditions that will cause upload to fail
Connected to COM15! Press CTRL-C to exit.
```
Run the following command in another terminal:
```text
$ arduino-cli daemon --debug
```
#### Demo
##### Check the command line output
Run the following command in another terminal:
```text
$ arduino-cli upload --fqbn arduino:avr:uno --port COM15 /tmp/FooSketch
avrdude: ser_open(): can't open device "\\.\COM15": Access is denied.
Error during Upload: Failed uploading: uploading error: exit status 1
```
🙂 The non-verbose command line output is exactly as expected.
```text
$ arduino-cli upload --fqbn arduino:avr:uno --port COM15 --verbose /tmp/FooSketch
"C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM15" -b115200 -D "-Uflash:w:C:\Users\per\AppData\Local\Temp\arduino-sketch-2405C4C9F90028537C79B0744BCE536E/FooSketch.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\per\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM15
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\\.\COM15": Access is denied.
avrdude done. Thank you.
Error during Upload: Failed uploading: uploading error: exit status 1
```
🙂 The verbose command line output is exactly as expected.
##### Check the gRPC response
Use [grpcurl](https://github.com/fullstorydev/grpcurl) to run the following commands.
```text
$ grpcurl \
-plaintext \
-import-path ./rpc \
-proto cc/arduino/cli/commands/v1/commands.proto \
127.0.0.1:50051 \
cc.arduino.cli.commands.v1.ArduinoCoreService.Create
{
"instance": {
"id": 1
}
}
$ grpcurl \
-plaintext \
-import-path ./rpc \
-proto cc/arduino/cli/commands/v1/commands.proto \
-d '{"instance": {"id": 1}}' \
127.0.0.1:50051 \
cc.arduino.cli.commands.v1.ArduinoCoreService.Init
```
Upload with verbose output disabled:
```text
$ grpcurl \
-plaintext \
-import-path ./rpc \
-proto cc/arduino/cli/commands/v1/commands.proto \
-d '{"instance": {"id": 1}, "fqbn": "arduino:avr:uno", "sketch_path": "C:/Users/per/AppData/Local/Temp/FooSketch", "port": {"address": "COM15"}, "verbose": false}' \
127.0.0.1:50051 \
cc.arduino.cli.commands.v1.ArduinoCoreService.Upload
{
"errStream": "YXZyZHVkZTogc2VyX29wZW4oKTogY2FuJ3Qgb3BlbiBkZXZpY2UgIlxcLlxDT00xNSI6IEFjY2VzcyBpcyBkZW5pZWQuDQ0KDQo="
}
ERROR:
Code: Internal
Message: Failed uploading: uploading error: exit status 1
```
🙂 The contents of the `errStream` field of the response is exactly as expected:
```text
avrdude: ser_open(): can't open device "\\.\COM15": Access is denied.
```
Upload with verbose output enabled:
```text
$ grpcurl \
-plaintext \
-import-path ./rpc \
-proto cc/arduino/cli/commands/v1/commands.proto \
-d '{"instance": {"id": 1}, "fqbn": "arduino:avr:uno", "sketch_path": "C:/Users/per/AppData/Local/Temp/FooSketch", "port": {"address": "COM15"}, "verbose": true}' \
127.0.0.1:50051 \
cc.arduino.cli.commands.v1.ArduinoCoreService.Upload
{
"outStream": "IkM6XFVzZXJzXHBlclxBcHBEYXRhXExvY2FsXEFyZHVpbm8xNVxwYWNrYWdlc1xhcmR1aW5vXHRvb2xzXGF2cmR1ZGVcNi4zLjAtYXJkdWlubzE3L2Jpbi9hdnJkdWRlIiAiLUNDOlxVc2Vyc1xwZXJcQXBwRGF0YVxMb2NhbFxBcmR1aW5vMTVccGFja2FnZXNcYXJkdWlub1x0b29sc1xhdnJkdWRlXDYuMy4wLWFyZHVpbm8xNy9ldGMvYXZyZHVkZS5jb25mIiAtdiAtViAtcGF0bWVnYTMyOHAgLWNhcmR1aW5vICItUENPTTE1IiAtYjExNTIwMCAtRCAiLVVmbGFzaDp3OkM6XFVzZXJzXHBlclxBcHBEYXRhXExvY2FsXFRlbXBcYXJkdWluby1za2V0Y2gtMjQwNUM0QzlGOTAwMjg1MzdDNzlCMDc0NEJDRTUzNkUvRm9vU2tldGNoLmluby5oZXg6aSIK"
}
{
"errStream": "DQo="
}
ERROR:
Code: Internal
Message: Failed uploading: uploading error: exit status 1
```
🐛 The `errStream` field of the response is empty.
### Expected behavior
`cc.arduino.cli.commands.v1.ArduinoCoreService.Upload` response stream contains the full output from the upload tool.
### Arduino CLI version
5332ffda
### Operating system
Windows, Ubuntu
### Operating system version
Windows 10, Ubuntu 20.04
### Additional context
I bisected the introduction of the issue to 5332ffdafc951e96fb7576e4a5b520c1658fb015
---
I encountered the issue under specific conditions, but am not certain this is the entire scope of the issue:
- Upload operation
- gRPC interface in use
- Verbose output is enabled
- Upload fails
---
I used grpcurl in the demo, but the same problem occurs when using Arduino IDE 2.x.
---
I can see the full expected output in the `arduino-cli daemon --debug` output (note that it is in the second segment of the stream):
```text
CALLED: /cc.arduino.cli.commands.v1.ArduinoCoreService/Upload STREAM_RESP
5 | REQ: {
5 | "instance": {
5 | "id": 1
5 | },
5 | "fqbn": "arduino:avr:uno",
5 | "sketch_path": "C:/Users/per/AppData/Local/Temp/FooSketch",
5 | "port": {
5 | "address": "COM15"
5 | },
5 | "verbose": true
5 | }
5 | RESP: {
5 | "out_stream": "IkM6XFVzZXJzXHBlclxBcHBEYXRhXExvY2FsXEFyZHVpbm8xNVxwYWNrYWdlc1xhcmR1aW5vXHRvb2xzXGF2cmR1ZGVcNi4zLjAtYXJkdWlubzE3L2Jpbi9hdnJkdWRlIiAiLUNDOlxVc2Vyc1xwZXJcQXBwRGF0YVxMb2NhbFxBcmR1aW5vMTVccGFja2FnZXNcYXJkdWlub1x0b29sc1xhdnJkdWRlXDYuMy4wLWFyZHVpbm8xNy9ldGMvYXZyZHVkZS5jb25mIiAtdiAtViAtcGF0bWVnYTMyOHAgLWNhcmR1aW5vICItUENPTTE1IiAtYjExNTIwMCAtRCAiLVVmbGFzaDp3OkM6XFVzZXJzXHBlclxBcHBEYXRhXExvY2FsXFRlbXBcYXJkdWluby1za2V0Y2gtMjQwNUM0QzlGOTAwMjg1MzdDNzlCMDc0NEJDRTUzNkUvRm9vU2tldGNoLmluby5oZXg6aSIK"
5 | }
5 | RESP: {
5 | "err_stream": "DQo="
5 | }
5 | ERROR: rpc error: code = Internal desc = Failed uploading: uploading error: exit status 1
5 STREAM CLOSED
5 | ERROR: rpc error: code = Unavailable desc = transport is closing
5 | RESP: {
5 | "err_stream": "YXZyZHVkZTogVmVyc2lvbiA2LjMtMjAxOTA2MTkNCiAgICAgICAgIENvcHlyaWdodCAoYykgMjAwMC0yMDA1IEJyaWFuIERlYW4sIGh0dHA6Ly93d3cuYmRtaWNyby5jb20vDQogICAgICAgICBDb3B5cmlnaHQgKGMpIDIwMDctMjAxNCBKb2VyZyBXdW5zY2gNCg0KICAgICAgICAgU3lzdGVtIHdpZGUgY29uZmlndXJhdGlvbiBmaWxlIGlzICJDOlxVc2Vyc1xwZXJcQXBwRGF0YVxMb2NhbFxBcmR1aW5vMTVccGFja2FnZXNcYXJkdWlub1x0b29sc1xhdnJkdWRlXDYuMy4wLWFyZHVpbm8xNy9ldGMvYXZyZHVkZS5jb25mIg0KDQogICAgICAgICBVc2luZyBQb3J0ICAgICAgICAgICAgICAgICAgICA6IENPTTE1DQogICAgICAgICBVc2luZyBQcm9ncmFtbWVyICAgICAgICAgICAgICA6IGFyZHVpbm8NCiAgICAgICAgIE92ZXJyaWRpbmcgQmF1ZCBSYXRlICAgICAgICAgIDogMTE1MjAwDQphdnJkdWRlOiBzZXJfb3BlbigpOiBjYW4ndCBvcGVuIGRldmljZSAiXFwuXENPTTE1IjogQWNjZXNzIGlzIGRlbmllZC4NDQoNCg0KYXZyZHVkZSBkb25lLiAgVGhhbmsgeW91Lg0KDQo="
5 | }
```
---
Originally reported by @sterretjeToo at https://forum.arduino.cc/t/serial-monitor-detect-interferes-with-sketch-on-promicro/1017659/5
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-cli/issues?q=)
- [X] I verified the problem still occurs when using the [nightly build](https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds)
- [X] My report contains all necessary details
Pleasure, closing this now as the original questions were answered.
system
Closed
January 27, 2023, 10:55am
8
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.